Skip to main content
GET
/
v1
/
customers
/
{customerId}
/
orders
Get all orders for a specific customer
curl --request GET \
  --url https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{customerId}/orders \
  --header 'Authorization: Bearer <token>'
{
  "responseStatus": "OK",
  "message": "Request processed successfully",
  "data": {
    "orders": [
      {
        "status": "SCHEDULED",
        "totalAmount": 100,
        "currencyCode": "USD",
        "scheduledDate": "2019-01-01T00:00:00.000Z",
        "customer": {
          "customerReferenceId": "12345",
          "locale": "en_US",
          "email": "customer@example.com",
          "firstName": "Pat",
          "lastName": "Kake",
          "contactnumber": "5555551234",
          "middleName": "E",
          "segments": [
            "employee"
          ],
          "employeeId": "345",
          "status": "ACTIVE",
          "isDeleted": false,
          "DeletedAt": "2021-01-01T00:00:00.000Z",
          "createdAt": "2019-10-12T21:35:05.756Z",
          "updatedAt": "2021-10-14T05:40:55.997Z",
          "communicationPreference": {
            "email": true,
            "sms": true
          }
        },
        "isDeleted": false,
        "deletedAt": "2019-01-01T00:00:00.000Z",
        "id": "6384462ab645220008a4358a",
        "totalTax": 10,
        "totalDiscount": 10,
        "lineItems": [
          {
            "lineItemId": 1,
            "customAttributes": {
              "storeId": "60cb07fc20387b000821c5c3",
              "associateId": 1,
              "trackingUrl": "609436d21baded0008945b05"
            }
          }
        ],
        "createdAt": "2021-10-12T21:35:05.756Z",
        "updatedAt": "2021-10-14T05:40:55.997Z",
        "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
        "Retry": {
          "maxRetries": 3,
          "retryType": "PAYMENT RETRY",
          "retryAfterDays": 1,
          "retryCount": 2
        },
        "error": {
          "errorCode": "ORDER_NOT_FOUND",
          "errorMessage": "The order is not found"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerId
string
required

Customer reference ID General object ID

Example:

"606f01f441b8fc0008529916"

Response

Request processed successfully

Get orders by customer reference ID

responseStatus
string

Brief response status

Example:

"OK"

message
string

Full response message

Example:

"Request processed successfully"

data
object

Order details