For information about outages and scheduled maintenance, click here

How to Use the Capture Expense API to Export Expenses

Modified on Mon, 19 May at 10:04 AM

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 here:
Capture API Swagger Documentation

  

Generate 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

Here’s 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.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article