CNaughtCNaught
PricingSign In

Get List of Orders

Gets a list of orders in reverse chronological order up to the provided limit number of orders per call. Pagination is supported by passing the first order id from a previous call into ending_before to retrieve the previous page, or the last order id from a previous call into starting_after to retrieve the next page.

GET/orders

Authorizations#

Authorization

string

header

required

Bearer authentication header of the form Bearer <token>, where <token> is your CNaught API key.

Headers#

X-Subaccount-Id

string

If present, only returns orders belonging to the subaccount with given id.

Query Parameters#

limit

integer | null

default: 20

Limits the number of orders returned, default is 20, max is 100

starting_after

string | null

If specified, returns orders submitted before (earlier than) the order with this id, exclusive (order with this id is not included). Only one of starting_after and ending_before can be specified.

ending_before

string | null

If specified, returns orders submitted after (later than) the order with this id, exclusive (order with this id is not included). Only one of starting_after and ending_before can be specified.

Response#

200

List of orders

Overview

Get List of Orders

curl --request GET \
  --url https://api.cnaught.com/v1/orders \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "Gre28Fc35bt3",
      "order_number": "47726-53238-46633-33562-7433",
      "created_on": "2022-08-01T18:00:00.000000Z",
      "metadata": "Customer metadata",
      "description": "On behalf of Jane Smith",
      "amount_kg": 10.5,
      "state": "fulfilled",
      "price_usd_cents": 2350,
      "certificate_public_url": "https://registry.cnaught.com/orders/Gre28Fc35bt3",
      "certificate_download_public_url": "https://registry.cnaught.com/api/certificates/Gre28Fc35bt3/pdf"
    }
  ]
}