Read Cash-Out by Filters
This route will be used to search for transfer operations, this endpoint returns an array containing cash-out objects, sorted from the most recently performed transfer.
If no filter is passed, an array of objects containing your last 10 operations performed with Marlim will be returned.
Request Query Params
Attribute | Type | Description |
---|---|---|
item_id | string | Filter by a specific your charge/order ID. |
cash_out_id | string | Filter by a specific marlim cash-out ID. |
date_created | dateTime | Filter by date created. |
date_updated | dateTime | Filter by date updated. |
status | string | Filter by status. Accepted values: processing , fulfilled , pending , failed and cancelled . |
customer_document_number | string | Filter by CPF document of the user who owns a transfer account. |
count | int32 | Returns n cash-out objects. Maximum of 1,000 and default of 10. |
page | int32 | Useful for implementing a pagination of results. |
The date_created
and date_updated
property can be used to filter date range searches using the following attributes:
Attribute | Description |
---|---|
< | less than |
> | greater than |
<= | less than or equal to |
>= | greater than or equal to |
curl -X GET -G "https://api.bet.marlim.co/v1/chash-out" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d date_created=">=1620086400000" \
-d date_created="<=1620172799000"
Date filtering uses unixTimeStamp in milliseconds to represent it. To generate the unixTimeStamp of a date, you can use the Google Chrome console with the following code in Javascript: new Date("2023-01-01T00:00:00.000Z").getTime()
which will return 1672531200000.
Response Object
When fetching cash-out operations, returns an object with 4 properties: total
, page
, offset
, and operations
.
Attribute | Type | Description |
---|---|---|
total | int32 | Total operations that meet the filter passed in the query. |
page | int32 | Current page referring to offset of pages. |
offset | int32 | Total pages for count divided by total of handled operations in the queries. |
operations | array | Array of objects containing cash-out data. |
Operations Array
If the query response is greater than or equal to 1, inside the operations property, this is the array of objects you receive as a response. If the filter using does not find any cash-out operation, an empty array is returned.
Property | Type | Description |
---|---|---|
status | string | Represents the current state of the cash-out operation. Possible values: processing , fulfilled , pending , failed and cancelled . |
status_description | string | Description to clarify about the status of the transfer. |
cash_out_id | string | Marlim operation identifier number. |
item_id | string | Charge/Order ID on your platform. |
date_created | dateTime | Operation creation date in ISODateTime format. |
date_updated | dateTime | Operation status updated date in ISODateTime format. |
amount | int32 || float | Amount to be transferred to the customer account. |
paid_off_amount | int32 || float | Final amount transferred to the customer's account according to the current status. |
customer_name | string | Name of person responsible for the transfer account. |
customer_document_number | string | Document number of the person responsible for the transfer account. |
Samples
- Last 10 cash-out operations
curl -X GET -G "https://api.bet.marlim.co/v1/chash-out" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
{
"total": 150,
"page": 1,
"offset": 15,
"operations": [
{
"status": "processing",
"status_description": "The transfer is being processed.",
"cash_out_id": "BksUV4Bg0BOX3kEqlOsH",
"item_id": "123456789",
"date_created": "2023-09-11T12:30:28.795Z",
"date_updated": "2023-09-11T12:30:28.795Z",
"amount": 100,
"paid_off_amount": 0,
"customer_name": "Luke Skywalker",
"customer_document_number": "00099988877"
},
{
"status": "pending",
"status_description": "Transfer created successfully and processed and is pending finalization.",
"cash_out_id": "a25AwZmhvMagXV6DduCP",
"item_id": "234567890",
"date_created": "2023-09-11T12:30:28.795Z",
"date_updated": "2023-09-11T12:30:28.795Z",
"amount": 1000.5,
"paid_off_amount": 0,
"customer_name": "Lord Darth Vader",
"customer_document_number": "00066699966"
},
{
"status": "fulfilled",
"status_description": "Transfer completed successfully and the amount was transferred to the customer's account.",
"cash_out_id": "1xC3EH9OKNLk9GH5FfA1",
"item_id": "345678901",
"date_created": "2023-09-11T12:30:28.795Z",
"date_updated": "2023-09-11T12:30:28.795Z",
"amount": 250,
"paid_off_amount": 250,
"customer_name": "Leia S. O. Solo",
"customer_document_number": "99988877766"
},
{
"status": "failed",
"status_description": "The bank informed us that there was a failure during the transfer.",
"cash_out_id": "xRNlaNykjED2WU1tkVqo",
"item_id": "456789012",
"date_created": "2023-09-11T12:30:28.795Z",
"date_updated": "2023-09-11T12:30:28.795Z",
"amount": 250,
"paid_off_amount": 0,
"customer_name": "Wookiee Chewbacca",
"customer_document_number": "66600066699"
},
{
"+6n": "..."
}
]
}