Order API

A new Order can be created using Order API. Integration partners will call the endpoint given below to send an order. When an order is sent, a new order is created into Steadfast systems.

Order API URL is different for different integration partners and it is shared with each customer separately.

2.1 Order Endpoint

The order endpoint will look like the one below.

Order API

POST https://middleware.podapp.com.au/passthrough/customerorder

Headers

Name
Type
Description

X-Steadfast-Api-Key

string

API Key Name that must be passed in request headers

Request Body

Name
Type
Description

request body

json

Please see below.

{
    "Message": "Ok",
    "ResponseMessage": {
        "Success": true,
        "TokenChanged": false,
        "ErrorMessage": "",
        "NewToken": "00000000000000000000000000000000"
    },
    "TotalQueryRows": 0
}

2.2 Order Request

{
  "CusRef": "XYRX1",
  "UserName": "XYRX1",
  "Email": "[email protected]",
  "OrderDate": "2022-04-27T17:39+02",
  "ReceiverName": "Rhys Davies",
  "ReceiverAddress":
  {
      "Address1": "Business Name",
      "Address2": "3 Rundle Street",
      "Suburb": "Adelaide",
      "State": "SA",
      "Postcode": "5000",
      "Country": "AUSTRALIA"
  },
  "Depot": "5W",
  "SrvCode": "ROAD",
  "ColCode": "5W",
  "Weight": 9,
  "Items": [
    {
      "ProductCode": "1000662",
      "Quantity": 2
    }
  ]
}

2.3 Order data validation

Order data will be validated and any validation errors will be sent back in response. Which-ever data field is required and is not present in the request, it will be added to the errors list in response.

Order data should follow these rules

  • Fields that are shown null are optional fields. Optional fields can be missed from the order object and the system will not validate those missing fields.

  • Example Request 2 shows JSON request body only mandatory fields.

  • OrderDate should be in ISO8601 format

  • ReceiverAddress should be passed as a JSON object

  • Items array is mandatory. An empty array of items will raise a validation error.

  • Items array is a list of product items objects with ProductCode and Quantity

2.4 Order Request - Response

When a new Order is created successfully in the system HTTP 200 is returened with this data response. In case there are validation errors, an array of errors ValidationErrors is returned in the response.

{
    "Success": true,
    "ErrorMessage": null,
    "ValidationErrors": []
}

Last updated

Was this helpful?