POST
/
companies
/
{company_id}
/
credits
/
logs
/
find
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": "<string>",
    "limit": 20
  },
  "query": {
    "action_type": "<string>",
    "credit_id": "<string>",
    "customer_id": "<string>",
    "invoice_id": "<string>",
    "note": "<string>",
    "search": "<string>",
    "type": "<string>"
  },
  "sort_key": "createdAtDesc"
}'
{
  "pagination": {
    "from_key": "<string>",
    "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": "<string>"
      },
      "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": "<string>",
        "invoice_date": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "number": "<string>",
        "paid": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "paid_date": "2023-11-07T05:31:56Z",
        "pdf_link": "<string>",
        "prorated_amount": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "status": "<string>",
        "sub_total": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "subscription_id": "<string>",
        "total": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "updated_at": "2023-11-07T05:31:56Z",
        "uuid": "<string>"
      },
      "invoice_id": "<string>",
      "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": "<string>",
      "metric_record_id": "<string>",
      "note": "<string>",
      "type": "<string>",
      "units_applied": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

Company ID. It should have a prefix 'cmp_'.

Body

application/json

Response

200 - application/json

OK

The response is of type object.