Orders

The method is used for transferring orders.<br/>Sending an order again with the same <code>externalOrderId</code> updates the existing record instead of creating a second one.<br/>The method only writes orders. To get the orders already stored in the account, set up the <a href="https://docs.reteno.com/docs/exporting-data-to-the-bigquery-tables">export to BigQuery</a> and read the <code>orders</code> and <code>orderItems</code> tables.<br/>To learn more, read <a href="https://docs.reteno.com/docs/add-orders-api-method-for-order-transferring">Order Transfer Using the Generate event API Method.</a>

post/api/v1/orders

Request

Request body

Example request

{
  "orders": [
    {
      "externalOrderId": "BC12345678",
      "externalCustomerId": "TV12790",
      "date": "2022-05-14T10:11:10.7022176+03:00",
      "email": "john.doe@example.com",
      "marketId": "kyiv",
      "items": [
        {
          "externalItemId": "2345678",
          "name": "Smart Watch Series 7",
          "category": "Smart watches"
        }
      ]
    }
  ]
}

Response

Example response

{
  "failedOrders": [
    {
      "order": {
        "externalOrderId": "BC12345678",
        "externalCustomerId": "TV12790",
        "date": "2022-05-14T10:11:10.7022176+03:00",
        "email": "john.doe@example.com",
        "marketId": "kyiv",
        "items": [
          {
            "externalItemId": "2345678",
            "name": "Smart Watch Series 7",
            "category": "Smart watches"
          }
        ]
      }
    }
  ]
}

Changes