Capture Expense API

Prev Next

The Capture API allows you to extract fully approved expenses and mark them as exported once processed. This guide walks you through generating your API key, authenticating requests, and using the relevant endpoints.

API Documentation

All endpoint definitions, along with request and response formats, can be found in Capture API Swagger Documentation

Generating Your API Key

Before you can make API calls, you’ll need a secret key to authenticate requests. This key can be generated in Setup > Settings > Integration > Capture Expense.

Where to Generate or View Your API Key

image

Use the screenshot above to locate where to generate or retrieve your secret key within the Capture platform.

Authentication

Once you have your secret key, include it in the headers of every API request:

  • Header Key: X-API-Key

  • Header Value: [your generated secret key]

This is required for both exporting expenses and updating their export status.

Key Endpoints

1. GET api/Expenses/Export

Returns all expenses that are fully approved and ready to be exported.

? Response Schema Example

This is a sample of the response you’ll receive from this endpoint:

JSON

{
  "success": true,
  "message": "string",
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "transactionType": 0,
      "paymentType": "string",
      "employeeId": "string",
      "supplierCode": "string",
      "personName": "string",
      "categoryName": "string",
      "nominalAccount": "string",
      "department": "string",
      "location": "string",
      "project": "string",
      "costcentre": "string",
      "claimDate": "2025-05-19T08:42:39.396Z",
      "reference": "string",
      "description": "string",
      "isoCode": "string",
      "exchangeRate": 0,
      "netAmount": 0,
      "taxCode": "string",
      "taxAmount": 0,
      "grossAmount": 0,
      "details": "string",
      "distance": 0,
      "carbonAmount": 0
    }
  ],
  "totalCount": 0
}

JSON

Each item in the data array represents an individual approved expense.

2. POST api/Expenses/ExportStatusUpdate

Use this endpoint to mark expenses as exported once you've processed them.


Request Body Example

JSON

{
  "exportStatuses": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "success": true,
      "message": "string",
      "transactionType": 0
    }
  ]
}

JSON

You can batch multiple records into a single update request.