How do I set up my account endpoints?

Discover insights on key topics that enhance understanding and offer practical knowledge for everyday applications.

Overview

The API endpoints are organized by resource type. Each endpoint returns a JSON response that is wrapped in an envelope containing a data object, and, when applicable, meta information (such as total count) and links for pagination.


Account Endpoints


List Accounts

Endpoint: GET /v1/accounts

Description: Retrieves a paginated list of accounts with optional filters.

Query Parameters:

  • EntityId (string): Filter accounts by operating entity.
  • Type (string): Filter by account type (e.g., Operating, Card).
  • Status (string): Filter by account status (e.g., Active, Closed).
  • CorporateId (string): Filter by corporate entity identifier.
  • PageSize (integer)
  • Cursor (string)

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts?EntityId=60c6de90-739e-4817-931c-fba5237f9903&Status=Active&PageSize=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve Account Details

Endpoint: GET /v1/accounts/{id}

Description: Fetches detailed information for a specified account.

Path Parameter:

  • id (string): Account identifier.

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve Account Balances

Endpoint: GET /v1/accounts/{id}/balances

Description: Retrieves balance details (ledger, pending, available) for an account.

Path Parameter:

  • id (string): Account identifier.

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab/balances" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve Account Statements

Endpoint: GET /v1/accounts/{id}/statements

Description: Retrieves account statements for a given date range.

Path Parameter:

  • id (string): Account identifier.

Query Parameters:

  • fromDate (ISO 8601 date-time, required)
  • toDate (ISO 8601 date-time, required)
  • pageSize (integer, default is 10)
  • cursor (string)

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab/statements?fromDate=2024-12-01T00:00:00Z&toDate=2024-12-31T23:59:59Z&pageSize=20" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve Account Expenses

Endpoint: GET /v1/accounts/{id}/expenses

Description: Retrieves a paginated list of expenses for an account.

Path Parameter:

  • id (string): Account identifier.

Query Parameters:

  • currencyCode (string)
  • fromDate (ISO 8601 date-time, required)
  • toDate (ISO 8601 date-time, required)
  • pageSize (integer, default is 10)
  • cursor (string)

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab/expenses?currencyCode=USD&fromDate=2024-12-01&toDate=2024-12-31&pageSize=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve Receipts for a Specific Account Expense

Endpoint: GET /v1/accounts/{accountId}/expenses/{transactionId}/receipts

Description: Retrieves receipts associated with a specific expense transaction.

Path Parameter:

  • accountId (string): Account identifier.
  • transactionId (string): Expense transaction identifier.

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab/expenses/a0348076-bdfa-4b00-8687-497d3296fabb/receipts" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 

Retrieve a Specific Account Expense Receipt

Endpoint: GET /v1/accounts/{accountId}/expenses/{transactionId}/receipts/{receiptId}

Description: Retrieves details of a specific receipt for an expense transaction.

Path Parameter:

  • accountId (string): Account identifier.
  • transactionId (string): Expense transaction identifier.
  • receiptId (string)

Example Request:

curl -X GET "https://api.centtrip.com/eu/v1/accounts/01796289-e658-4810-95fd-32f0759e08ab/expenses/a0348076-bdfa-4b00-8687-497d3296fabb/receipts/1cc8426b-fdb9-4bf1-b495-c5406e273ac0" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" 


  1. Environments & Base URLs
  2. Authentication
  3. Endpoints:
    1. Corporate Endpoints
    2. Entity Endpoints
    3. Account Endpoints
    4. Card Endpoints
  4. Response Envelopes
  5. Error Handling
  6. Best Practice & Tips
  7. Example Workflow
Was this article helpful?