Skip to main content
GET
/
v1
/
customers
/
{id}
/
transactions
Get all transactions for a customer
curl --request GET \
  --url https://dev.flextell.ai/api/v1/customers/{id}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Tenant: <x-tenant>'
{
  "data": [
    {
      "id": 123,
      "tenant_id": 123,
      "batch_uuid": "<string>",
      "customer_id": 123,
      "account_id": 123,
      "sale_id": 123,
      "currency_id": 123,
      "exchange_rate": 123,
      "debit": "<string>",
      "credit": "<string>",
      "amount": "<string>",
      "transaction_date": "2023-11-07T05:31:56Z",
      "type": "<string>",
      "description": "<string>",
      "invoice_number": "<string>",
      "is_installment": true,
      "due_date": "2023-11-07T05:31:56Z",
      "installment_number": 123,
      "total_installments": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "account": {
        "id": 123,
        "name": "<string>"
      },
      "currency": {
        "id": 123,
        "code": "<string>",
        "symbol": "<string>",
        "name": "<string>"
      }
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "current_page": 2,
    "from": 2,
    "last_page": 2,
    "links": [
      {
        "url": "<string>",
        "label": "<string>",
        "active": true
      }
    ],
    "path": "<string>",
    "per_page": 1,
    "to": 2,
    "total": 1
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Path Parameters

id
integer
required

The customer identifier

Query Parameters

search
string | null

The search query.

Maximum string length: 255
per_page
integer | null

The number of items per page.

Required range: 1 <= x <= 100
page
integer | null

The page number.

Required range: x >= 1
sort_by
enum<string> | null

The field to sort by.

Available options:
transaction_date,
created_at,
debit,
credit,
due_date
sort_order
enum<string> | null

The sort direction (asc or desc).

Available options:
asc,
desc
type
enum<string>

Filter by transaction type.

Available options:
sale_invoice,
sale,
collection,
purchase_invoice,
payment,
opening_balance
currency_id
integer | null

Filter by currency ID.

Response

Paginated set of CustomerTransactionResource

data
CustomerTransactionResource · object[]
required
meta
object
required