Skip to main content

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.

GETv1/chash-out

Request Query Params

AttributeTypeDescription
item_idstringFilter by a specific your charge/order ID.
cash_out_idstringFilter by a specific marlim cash-out ID.
date_createddateTimeFilter by date created.
date_updateddateTimeFilter by date updated.
statusstringFilter by status.

Accepted values: processing, fulfilled, pending, failed and cancelled.
customer_document_numberstringFilter by CPF document of the user who owns a transfer account.
countint32Returns n cash-out objects. Maximum of 1,000 and default of 10.
pageint32Useful for implementing a pagination of results.
Tip

The date_created and date_updated property can be used to filter date range searches using the following attributes:

AttributeDescription
<less than
>greater than
<=less than or equal to
>=greater than or equal to
Request
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"
Heads Up!

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.

AttributeTypeDescription
totalint32Total operations that meet the filter passed in the query.
pageint32Current page referring to offset of pages.
offsetint32Total pages for count divided by total of handled operations in the queries.
operationsarrayArray 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.

PropertyTypeDescription
statusstringRepresents the current state of the cash-out operation.

Possible values: processing, fulfilled, pending, failed and cancelled.
status_descriptionstringDescription to clarify about the status of the transfer.
cash_out_idstringMarlim operation identifier number.
item_idstringCharge/Order ID on your platform.
date_createddateTimeOperation creation date in ISODateTime format.
date_updateddateTimeOperation status updated date in ISODateTime format.
amountint32 || floatAmount to be transferred to the customer account.
paid_off_amountint32 || floatFinal amount transferred to the customer's account according to the current status.
customer_namestringName of person responsible for the transfer account.
customer_document_numberstringDocument number of the person responsible for the transfer account.

Samples

Request
curl -X GET -G "https://api.bet.marlim.co/v1/chash-out" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
Response200
{
"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": "..."
}
]
}