Skip to main content
POST
/
orders
/
fetch
Orders Fetch
curl --request POST \
  --url https://api.henrylabs.ai/v1/orders/fetch \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "cursor": "2023-01-01T00:00:00.000Z",
  "limit": 40,
  "status": "complete",
  "cartId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'
{
  "success": true,
  "status": "<string>",
  "message": "<string>",
  "data": [
    {
      "refId": "<string>",
      "status": "pending",
      "products": [
        {
          "status": "pending",
          "link": "<string>",
          "quantity": 123,
          "merchant": "<string>",
          "host": "<string>",
          "variant": "<string>",
          "metadata": {}
        }
      ],
      "details": {
        "hasAccount": true,
        "name": {
          "firstName": "<string>",
          "lastName": "<string>",
          "middleName": "<string>"
        },
        "card": {
          "nameOnCard": {
            "firstName": "<string>",
            "lastName": "<string>",
            "middleName": "<string>"
          },
          "details": {},
          "billingAddress": {
            "line1": "<string>",
            "city": "<string>",
            "province": "<string>",
            "postalCode": "<string>",
            "countryCode": "<string>",
            "line2": "<string>"
          }
        },
        "email": "<string>",
        "phone": {
          "countryCode": "<string>",
          "nationalNumber": "<string>",
          "e164": "<string>",
          "country": "<string>"
        },
        "shippingAddress": {
          "line1": "<string>",
          "city": "<string>",
          "province": "<string>",
          "postalCode": "<string>",
          "countryCode": "<string>",
          "line2": "<string>"
        },
        "settings": {
          "collectEmail": true,
          "collectAddress": true,
          "collectPhone": true
        }
      },
      "result": {
        "items": [
          {
            "productLink": "<string>",
            "confirmationNumber": "<string>",
            "costs": {
              "total": {
                "value": 123,
                "currency": "USD"
              },
              "subtotal": {
                "value": 123,
                "currency": "USD"
              },
              "tax": {
                "value": 123,
                "currency": "USD"
              },
              "shipping": {
                "value": 123,
                "currency": "USD"
              },
              "discount": {
                "value": 123,
                "currency": "USD"
              }
            },
            "shippingOption": {
              "id": "<string>",
              "name": "<string>",
              "cost": {
                "value": 123,
                "currency": "USD"
              },
              "timeEstimate": "<string>",
              "minDate": "<string>",
              "maxDate": "<string>"
            },
            "appliedCoupon": {
              "code": "<string>",
              "savedAmount": {
                "value": 123,
                "currency": "USD"
              }
            },
            "metadata": {}
          }
        ],
        "costs": {
          "subtotal": {
            "value": 123,
            "currency": "USD"
          },
          "commissionFee": {
            "value": 123,
            "currency": "USD"
          },
          "total": {
            "value": 123,
            "currency": "USD"
          }
        }
      },
      "error": {}
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json
cursor
string

Cursor returned from the previous response

Example:

"2023-01-01T00:00:00.000Z"

limit
number
default:40

Limit the number of results

Required range: 1 <= x <= 100
Example:

40

status
enum<string>

Filter orders by status

Available options:
pending,
processing,
complete,
cancelled
Example:

"complete"

cartId
string<uuid>

Filter orders by cart ID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response

Orders fetched successfully

success
boolean
required
status
string
required
message
string
required
data
object[]
required