Query Order Status API

This is an optional API that can be used to query the Order Status

Overview

The Order Status API allows the Partner to query the status of their order after calling the Order Completion API. This API is optional and the preferred way of processing is via Configuring Webhooks

Pre Requisites

API Description

Headers

HeaderDescription/Value
AccessTokenThis is the Access Token field returned from the Authentication - Generate Access Token response. This should be in the format Bearer <AccessToken>
Content-Typeapplication/vnd.carry1st.order.distributor+json

URL Format

To retrieve a list of available payment methods, make a GET request to the following endpoint:

  • GET /api/orders/distributors/order-status?reference=?&externalReference=?&showCodes=?

List of URL Query Parameters

ParameterFormatMandatoryDescription
referenceStringYThis is the Carry1st reference received in the Complete Order Request
externalReferenceStringYThis is the Partner's externalReference. One of externalReference or reference fields needs to be populated
showCodesStringNIf set to true, then the response will also display the voucher codes for the order. If absent, this is set to falseby default

Response

The API will respond with a JSON object.

{
 "reference": "C-1239884379-P",
 "externalReference": "EXT-87456321",
 "productBundleSku": "BUNDLE-SKU-001",
 "quantity": 1,
 "recipientIdentifier": "USER-998877",
  "email": "[email protected]",
  "voucherCodes": [
     [
       {
         "label": "Code",
         "value": "444100070555"
       }
     ]
    ],
 "status": "PENDING"
}

Order Fields

NameTypeMandatoryDescription
referenceStringYThe recipientIdentifier that was sent in the response of the Complete Order Request
externalReferenceNumberYThe externalReference that was sent in the Complete Order Request
quantityNumberYThe quantity that was sent in the Complete Order Request
recipientIdentifierStringYThe recipientIdentifier that was sent in the Complete Order Request
emailStringYThe email that was sent in the Complete Order Request
voucherCodesArray of VoucherCodeNIf the product in the order is a voucher based product (i.e. it requires voucher codes), then this webhook will return the codes as a list of VoucherCode objects equal to the quantity of VoucherCodes requested for the product
statusStringYThe status of an order. Possible values:
  • NEW
  • ABANDONED
  • CANCELLED
  • PENDING
  • PARTIALLY_FULFILLED
  • SUCCESSFUL
  • FAILED
  • REFUND
  • PARTIAL_REFUND
  • CHARGEBACK
  • WAITING_WEBHOOK

VoucherCode Fields

NameTypeMandatoryDescription
VoucherCodeArray of VoucherCodePropertyYThis is a list of VoucherCodeProperty objects that make up the voucher code. All VoucherCodeProperty objects combined represent one VoucherCode.

VoucherCodeProperty Fields

Partners need to assume that VoucherCodeProperty objects will be different per product as each product uses a different set of properties for their codes.

NameTypeMandatoryDescription
labelStringYThis is the name of the voucher code property (e.g. PIN, Code, etc.)
valueStringYThis is the actual value of the property

HTTP Response Codes

The User Validation API may return the following HTTP Response Codes:

HTTP Status CodeNameDescription
200SuccessThis indicates that the request has been successful
400Bad RequestThe externalReference or reference could be invalid or missing from the request
401UnauthorizedThe Access Token might be missing or invalid (see Authentication - Generate Access Token)
403ForbiddenThe credentials provided might not have access to the resources required

Error Handling

See Handling Error Codes for more details on handling error responses.