APG PayAPG Paydocs

Orders

List orders

GET/orders
Request
GEThttps://api.tst.au.apgpay.dev/orders
curl -X GET https://api.tst.au.apgpay.dev/orders \
  -H "Authorization: Bearer $API_KEY"

Return a page of orders. Supply page for offset pagination or startingAfter for cursor pagination, and q to search. The filters combine with each other and with q by AND. GET /filter-catalogues/orders lists those this caller can use. A cursor continues only the walk that issued it: sent with different filters, q or sort, it is refused with 400. One issued before the list named its walks resumes as it did.

Permissions

Required permission
orders:query

Requires the `query` action on `orders` for the supplied runtime context

Query parameters

qstring

Free-text search. Supplying it engages the search index; omit it to filter only.

pageinteger (int32)

Offset pagination: 1-based page number. Mutually exclusive with the cursor parameters.

startingAfterstring

Cursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.

endingBeforestring

Cursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.

limitinteger (int32)

Maximum items per page.

sortarray of OrdrSort

Fields to sort by, comma-delimited, in priority order. Prefix a field with - for descending.

columnsarray of OrdrColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

statusone of OrdrStatus, array of OrdrStatus

Only orders whose status is one of these. Repeat the parameter to give several.

orderTypeone of OrdrType, array of OrdrType

Only orders whose kind is one of these. Repeat the parameter to give several.

merchantIdone of array of string, string

Only orders whose merchant is one of these. Repeat the parameter to give several.

marketplaceIdone of array of string, string

Only orders whose marketplace is one of these. Repeat the parameter to give several.

referenceOrderIdstring

Filter by your own identifier for the order.

currencyone of IsoCurrency, array of IsoCurrency

Only orders whose currency is one of these. Repeat the parameter to give several.

amountFrominteger (int64)

Only orders whose total, in the minor units of currency, is at least this.

amountTointeger (int64)

Only orders whose total, in the minor units of currency, is at most this.

createdAfterstring (date-time)

Only orders whose creation time is at or after this ISO-8601 timestamp.

createdBeforestring (date-time)

Only orders whose creation time is before, and not at, this ISO-8601 timestamp.

Responses

The response is a tagged shape: type is always "OrdrPageAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "OrdrPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "OrdrPageAttributes",
  "data": [
    {
      "type": "OrdrViewAttributes",
      "orderId": "ordr_9f2Kd8QpLzXw",
      "merchantId": "mcht_9f2Kd8QpLzXw",
      "marketplaceId": "mktp_9f2Kd8QpLzXw",
      "customer": {
        "type": "OrdrCustomerAttributes",
        "name": "Ada Lovelace",
        "emailAddress": "ada@example.com",
        "phoneNumber": "+61400000000"
      },
      "status": "Created",
      "orderType": "Online",
      "amounts": {
        "type": "OrdrAmountsAttributes",
        "currency": "AUD",
        "total": 1250,
        "tax": 1250,
        "paid": 1250,
        "outstanding": 1250,
        "surcharge": 1250,
        "discount": 1250
      },
      "lineItems": [
        {
          "type": "OrdrLineItemInvoice",
          "description": "string",
          "unitCount": 12.5,
          "fee": 1250,
          "tax": 1250,
          "value": 1250,
          "category": "string",
          "notes": "string"
        }
      ],
      "description": "string",
      "shipping": {
        "type": "OrdrShippingAttributes",
        "name": "Ada Lovelace",
        "address": {
          "type": "OrdrAddressAttributes",
          "line1": "string",
          "line2": "string",
          "city": "string",
          "state": "string",
          "postalCode": "3000",
          "country": "AU"
        },
        "amount": 1250,
        "carrier": "string",
        "trackingNumber": "string",
        "phone": "+61400000000"
      },
      "billing": {
        "type": "OrdrBillingAttributes",
        "name": "Ada Lovelace",
        "address": {
          "type": "OrdrAddressAttributes",
          "line1": "string",
          "line2": "string",
          "city": "string",
          "state": "string",
          "postalCode": "3000",
          "country": "AU"
        },
        "phone": "+61400000000"
      },
      "settlement": "Default",
      "request3DSOnPayment": true,
      "emailCustomerReceipt": true,
      "referenceOrderId": "your-own-reference",
      "metadata": {
        "yourKey": {}
      },
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses