$kind: http-request
url: "{{sahara_local}}sales/deliveries"
method: POST
headers:
  username: textugapp
  apiKey: db03834002ed60dfa53963cc66bbeeb730142a16fd1bbbb6e1ebca862a798359
body:
  type: json
  content: "{\r

    \  \"order_id\": \"8685fab1-6119-471c-b50d-fd8ad0402a5e\",\r

    \  \"delivery_date\": \"2025-10-04\",\r

    \  \"delivery_method\": \"Truck\", //['Truck','Courier','Motorbike','Company
    Vehicle','Pickup by Customer','On-Site','Remote','Workshop'\r

    \  //\"tracking_number\": \"TRK-20251004-001\", //Nullable\r

    \  //\"carrier_id\": \"7373b2c3-4368-4755-b348-3ab9964baaf4\",//truck id
    Nullable \r

    \ // \"warehouse_id\": \"e4dd3b65-86ab-4def-9dcc-a41bd8a69fda\",//store
    where they are being delivered Nullable\r

    \ // \"delivery_address_id\":
    \"fa88eacd-7ed3-4dc1-841f-9c02f874c0a1\",//Nullable\r

    \ // \"route_id\": \"8430e92c-7a23-4513-89a3-6472359df881\",//Nullable\r

    \  \"created_by\": \"c01e44b1-66f3-4c17-bb1d-245e9dc3c978\",\r

    \  \"shipped_by\": \"f8f2a739-8a33-41a1-9d07-6ed6d087e5a4\",//Nullable\r

    \ // \"delivered_by\": \"db9d345c-67d6-49ef-9a31-f3d3a23d4c82\",//Nullable\r

    \  \"status\": \"ready_for_pickup\", //'draft','ready_for_pickup','shipped',
    'in_transit','delivered', 'returned','confirmed', 'disputed', 'failed',
    'canceled'\r

    \  \"lines\": [\r

    \    {\r

    \      \"order_line_id\": \"a49490dc-2ce7-4f2e-b1c6-d8da796e81e5\",\r

    \      \"item_id\": \"\",//Nullable\r

    \        \"uom_id\": \"84c3302e-c6ec-4021-ad98-78adbd024b59\",\r

    \      \"quantity_delivered\": 20,\r

    \      \"quantity_returned\": 2,\r

    \      \"condition\": \"Damaged\", //Good, Damaged\r

    \      \"notes\": \"2 units returned due to packaging damage\"\r

    \    }\r

    \  ]\r

    }\r\n"
auth:
  type: bearer
  credentials:
    token: "{{sahara_local_token}}"
order: 2000
