{
  "data": [
    {
      "id": 1,
      "title": "Shipment One",
      // ...
    },
    {
      "id": 2,
      "title": "Shipment Two",
      // ...
    }
  ],
  "links": {
    "first": "https://app.artport.co/api/v1/shipments?page=1",
    "last": null,
    "prev": null,
    "next": "https://app.artport.co/api/v1/shipments?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "path": "https://app.artport.co/api/v1/shipments",
    "per_page": 20,
    "to": 20
  }
}

Overview

The ArtPort API uses limit-offset pagination for some of its endpoints. This allows you to retrieve a subset of the total data available, which can be useful when working with large datasets.

Any endpoints that support pagination will be indicated in the documentation.

Setting the Page Number

To retrieve a specific page of data, you can use the page query parameter. For example, to retrieve the second page of data, you could use the following path:

/api/v1/shipments?page=2

If no page query parameter is passed, the API will default to the first page.

Customizing the Page Size

By default, paginated endpoints will return 20 items per page. However, this can be customized by passing a limit query parameter. For example, to retrieve 50 items per page, you could use the following path:

/api/v1/shipments?limit=50

If a limit query parameter is passed, then it must be an integer between 1 and 50.

Paginated Response Structure

Paginated responses use the following structure:

{
  "data": [
    {
      "id": 1,
      "title": "Shipment One",
      // ...
    },
    {
      "id": 2,
      "title": "Shipment Two",
      // ...
    }
  ],
  "links": {
    "first": "https://app.artport.co/api/v1/shipments?page=1",
    "last": null,
    "prev": null,
    "next": "https://app.artport.co/api/v1/shipments?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "path": "https://app.artport.co/api/v1/shipments",
    "per_page": 20,
    "to": 20
  }
}
data
array
required

The items returned in the current page. If no items are returned, this will be an empty array.

URLs for the first, last, previous, and next pages.

meta
array
required

Metadata about the current page.