v1

latestOpenAPI 3.1.02026-08-06236494759.4 KB
Pre-approved Spend

Search Purchases

Endpoint to find Purchases using filtering parameters.

get/business/v2/purchases

Query parameters

fromDatestring date-time

The beginning of the period of the search fromDate included (i.e. greater than or equal to) (Formats: yyyy-MM-dd, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ssZ).

toDatestring date-time

The end of the period of the search toDate included (i.e. less than) (Formats: yyyy-MM-dd, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ssZ).

dateType'CREATION_TIME' | 'COMPLETED_TIME'

It determines the date to be considered for fromDate and toDate parameters.

Example:COMPLETED_TIME

It determines the date to be considered for fromDate and toDate parameters.

statusPurchaseStatus[]

The status of the Purchase.

The status of the Purchase.

textstring

A simple text to search in the Purchase data (title, description, assignees).

Example:something

A simple text to search in the Purchase data (title, description, assignees).

pinteger

It indicates the specific page to display (the counter starts from zero).

Example:3

It indicates the specific page to display (the counter starts from zero).

sinteger

It indicates the number of items per page.

Example:25

It indicates the number of items per page.

d'ASC' | 'DESC'

It indicates how the pages are ordered.

Example:DESC

It indicates how the pages are ordered.

propsstring[]

It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the props parameter in the request.

It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the props parameter in the request.

[
  "creationTime"
]

Response

The result is an array containing Purchases.

totalinteger

It represents the total number of available items in the list.

pagesinteger

It represents the total number of available pages.

page_sizeinteger

It represents the number of items per page.

current_pageinteger

It indicates the current page (the counter starts from zero).

results_sizeinteger

It indicates the size of the array results.

Example response

{
  "total": 168,
  "pages": 7,
  "page_size": 25,
  "results_size": 25,
  "results": [
    {
      "id": "7bf79328-a7ae-4222-aa54-091ff7f429a7",
      "title": "Tech book",
      "description": "A purchase to approve",
      "amount": 10.25,
      "wallet_id": "2d65bd5e-3fdf-4002-b166-bde7fb8863fa",
      "wallet_name": "John Doe",
      "has_attachments": true,
      "notes": "Notes about the purchase request",
      "assignee_id": "XMPL1234-000003",
      "assignee_custom_reference_id": "123456-user-1",
      "author_id": "XMPL1234-000001",
      "author_custom_reference_id": "123456-user-2",
      "expiration_date": "2017-06-01T12:48:40Z",
      "card_id": "2d65bd5e-3fdf-4002-b166-bde7fb8863fa",
      "transactions": [
        {
          "id": "c861cc24-6663-410f-8c78-73f886fff4ef",
          "amount": 10.25,
          "completed_time": "2017-06-01T12:48:40Z"
        }
      ],
      "max_tx_number": 3,
      "creation_time": "2017-06-01T12:48:40Z",
      "last_update_time": "2017-06-01T12:48:40Z"
    }
  ]
}