Skip to main content

monnify@1.0.0

get(path, options)
list(path, query)
post(path, body, options)
request(method, path, options)

This adaptor exports the following from common:

as()
combine()
cursor()
dataPath()
dataValue()
dateFns
each()
field()
fields()
fn()
fnIf()
group()
lastReferenceValue()
map()
merge()
scrubEmojis()
sourceValue()
util

Functions

get

get(path, options) ⇒ Operation

Make a GET request

ParamTypeDescription
pathstringPath to resource
optionsRequestOptionsOptional request options

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Get all transactions

get('/api/v1/transactions/search');

list

list(path, query) ⇒ Operation

Fetch a list of items.

ParamTypeDescription
pathstringPath to resource
queryListQueryOptionsQuery options.

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Get all transactions

list('/api/v2/disbursements/search-transactions', {
sourceAccountNumber: 4864192954
});

Example: Get all transactions for a specific page and page number.

list('/api/v2/disbursements/search-transactions', { 
sourceAccountNumber: 4864192954,
pageNo: 0,
pageSize: 10
});

post

post(path, body, options) ⇒ Operation

Make a POST request

ParamTypeDescription
pathstringPath to resource
bodyobjectThe Post request body
optionsRequestOptionsOptional request options

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Resend all failed notifications over a time period

post("/api/v1/transaction-notification/resend-failed-notifications", {
"startDate": "2021-01-16T13:56:39.492",
"endDate": "2021-10-16T13:56:39.492"
});

request

request(method, path, options) ⇒ Operation

Make a generic request

ParamTypeDescription
methodstringHTTP method to use
pathstringPath to resource
optionsRequestOptionsOptional request options

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Get disbursements from a wallet

request(
'GET',
'/api/v2/disbursements/search-transactions',
{
query: {
sourceAccountNumber: 4864192954,
pageNo: 0,
pageSize: 10
}
}
);

Interfaces

HttpState

State object

Properties

NameDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

ListQueryOptions

Query option for the list helper function

Properties

NameTypeDescription
pageNoNumberThe page number. Please note that Monnify pagination starts at 0 not 1. (Default: 0)
pageSizeNumberThe page size. (Default: 100)
[otherOptions]Record.<string, any>Additional options.

RequestOptions

Options provided to the HTTP request

Properties

NameTypeDescription
bodyobject | stringbody data to append to the request. JSON will be converted to a string (but a content-type header will not be attached to the request).
queryobjectAn object of query parameters to be encoded into the URL.