Search credit logs with given parameters
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/credits/logs/find \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"include_meta": true,
"pagination": {
"from_key": null,
"limit": 20
},
"query": {
"action_type": null,
"credit_id": null,
"customer_id": null,
"invoice_id": null,
"note": null,
"search": null,
"type": null
},
"sort_key": "createdAtDesc"
}'
{
"pagination": {
"from_key": null,
"limit": 123
},
"results": [
{
"action_type": "<string>",
"amount_applied": {
"currency": "<string>",
"value_in_cents": 123
},
"created_at": "2023-11-07T05:31:56Z",
"credit_id": "<string>",
"customer": {
"email": "<string>",
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"org_name": "<string>",
"parent_customer": {},
"parent_customer_id": null
},
"customer_id": "<string>",
"id": "<string>",
"invoice": {
"auto_charges": true,
"billed_customer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_id": "<string>",
"due": {
"currency": "<string>",
"value_in_cents": 123
},
"due_date": "2023-11-07T05:31:56Z",
"hosted_link": null,
"invoice_date": "2023-11-07T05:31:56Z",
"name": "<string>",
"number": "<string>",
"paid": {
"currency": "<string>",
"value_in_cents": 123
},
"paid_date": null,
"pdf_link": null,
"prorated_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"status": "<string>",
"sub_total": {
"currency": "<string>",
"value_in_cents": 123
},
"subscription_id": null,
"total": {
"currency": "<string>",
"value_in_cents": 123
},
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "<string>"
},
"invoice_id": null,
"item": {
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display_type": "<string>",
"editable": true,
"external_name": "<string>",
"id": "<string>",
"name": "<string>",
"standard": true,
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"item_id": null,
"metric_record_id": null,
"note": null,
"type": "<string>",
"units_applied": 123
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The idempotency key that will be used to ensure the request is only performed once
The company ID with the prefix 'cmp_'.
OK
The response is of type object
.
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/credits/logs/find \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"include_meta": true,
"pagination": {
"from_key": null,
"limit": 20
},
"query": {
"action_type": null,
"credit_id": null,
"customer_id": null,
"invoice_id": null,
"note": null,
"search": null,
"type": null
},
"sort_key": "createdAtDesc"
}'
{
"pagination": {
"from_key": null,
"limit": 123
},
"results": [
{
"action_type": "<string>",
"amount_applied": {
"currency": "<string>",
"value_in_cents": 123
},
"created_at": "2023-11-07T05:31:56Z",
"credit_id": "<string>",
"customer": {
"email": "<string>",
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"org_name": "<string>",
"parent_customer": {},
"parent_customer_id": null
},
"customer_id": "<string>",
"id": "<string>",
"invoice": {
"auto_charges": true,
"billed_customer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"customer_id": "<string>",
"due": {
"currency": "<string>",
"value_in_cents": 123
},
"due_date": "2023-11-07T05:31:56Z",
"hosted_link": null,
"invoice_date": "2023-11-07T05:31:56Z",
"name": "<string>",
"number": "<string>",
"paid": {
"currency": "<string>",
"value_in_cents": 123
},
"paid_date": null,
"pdf_link": null,
"prorated_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"status": "<string>",
"sub_total": {
"currency": "<string>",
"value_in_cents": 123
},
"subscription_id": null,
"total": {
"currency": "<string>",
"value_in_cents": 123
},
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "<string>"
},
"invoice_id": null,
"item": {
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display_type": "<string>",
"editable": true,
"external_name": "<string>",
"id": "<string>",
"name": "<string>",
"standard": true,
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"item_id": null,
"metric_record_id": null,
"note": null,
"type": "<string>",
"units_applied": 123
}
]
}