POST /{channelName}/order/{channelLinkId}

Your generic channel integration can use this endpoint to place a new order for a linked location. Note that, when sending a new order, Deliverect will check whether the party sending the order has the correct scope to do so. If not, they are considered unauthorized. The scope for generic channels is communicated to integrating parties together with the API Keys, and is checked in the request target URL only.

Path parameters

  • channelName string Required
  • channelLinkId string Required
application/json

Body

  • channelOrderId string Required
  • channelOrderDisplayId string Required
  • courier integer Required
  • payment object Required
  • payment.amount integer Required
  • payment.type integer Required
  • taxes.totaL integer
  • items array Required
  • items.plu string Required
  • items.name string Required
  • items.price string Required
  • items.quantity string Required
  • decimalDigits integer Required
  • deliveryIsAsap boolean Required

Responses

  • default application/json

    default

POST /{channelName}/order/{channelLinkId}
curl \
 --request POST 'https://api.staging.deliverect.com/{channelName}/order/{channelLinkId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[{"by":"","tip":100,"note":"This is a test note","items":[{"plu":"T5","name":"Bier (Hertog Jan)","price":325,"remark":"","quantity":1,"subItems":[{"plu":"SI2","name":"Fluitje","price":0,"remark":"","quantity":1,"subItems":[]}]},{"plu":"SO1","name":"Cali SALMON","price":550,"remark":"Don't add peper","quantity":1,"subItems":[]}],"table":"Table 23","channel":10000,"courier":"restaurant","payment":{"type":3,"amount":975},"customer":{"tin":"taxIdentificationNumber","name":"Customer name","email":"customer@deliverect.com","companyName":"Deliverect","phoneNumber":"0123456789"},"orderType":2,"pickupTime":"2020-03-09T17:17:38Z","deliveryCost":0,"deliveryTime":"2020-03-09T17:17:38Z","channelLinkId":"{{channelLinkId-001}}","decimalDigits":2,"discountTotal":0,"serviceCharge":0,"channelOrderId":"{{channelOrderId-001}}","deliveryIsAsap":true,"deliveryAddress":{"city":"Gent","street":"The Krook","postalCode":"9000","streetNumber":"4","extraAddressInfo":""},"numberOfCustomers":1,"orderIsAlreadyPaid":true,"estimatedPickupTime":"2020-03-09T17:17:38Z","channelOrderDisplayId":"{{channelOrderDisplayId-001}}"}]'
Request example
[
  {
    "by": "",
    "tip": 100,
    "note": "This is a test note",
    "items": [
      {
        "plu": "T5",
        "name": "Bier (Hertog Jan)",
        "price": 325,
        "remark": "",
        "quantity": 1,
        "subItems": [
          {
            "plu": "SI2",
            "name": "Fluitje",
            "price": 0,
            "remark": "",
            "quantity": 1,
            "subItems": []
          }
        ]
      },
      {
        "plu": "SO1",
        "name": "Cali SALMON",
        "price": 550,
        "remark": "Don't add peper",
        "quantity": 1,
        "subItems": []
      }
    ],
    "table": "Table 23",
    "channel": 10000,
    "courier": "restaurant",
    "payment": {
      "type": 3,
      "amount": 975
    },
    "customer": {
      "tin": "taxIdentificationNumber",
      "name": "Customer name",
      "email": "customer@deliverect.com",
      "companyName": "Deliverect",
      "phoneNumber": "0123456789"
    },
    "orderType": 2,
    "pickupTime": "2020-03-09T17:17:38Z",
    "deliveryCost": 0,
    "deliveryTime": "2020-03-09T17:17:38Z",
    "channelLinkId": "{{channelLinkId-001}}",
    "decimalDigits": 2,
    "discountTotal": 0,
    "serviceCharge": 0,
    "channelOrderId": "{{channelOrderId-001}}",
    "deliveryIsAsap": true,
    "deliveryAddress": {
      "city": "Gent",
      "street": "The Krook",
      "postalCode": "9000",
      "streetNumber": "4",
      "extraAddressInfo": ""
    },
    "numberOfCustomers": 1,
    "orderIsAlreadyPaid": true,
    "estimatedPickupTime": "2020-03-09T17:17:38Z",
    "channelOrderDisplayId": "{{channelOrderDisplayId-001}}"
  }
]
Response examples (default)
string
POST /{channelName}/order/{channelLinkId}/

Your channel integration can process a cancellation using the same endpoint used create a new order.

Path parameters

  • channelName string Required
  • channelLinkId string Required
application/json

Body

  • channelOrderId string Required
  • channelOrderDisplayId string Required
  • channelLinkId string Required
  • status integer Required
  • cancellationReason string Required

Responses

  • default application/json

    default

    Hide response attributes Show response attributes object
    • channelOrderId string Required
    • channelOrderDisplayId string Required
    • channelLinkId string Required
    • status integer Required
    • cancellationReason string Required
POST /{channelName}/order/{channelLinkId}/
curl \
 --request POST 'https://api.staging.deliverect.com/{channelName}/order/{channelLinkId}/' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[{"by":"customer","reason":"Customer cancelled the order","status":110,"timeStamp":"2020-03-09T17:17:38Z","channelOrderId":"{{channelOrderId-001}}"}]'
Request example
[
  {
    "by": "customer",
    "reason": "Customer cancelled the order",
    "status": 110,
    "timeStamp": "2020-03-09T17:17:38Z",
    "channelOrderId": "{{channelOrderId-001}}"
  }
]
Response examples (default)
{
  "status": 100,
  "channelLinkId": "5e****abc11dec0001****9b",
  "channelOrderId": "CXTDBKMZ-1229",
  "cancellationReason": "Customer requests order cancellation",
  "channelOrderDisplayId": "1229"
}