Customer Order Single Submission

This endpoint enables submission of a customer order details.

The customer order data should be provided as a json in the request body as described below.

If the customer order is accepted a 202 response code will be sent back, along with a UUID that uniquely identifies this request.

This functionality is enabled only for some organisations. Please contact support if you need to enable it.

Request

POST /v4/organisations/:trkref/customer_order

Parameters

Parameter Requirement Description
trkref mandatory Tracking reference of the organisation as assigned by Reevoo

JSON body

Attribute Requirement Description
trkref mandatory Tracking reference of the organisation
order_ref mandatory Unique identifier of order
order_date optional Optional if fulfilment_date present. Format: dd-mm-yyyy
fulfilment_date optional Optional if order_date present. Date when the order was fulfilled. Format: dd-mm-yyyy
language optional Language of the purchaser: Two letter code as per ISO 639-1
locale optional The locale associated to the order.The language codes are two-letter lowercase ISO language codes (such as “en”) as defined by ISO 639-1. The country codes are two-letter uppercase ISO country codes (such as “GB”) as defined by ISO 3166-1. For example “en-GB”
customer mandatory  
email mandatory The email address of the ordering customer
customer_ref   The unique identifier of the customer
title   Customer title as in Mr/Ms/Doctor, etc.
first_name   Customer first name
surname   Customer surname
postcode   Customer postcode
country   Customer Country. Two letter code of the country as per ISO 3166-1.
order_items mandatory Array of items ordered by the customer
sku mandatory The unique identifier of the product
price   The price of this order item. A string containing just digits and a comma to separate the decimals.
currency   The currency in which the price for this order_item is specified. Use the ISO 4217 code.
metadata   List of any other fields that will be linked to the order_item. Field names can contain only [a-z0-9] characters. There is not limit to the number of metadata items that you can have.
key_with_underscore   Any value you want to send

Example

{
  "trkref":"TRKREF123",
  "order_ref": "ABC123",
  "order_date": "10-12-2014",
  "fulfilment_date": "24-12-2014",
  "language": "en",
  "locale": "en-GB",
  "customer": {
    "email": "hello@example.com",
    "cutomer_ref": "1122",
    "title": "MR",
    "first_name": "John",
    "surname": "Brown",
    "postcode": "1122",
    "country": "GB"
  },
  "order_items": [
    {
      "sku": "PROD1",
      "price": "55,99",
      "currency": "GBP",
      "metadata": {
        "field_1": "Value 1",
        "field_2": "Value 2"
      }
    },
    {
      "sku": "PROD2",
      "price": 10,
      "currency": "GBP",
      "metadata": {
        "field_1": "Value 1",
        "field_2": "Value 2"
      }
    }
  ]
}

Response

By HTTP status:

  • 400 Bad Request
{
  "status": 400,
  "message": "Invalid TRKREF supplied"
}
  • 401 Unauthorized
  • You have provided wrong HTTP Basic Auth credentials
{
  "status": 401,
  "message": "Unauthorized"
}
  • 403 Unauthorized
  • Please contact support as your API key seems to not have permission to access this API endpoint
{
  "status": 403,
  "error": "Access denied"
}
  • 422 Unprocessable Entity
{
  "status": 422,
  "message": "No data provided",
  "errors": []
}
  • 202 Accepted
{
  "status": 202,
  "id": "UUID",
  "message": "Customer order accepted"
}