Create order

When a filter satisfy your need you can create an Order. If you have a rate card associated to your account the status will be automatically set as ACCEPTED when the Order is ready, WAITING_VALIDATION otherwise to be updated be your sales contact. Steps:

  1. Get Order status until status is ACCEPTED (limit 1 request per minute maximum) https://openapi.sirdata.io/customer/#tag/order/paths/~1customer~1order~1{id}/get

  2. Get Order segments statistics

let orderRequest = {
  "comment": "my first order",
  "limit": 2000,
  "limit_per_column": {
    "column_index": 4,
    "limits": {
      "01": 30,
      "05": 50
    }
  } 
}
let storageId = 123;
let filterId = 456;

fetch("https://gateway.sirdata.io/api/v1/public/customer/storage/"+storageId+"/filter/"+filterId+"/order", {
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "x-api-token": "XXXXX-XXXXX-XXXXX-XXXXX",
  },
  "body": JSON.stringify(orderRequest)
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});

If a limit per column has been set you can retrieve the volume per value limit using the Get Order https://openapi.sirdata.io/customer/#tag/order/paths/~1customer~1order~1{id}/get Property table.volume_per_limit contains volume by values. table.row_count is the total volume

Last updated