Search credits with given parameters
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/credits/find \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pagination": {
"from_key": "<unknown>",
"limit": 20
},
"include_meta": true,
"query": {
"currency": "<unknown>",
"customer_id": "<unknown>",
"search": "<unknown>",
"status": "ACTIVE",
"statuses": "ACTIVE",
"subscription_id": "<unknown>",
"type": "<unknown>"
},
"sort_key": "createdAtDesc"
}
'{
"pagination": {
"from_key": "<unknown>",
"limit": 123
},
"results": [
{
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"coupon_id": "<unknown>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"expiration_date": "<unknown>",
"id": "<string>",
"import_created_at_ref": "<unknown>",
"import_ref": "<unknown>",
"imported_from": "<unknown>",
"issued_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"issued_units": 123,
"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": "<unknown>",
"metric_record_id": "<unknown>",
"name": "<string>",
"one_time_billable_id": "<unknown>",
"proration_date": "<unknown>",
"state": "<string>",
"subscription_id": "<unknown>",
"type": "<string>",
"units": 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_'.
Whether to include additional metadata in the pagination response such the number of total results
The query criteria for the request
Show child attributes
Credit if amount is assigned to currency
The customer ID to which the credits belong
Any search string to match customers
The specific status of the customer that can be one of ACTIVE CONSUMED REVOKED or EXPIRED
ACTIVE, CONSUMED, REVOKED, EXPIRED The status of the customers that can include ACTIVE CONSUMED REVOKED or EXPIRED
The subscription ID to which the credits belong
The credit type that can be one of AMOUNT or UNITS
createdAtDesc, createdAtAsc, updatedAtAsc, updatedAtDesc, expirationDateAsc, expirationDateDesc OK
Show child attributes
Show child attributes
The company ID for the billable item
The date the billable item was created
Any description attached to the billable item
The display type of the billable item which can be one of UNITS, AMOUNT, THOUSAND_UNITS, MILLION_UNITS
Whether the billable item can be further edited
The public name of the billable item
The ID of the billable item in Maple
The name of the billable item
Whether this is a standard billable item in Maple or a custom billable item
The type of the billable item which can be one of CUSTOM_USAGE or CUSTOM_OBJ, based on usage-based item or object-based item
The date the billable item was last updated
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/credits/find \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pagination": {
"from_key": "<unknown>",
"limit": 20
},
"include_meta": true,
"query": {
"currency": "<unknown>",
"customer_id": "<unknown>",
"search": "<unknown>",
"status": "ACTIVE",
"statuses": "ACTIVE",
"subscription_id": "<unknown>",
"type": "<unknown>"
},
"sort_key": "createdAtDesc"
}
'{
"pagination": {
"from_key": "<unknown>",
"limit": 123
},
"results": [
{
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"coupon_id": "<unknown>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"expiration_date": "<unknown>",
"id": "<string>",
"import_created_at_ref": "<unknown>",
"import_ref": "<unknown>",
"imported_from": "<unknown>",
"issued_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"issued_units": 123,
"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": "<unknown>",
"metric_record_id": "<unknown>",
"name": "<string>",
"one_time_billable_id": "<unknown>",
"proration_date": "<unknown>",
"state": "<string>",
"subscription_id": "<unknown>",
"type": "<string>",
"units": 123
}
]
}