{
  "info": {
    "_postman_id": "5f2c8e1a-9d3b-4c7e-8a6f-1b2d3e4f5a60",
    "name": "Tujyane Delivery API",
    "description": "Tujyane carries parcels for you, from a pickup point to your customer (the Recipient), with its own Delivery Partners. This collection has every Delivery API route, in the order you integrate them. The full documentation is at https://developers.tujyaneltd.com.\n\n## Setup\n\n1. Import the collection and the environment, then select the environment.\n2. Put your test key (`tjy_test_…`) in `apiKey`. `baseUrl` is `https://api.tujyaneltd.com/api/v1` for both test and live keys.\n3. Run **Get your account**, then **Send a test webhook**.\n\n## Keys and modes\n\nSend the key on every request as `Authorization: Bearer <key>`. The collection does this for you.\n\n- A `tjy_test_` key creates TEST Shipments. A simulated partner runs each one in about a minute. Tujyane bills nothing.\n- A `tjy_live_` key creates LIVE Shipments. Real Delivery Partners carry them, and you are billed for them.\n\nA key sees only the Shipments of its own mode. Keep keys on your server. Tujyane issues and revokes them.\n\n## Flow\n\n1. **Quote** (optional): get the price, and check that a partner is near the pickup. It creates nothing.\n2. **Create**: the Shipment is stored as `AWAITING_CONFIRMATION` with its fee. No partner is contacted yet.\n3. **Confirm**: confirm once your customer has paid you, before `confirmBy` (30 minutes after you create it). Tujyane then offers the Shipment to the nearest partners, one at a time.\n4. **Follow**: follow it by webhook (the source of truth), by the event stream, or with `GET`.\n\n| Status                  | Meaning                                                                                        |\n| ----------------------- | ---------------------------------------------------------------------------------------------- |\n| `AWAITING_CONFIRMATION` | Created, waiting for your confirmation                                                         |\n| `SEARCHING`             | Confirmed. Dispatch is looking for a partner                                                   |\n| `ASSIGNED`              | A partner accepted and is going to the pickup                                                  |\n| `PICKED_UP`             | The partner has the parcel                                                                     |\n| `DELIVERED`             | Delivered. Billed `fee`                                                                        |\n| `RETURNED`              | The partner could not deliver it (see `failureReason`) and brought the parcel back to the pickup. Billed `fee + returnFee` |\n| `NO_PARTNER_FOUND`      | No partner accepted within 20 minutes. Retry within 30 minutes, or let it lapse                |\n| `CANCELLED`             | Cancelled before pickup                                                                        |\n| `EXPIRED`               | Not confirmed by `confirmBy`                                                                   |\n\nIf the partner gives the parcel back before pickup, an `ASSIGNED` Shipment goes back to `SEARCHING` (event `shipment.partner_unassigned`).\n\n## Webhooks\n\nTujyane sends a `POST` to your webhook URL for every event. The body is `{ id, type, createdAt, mode, data: { shipment } }`, and the headers include `Tujyane-Event-Id`, `Tujyane-Event-Type` and `Tujyane-Signature: t=<unix seconds>,v1=<hex>`.\n\nTo verify an event, compute HMAC-SHA256 with your webhook secret over `<t>.<raw body>`, then compare the result with `v1`. Reject the event if `t` is more than 5 minutes from your clock.\n\nAnswer any 2xx within 10 seconds to acknowledge the event. If you do not, Tujyane retries 1 minute, 5 minutes, 30 minutes and 2 hours later, then every 6 hours, and stops 24 hours after the event. Events of one Shipment arrive in order. Use `id` to ignore an event you already handled.\n\n## Billing\n\nYou pay for a Shipment only when it ends `DELIVERED` (`fee`) or `RETURNED` (`fee + returnFee`, whatever the `failureReason`). Tujyane never bills TEST Shipments. Tujyane sends a statement each month, and you pay against it.\n\nA live create or confirm fails with `409 CREDIT_LIMIT_EXCEEDED` if your exposure plus this Shipment's `fee + returnFee` would pass your credit limit. Your exposure is what you owe now plus the `fee + returnFee` of each LIVE Shipment that has not ended yet.\n\n## Test mode\n\nThe simulated partner accepts 5 seconds after you confirm and picks up the parcel at 25 seconds. It delivers at about 55 seconds, with the right Delivery Code if your account uses codes. Put `no-partner` in the `reference` to get `NO_PARTNER_FOUND`. Put `unreachable`, `refused`, `wrong-address` or `damaged` in it to get `shipment.delivery_failed` with that reason, then `RETURNED`.\n\n## Errors, limits and retries\n\nAn error body is `{ statusCode, error, message }`, plus the fields of the error. A validation error is `{ statusCode: 400, message: \"Validation failed\", errors: [...] }`. Each request's saved examples show the errors it can return.\n\nEach key can make 120 requests a minute. Above that you get `429 RATE_LIMITED`, with a `Retry-After` header.\n\nEach `POST` that changes a Shipment accepts an `Idempotency-Key` header (8 to 255 characters). If you send the same key again within 24 hours, you get the first successful answer, and the work is not done a second time. This collection makes a new key for each send (`{{$guid}}`). In your code, keep the key for a request and send the same key when you retry that request.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Getting started",
      "description": "Run these two once per key: they prove the key works and that your webhook receiver accepts signed events.",
      "item": [
        {
          "name": "Get your account",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/client",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "client"
              ]
            },
            "description": "Returns the Delivery Client the key belongs to, the key's mode, and the webhook URL Tujyane posts events to.\n\nCall it first with a new key. `mode` is `TEST` for a `tjy_test_` key and `LIVE` for a `tjy_live_` key. `webhookUrl` is null until Tujyane sets it; ask your Tujyane contact to change it.\n\n- `200` the account\n- `401` missing, unknown or revoked key\n- `403 CLIENT_DISABLED` the account is disabled"
          },
          "response": [
            {
              "name": "200 Test key",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/client",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "client"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"3b6f1e2a-8c4d-4a7e-9f10-2d5c8b7a6e41\",\n  \"name\": \"Your business\",\n  \"mode\": \"TEST\",\n  \"webhookUrl\": \"https://api.example.com/tujyane/webhooks\"\n}"
            },
            {
              "name": "401 Bad key",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/client",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "client"
                  ]
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"message\": \"Send a valid Delivery API key as Authorization: Bearer <key>.\",\n  \"error\": \"Unauthorized\",\n  \"statusCode\": 401\n}"
            },
            {
              "name": "403 Account disabled",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/client",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "client"
                  ]
                }
              },
              "status": "Forbidden",
              "code": 403,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 403,\n  \"error\": \"CLIENT_DISABLED\",\n  \"message\": \"This Delivery Client is disabled. Contact Tujyane.\"\n}"
            }
          ]
        },
        {
          "name": "Send a test webhook",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/webhooks/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "webhooks",
                "test"
              ]
            },
            "description": "Posts a signed `ping` event to your webhook URL now and reports what your receiver answered. Tujyane stores nothing and does not retry the ping.\n\nThe ping has the same headers and signature as real events, with `type: \"ping\"` and `data: {}`. Use it to check signature verification before you create Shipments.\n\n- `200` with `delivered: true` when your receiver answered 2xx within 10 seconds\n- `200` with `delivered: false`, the status code and an error otherwise\n- `409 NO_WEBHOOK_URL` no webhook URL is set for your account"
          },
          "response": [
            {
              "name": "200 Delivered",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/webhooks/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "webhooks",
                    "test"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"delivered\": true,\n  \"statusCode\": 200,\n  \"error\": null\n}"
            },
            {
              "name": "200 Receiver refused",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/webhooks/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "webhooks",
                    "test"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"delivered\": false,\n  \"statusCode\": 401,\n  \"error\": \"The receiver answered HTTP 401\"\n}"
            },
            {
              "name": "200 Receiver timed out",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/webhooks/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "webhooks",
                    "test"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"delivered\": false,\n  \"statusCode\": null,\n  \"error\": \"No answer within 10 s\"\n}"
            },
            {
              "name": "409 No webhook URL",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/webhooks/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "webhooks",
                    "test"
                  ]
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"NO_WEBHOOK_URL\",\n  \"message\": \"No webhook URL is set for your account. Ask Tujyane to set one.\"\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Send a Shipment",
      "description": "Quote, create, confirm. Nothing reaches a Delivery Partner until you confirm.",
      "item": [
        {
          "name": "Quote a Shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "quote"
              ]
            },
            "description": "Prices a route and says whether a Delivery Partner is online near the pickup. Creates nothing; call it as often as you like, for example to show your customer the delivery price at checkout.\n\n`fee` is what you are billed if the Shipment is delivered, and is the price Create would store now. `returnFee` is added only if the Shipment ends `RETURNED`. `sizeClass` is `SMALL`, `MEDIUM`, `LARGE` or `FRAGILE` and defaults to `SMALL`; your contract has a tariff for some of them.\n\n`partnersAvailable` is true when an eligible partner is online within 8 km of the pickup; `pickupEtaSeconds` is their estimated time to the pickup, else null. It does not reserve the partner. A test key always answers true and 300.\n\n- `200` the quote\n- `400` validation failed\n- `409 NO_TARIFF` your contract has no tariff for this size class\n- `422 OUTSIDE_SERVICE_AREA` the pickup or drop-off is outside the area Tujyane serves (`point` says which)",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pickup\": {\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"dropoff\": {\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"sizeClass\": \"SMALL\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 Partner nearby",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "quote"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"pickup\": {\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"dropoff\": {\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"sizeClass\": \"SMALL\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"currency\": \"RWF\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"sizeClass\": \"SMALL\",\n  \"partnersAvailable\": true,\n  \"pickupEtaSeconds\": 410\n}"
            },
            {
              "name": "200 No partner nearby",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "quote"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"pickup\": {\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"dropoff\": {\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"sizeClass\": \"SMALL\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"currency\": \"RWF\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"sizeClass\": \"SMALL\",\n  \"partnersAvailable\": false,\n  \"pickupEtaSeconds\": null\n}"
            },
            {
              "name": "409 No tariff for this size",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "quote"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"pickup\": {\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"dropoff\": {\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"sizeClass\": \"SMALL\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"NO_TARIFF\",\n  \"sizeClass\": \"FRAGILE\",\n  \"message\": \"Your contract has no tariff for FRAGILE Shipments. Contact Tujyane.\"\n}"
            },
            {
              "name": "422 Outside the service area",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "quote"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"pickup\": {\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"dropoff\": {\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"sizeClass\": \"SMALL\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 422,\n  \"error\": \"OUTSIDE_SERVICE_AREA\",\n  \"point\": \"dropoff\",\n  \"message\": \"The dropoff is outside the area Tujyane delivers in.\"\n}"
            }
          ]
        },
        {
          "name": "Create a Shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments"
              ]
            },
            "description": "Creates a Shipment as `AWAITING_CONFIRMATION`, priced with your contract tariff. No partner is contacted. Confirm it within 30 minutes (`confirmBy`) or it becomes `EXPIRED`.\n\n`reference` is your own id for the order (1 to 100 characters, not required to be unique); it comes back on every event and is shown to the partner. Phones are Rwandan mobile numbers in any common form (`0788123456`, `+250788123456`) and come back as `250788123456`. `lat`/`lng` are the exact pickup and drop-off points; Tujyane uses them as sent. `notes` are optional, up to 500 characters, and shown to the partner.\n\n`alternateReceiver` (optional, `{ name, phone }`) is someone else who may take the parcel; the partner can call them. `parcelCount` (optional, 1 to 20, default 1) is how many packages the partner collects. If your account uses Delivery Codes, the answer has the 4-digit `deliveryCode` to give your customer: the partner must enter it to complete the delivery.\n\nWith a live key, the fee plus return fee must fit under your credit limit.\n\nThe test script stores the new id in the `shipmentId` collection variable.\n\n- `201` the Shipment\n- `400` validation failed, or a bad `Idempotency-Key`\n- `409 NO_TARIFF`, or `CREDIT_LIMIT_EXCEEDED` (live keys only)\n- `422 OUTSIDE_SERVICE_AREA`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"IH-20481\",\n  \"sizeClass\": \"SMALL\",\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"0788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"+250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"0788654322\"\n  },\n  \"parcelCount\": 2\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"IH-20481\",\n  \"sizeClass\": \"SMALL\",\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"0788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"+250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"AWAITING_CONFIRMATION\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": null,\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": null,\n  \"assignedAt\": null,\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": null,\n  \"endedBy\": null,\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null\n}"
            },
            {
              "name": "400 Invalid phone",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"IH-20481\",\n  \"sizeClass\": \"SMALL\",\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"0788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"+250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 400,\n  \"message\": \"Validation failed\",\n  \"errors\": [\n    {\n      \"origin\": \"string\",\n      \"code\": \"invalid_format\",\n      \"format\": \"regex\",\n      \"pattern\": \"/^(?:\\\\+?250|0)?(7[2389]\\\\d{7})$/\",\n      \"path\": [\n        \"recipient\",\n        \"phone\"\n      ],\n      \"message\": \"Enter a Rwandan mobile number\"\n    }\n  ]\n}"
            },
            {
              "name": "409 Credit limit reached",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"IH-20481\",\n  \"sizeClass\": \"SMALL\",\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"0788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"+250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"CREDIT_LIMIT_EXCEEDED\",\n  \"creditLimit\": \"500000.00\",\n  \"exposure\": \"497940.00\",\n  \"shipmentAmount\": \"3732.00\",\n  \"message\": \"This Shipment would take what you owe Tujyane past your credit limit of 500000.00 RWF. Pay your balance or contact Tujyane.\"\n}"
            },
            {
              "name": "422 Outside the service area",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"IH-20481\",\n  \"sizeClass\": \"SMALL\",\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"0788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"+250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 422,\n  \"error\": \"OUTSIDE_SERVICE_AREA\",\n  \"point\": \"dropoff\",\n  \"message\": \"The dropoff is outside the area Tujyane delivers in.\"\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 201) {",
                  "  pm.collectionVariables.set('shipmentId', pm.response.json().id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Confirm a Shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/confirm",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "confirm"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Call this once your customer has paid you. The Shipment moves to `SEARCHING` and Tujyane offers it to the nearest Delivery Partners, one at a time. With a test key, a simulated partner runs it instead.\n\nConfirming a Shipment that is already confirmed returns its current state and changes nothing. With a live key, the credit limit is checked again.\n\n- `200` the Shipment, `SEARCHING`\n- `404` no such Shipment for this key\n- `409 CONFIRMATION_EXPIRED` past `confirmBy`: create a new one\n- `409 SHIPMENT_CANCELLED` the Shipment was cancelled before confirmation: create a new one\n- `409 CREDIT_LIMIT_EXCEEDED` (live keys only)"
          },
          "response": [
            {
              "name": "200 Searching",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "confirm"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"SEARCHING\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": null,\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": null,\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": null,\n  \"endedBy\": null,\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null\n}"
            },
            {
              "name": "409 Confirmation expired",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "confirm"
                  ]
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"CONFIRMATION_EXPIRED\",\n  \"message\": \"This Shipment was not confirmed within 30 minutes of its creation. Create a new one.\"\n}"
            },
            {
              "name": "409 Credit limit reached",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "confirm"
                  ]
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"CREDIT_LIMIT_EXCEEDED\",\n  \"creditLimit\": \"500000.00\",\n  \"exposure\": \"497940.00\",\n  \"shipmentAmount\": \"3732.00\",\n  \"message\": \"This Shipment would take what you owe Tujyane past your credit limit of 500000.00 RWF. Pay your balance or contact Tujyane.\"\n}"
            },
            {
              "name": "404 Not found",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "confirm"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"message\": \"Shipment not found\",\n  \"error\": \"Not Found\",\n  \"statusCode\": 404\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Track",
      "description": "Webhooks are the source of truth. Use these to show live progress, to reconcile after an outage, and to debug webhook delivery.",
      "item": [
        {
          "name": "Get a Shipment",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Returns one Shipment as it is now. The same object is the `data.shipment` of every webhook and the `payload` of every stream frame.\n\n`partner` (first name, phone and vehicle) is set from `ASSIGNED` on and is null before that and after a cancellation. Timestamps are ISO 8601 in UTC; a step that has not happened is null.\n\n`deliveryCode` is the code for your customer when `deliveryProof` is `CODE`, else null. `deliveryConfirmedBy` says who confirmed a `DELIVERED` Shipment: `CODE`, `PARTNER` or `STAFF`. `deliveredAt` and `deliveredLocation` say when and where. `failedAt`, `failureReason` and `failureNote` are set when the partner could not deliver it.\n\n- `200` the Shipment\n- `404` no such Shipment for this key. A test key cannot see live Shipments and the other way round.\n- `429 RATE_LIMITED` more than 120 requests in a minute on this key"
          },
          "response": [
            {
              "name": "200 Assigned",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"ASSIGNED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": {\n    \"firstName\": \"Eric\",\n    \"phone\": \"250781112233\",\n    \"vehicle\": {\n      \"type\": \"MOTORCYCLE\",\n      \"plate\": \"RF 482 K\",\n      \"model\": \"TVS HLX 125\",\n      \"color\": \"Red\"\n    }\n  },\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": \"2026-11-03T08:16:22.000Z\",\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": null,\n  \"endedBy\": null,\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null\n}"
            },
            {
              "name": "200 Delivered",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"DELIVERED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": {\n    \"firstName\": \"Eric\",\n    \"phone\": \"250781112233\",\n    \"vehicle\": {\n      \"type\": \"MOTORCYCLE\",\n      \"plate\": \"RF 482 K\",\n      \"model\": \"TVS HLX 125\",\n      \"color\": \"Red\"\n    }\n  },\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": \"2026-11-03T08:16:22.000Z\",\n  \"partnerArrivedPickupAt\": \"2026-11-03T08:21:10.000Z\",\n  \"pickedUpAt\": \"2026-11-03T08:24:31.000Z\",\n  \"partnerArrivingAt\": \"2026-11-03T08:37:02.000Z\",\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": \"2026-11-03T08:39:48.000Z\",\n  \"deliveredLocation\": {\n    \"lat\": -1.9495,\n    \"lng\": 30.1265\n  },\n  \"deliveryConfirmedBy\": \"CODE\",\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": \"2026-11-03T08:39:48.000Z\",\n  \"endedBy\": \"PARTNER\",\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": \"2026-11-04T08:39:48.000Z\"\n}"
            },
            {
              "name": "200 Returned",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"c41a9e07-3d5b-4f8a-b2e6-9a1c0d7f5e32\",\n  \"reference\": \"IH-20476\",\n  \"mode\": \"LIVE\",\n  \"status\": \"RETURNED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2384.00\",\n  \"returnFee\": \"1107.00\",\n  \"distanceMeters\": 4257,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20476.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250722334455\",\n    \"addressText\": \"KK 15 Rd 3, Kicukiro\",\n    \"notes\": null,\n    \"lat\": -1.9706,\n    \"lng\": 30.1044\n  },\n  \"alternateReceiver\": null,\n  \"parcelCount\": 1,\n  \"partner\": {\n    \"firstName\": \"Claude\",\n    \"phone\": \"250783334455\",\n    \"vehicle\": {\n      \"type\": \"MOTORCYCLE\",\n      \"plate\": \"RD 917 B\",\n      \"model\": \"Bajaj Boxer 150\",\n      \"color\": null\n    }\n  },\n  \"createdAt\": \"2026-11-03T07:40:12.000Z\",\n  \"confirmBy\": \"2026-11-03T08:10:12.000Z\",\n  \"confirmedAt\": \"2026-11-03T07:41:03.000Z\",\n  \"assignedAt\": \"2026-11-03T07:42:10.000Z\",\n  \"partnerArrivedPickupAt\": \"2026-11-03T07:47:55.000Z\",\n  \"pickedUpAt\": \"2026-11-03T07:50:20.000Z\",\n  \"partnerArrivingAt\": \"2026-11-03T08:01:44.000Z\",\n  \"deliveryProof\": \"NONE\",\n  \"deliveryCode\": null,\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": \"2026-11-03T08:03:15.000Z\",\n  \"failureReason\": \"RECIPIENT_UNREACHABLE\",\n  \"failureNote\": null,\n  \"endedAt\": \"2026-11-03T08:24:02.000Z\",\n  \"endedBy\": \"PARTNER\",\n  \"endReason\": \"RECIPIENT_UNREACHABLE\",\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null\n}"
            },
            {
              "name": "404 Not found",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"message\": \"Shipment not found\",\n  \"error\": \"Not Found\",\n  \"statusCode\": 404\n}"
            },
            {
              "name": "429 Rate limited",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01"
                  ]
                }
              },
              "status": "Too Many Requests",
              "code": 429,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                },
                {
                  "key": "Retry-After",
                  "value": "37"
                }
              ],
              "body": "{\n  \"statusCode\": 429,\n  \"error\": \"RATE_LIMITED\",\n  \"retryAfterSeconds\": 37,\n  \"message\": \"Too many requests. This key may make 120 requests a minute.\"\n}"
            }
          ]
        },
        {
          "name": "List Shipments",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments?limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "1 to 100. Default 20."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "`nextCursor` from the previous page.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "DELIVERED",
                  "description": "One status.",
                  "disabled": true
                },
                {
                  "key": "reference",
                  "value": "IH-20481",
                  "description": "Your reference, exact match.",
                  "disabled": true
                },
                {
                  "key": "createdFrom",
                  "value": "2026-11-01T00:00:00Z",
                  "description": "ISO 8601 with an offset. Created at or after.",
                  "disabled": true
                },
                {
                  "key": "createdTo",
                  "value": "2026-11-30T23:59:59Z",
                  "description": "ISO 8601 with an offset. Created at or before.",
                  "disabled": true
                }
              ]
            },
            "description": "Your Shipments for this key's mode, newest first. Filters combine. Enable the ones you need in Params.\n\nTo page, pass `nextCursor` as `cursor` until `hasMore` is false. A cursor is opaque; do not build or change one.\n\n- `200` a page\n- `400` validation failed. A cursor that Tujyane did not give you is ignored, and the first page comes back."
          },
          "response": [
            {
              "name": "200 A page",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments?limit=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments"
                  ],
                  "query": [
                    {
                      "key": "limit",
                      "value": "20",
                      "description": "1 to 100. Default 20."
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "description": "`nextCursor` from the previous page.",
                      "disabled": true
                    },
                    {
                      "key": "status",
                      "value": "DELIVERED",
                      "description": "One status.",
                      "disabled": true
                    },
                    {
                      "key": "reference",
                      "value": "IH-20481",
                      "description": "Your reference, exact match.",
                      "disabled": true
                    },
                    {
                      "key": "createdFrom",
                      "value": "2026-11-01T00:00:00Z",
                      "description": "ISO 8601 with an offset. Created at or after.",
                      "disabled": true
                    },
                    {
                      "key": "createdTo",
                      "value": "2026-11-30T23:59:59Z",
                      "description": "ISO 8601 with an offset. Created at or before.",
                      "disabled": true
                    }
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"items\": [\n    {\n      \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n      \"reference\": \"IH-20481\",\n      \"mode\": \"LIVE\",\n      \"status\": \"DELIVERED\",\n      \"sizeClass\": \"SMALL\",\n      \"fee\": \"2518.00\",\n      \"returnFee\": \"1214.00\",\n      \"distanceMeters\": 4671,\n      \"pickup\": {\n        \"name\": \"Kacyiru Pharmacy\",\n        \"phone\": \"250788123456\",\n        \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n        \"notes\": \"Counter 2. Ask for order IH-20476.\",\n        \"lat\": -1.9367,\n        \"lng\": 30.0866\n      },\n      \"recipient\": {\n        \"name\": \"Aline Uwase\",\n        \"phone\": \"250788654321\",\n        \"addressText\": \"KG 11 Ave 24, Kimironko\",\n        \"notes\": \"Blue gate. Call on arrival.\",\n        \"lat\": -1.9496,\n        \"lng\": 30.1266\n      },\n      \"alternateReceiver\": {\n        \"name\": \"Jean Habimana\",\n        \"phone\": \"250788654322\"\n      },\n      \"parcelCount\": 2,\n      \"partner\": {\n        \"firstName\": \"Eric\",\n        \"phone\": \"250781112233\",\n        \"vehicle\": {\n          \"type\": \"MOTORCYCLE\",\n          \"plate\": \"RF 482 K\",\n          \"model\": \"TVS HLX 125\",\n          \"color\": \"Red\"\n        }\n      },\n      \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n      \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n      \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n      \"assignedAt\": \"2026-11-03T08:16:22.000Z\",\n      \"partnerArrivedPickupAt\": \"2026-11-03T08:21:10.000Z\",\n      \"pickedUpAt\": \"2026-11-03T08:24:31.000Z\",\n      \"partnerArrivingAt\": \"2026-11-03T08:37:02.000Z\",\n      \"deliveryProof\": \"CODE\",\n      \"deliveryCode\": \"4821\",\n      \"deliveredAt\": \"2026-11-03T08:39:48.000Z\",\n      \"deliveredLocation\": {\n        \"lat\": -1.9495,\n        \"lng\": 30.1265\n      },\n      \"deliveryConfirmedBy\": \"CODE\",\n      \"failedAt\": null,\n      \"failureReason\": null,\n      \"failureNote\": null,\n      \"endedAt\": \"2026-11-03T08:39:48.000Z\",\n      \"endedBy\": \"PARTNER\",\n      \"endReason\": null,\n      \"noPartnerDeadlineAt\": null,\n      \"problemReportDeadlineAt\": \"2026-11-04T08:39:48.000Z\"\n    },\n    {\n      \"id\": \"c41a9e07-3d5b-4f8a-b2e6-9a1c0d7f5e32\",\n      \"reference\": \"IH-20476\",\n      \"mode\": \"LIVE\",\n      \"status\": \"RETURNED\",\n      \"sizeClass\": \"SMALL\",\n      \"fee\": \"2384.00\",\n      \"returnFee\": \"1107.00\",\n      \"distanceMeters\": 4257,\n      \"pickup\": {\n        \"name\": \"Kacyiru Pharmacy\",\n        \"phone\": \"250788123456\",\n        \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n        \"notes\": \"Counter 2. Ask for order IH-20476.\",\n        \"lat\": -1.9367,\n        \"lng\": 30.0866\n      },\n      \"recipient\": {\n        \"name\": \"Jean Habimana\",\n        \"phone\": \"250722334455\",\n        \"addressText\": \"KK 15 Rd 3, Kicukiro\",\n        \"notes\": null,\n        \"lat\": -1.9706,\n        \"lng\": 30.1044\n      },\n      \"alternateReceiver\": null,\n      \"parcelCount\": 1,\n      \"partner\": {\n        \"firstName\": \"Claude\",\n        \"phone\": \"250783334455\",\n        \"vehicle\": {\n          \"type\": \"MOTORCYCLE\",\n          \"plate\": \"RD 917 B\",\n          \"model\": \"Bajaj Boxer 150\",\n          \"color\": null\n        }\n      },\n      \"createdAt\": \"2026-11-03T07:40:12.000Z\",\n      \"confirmBy\": \"2026-11-03T08:10:12.000Z\",\n      \"confirmedAt\": \"2026-11-03T07:41:03.000Z\",\n      \"assignedAt\": \"2026-11-03T07:42:10.000Z\",\n      \"partnerArrivedPickupAt\": \"2026-11-03T07:47:55.000Z\",\n      \"pickedUpAt\": \"2026-11-03T07:50:20.000Z\",\n      \"partnerArrivingAt\": \"2026-11-03T08:01:44.000Z\",\n      \"deliveryProof\": \"NONE\",\n      \"deliveryCode\": null,\n      \"deliveredAt\": null,\n      \"deliveredLocation\": null,\n      \"deliveryConfirmedBy\": null,\n      \"failedAt\": \"2026-11-03T08:03:15.000Z\",\n      \"failureReason\": \"RECIPIENT_UNREACHABLE\",\n      \"failureNote\": null,\n      \"endedAt\": \"2026-11-03T08:24:02.000Z\",\n      \"endedBy\": \"PARTNER\",\n      \"endReason\": \"RECIPIENT_UNREACHABLE\",\n      \"noPartnerDeadlineAt\": null,\n      \"problemReportDeadlineAt\": null\n    }\n  ],\n  \"nextCursor\": \"eyJjIjoiMjAyNi0xMS0wM1QwNzo0MDoxMi4wMDBaIiwiaSI6ImM0MWE5ZTA3LTNkNWItNGY4YS1iMmU2LTlhMWMwZDdmNWUzMiJ9\",\n  \"hasMore\": true\n}"
            }
          ]
        },
        {
          "name": "Get the Shipment timeline",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "events"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Every event of the Shipment, oldest first (up to 200), with the delivery state of its webhook. Each `id` is the webhook's event id.\n\n`webhook.status` is `PENDING` (waiting or retrying), `PROCESSING` (being sent), `DELIVERED`, `FAILED` (gave up 24 hours after the event) or `SKIPPED` (no webhook URL was set). `lastStatusCode` is your receiver's last answer, null when it did not answer.\n\n- `200` the timeline\n- `404` no such Shipment for this key"
          },
          "response": [
            {
              "name": "200 Delivered Shipment",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/events",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "events"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"items\": [\n    {\n      \"id\": \"b1f0d6e2-4a3c-4e8b-9f21-6c7d8e9f0a11\",\n      \"type\": \"shipment.created\",\n      \"createdAt\": \"2026-11-03T08:14:05.212Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:14:06.000Z\"\n      }\n    },\n    {\n      \"id\": \"c2a1e7f3-5b4d-4f9c-8a32-7d8e9f0a1b22\",\n      \"type\": \"shipment.searching\",\n      \"createdAt\": \"2026-11-03T08:15:40.381Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:15:41.000Z\"\n      }\n    },\n    {\n      \"id\": \"d3b2f8a4-6c5e-4a0d-9b43-8e9f0a1b2c33\",\n      \"type\": \"shipment.assigned\",\n      \"createdAt\": \"2026-11-03T08:16:22.507Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 3,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:22:30.000Z\"\n      }\n    },\n    {\n      \"id\": \"e4c3a9b5-7d6f-4b1e-8c54-9f0a1b2c3d44\",\n      \"type\": \"shipment.partner_arrived_pickup\",\n      \"createdAt\": \"2026-11-03T08:21:10.114Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:22:31.000Z\"\n      }\n    },\n    {\n      \"id\": \"f5d4b0c6-8e7a-4c2f-9d65-0a1b2c3d4e55\",\n      \"type\": \"shipment.picked_up\",\n      \"createdAt\": \"2026-11-03T08:24:31.902Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:24:32.000Z\"\n      }\n    },\n    {\n      \"id\": \"a6e5c1d7-9f8b-4d3a-8e76-1b2c3d4e5f66\",\n      \"type\": \"shipment.partner_arriving\",\n      \"createdAt\": \"2026-11-03T08:37:02.448Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:37:03.000Z\"\n      }\n    },\n    {\n      \"id\": \"b7f6d2e8-0a9c-4e4b-9f87-2c3d4e5f6a77\",\n      \"type\": \"shipment.delivered\",\n      \"createdAt\": \"2026-11-03T08:39:48.630Z\",\n      \"webhook\": {\n        \"status\": \"DELIVERED\",\n        \"attempts\": 1,\n        \"lastStatusCode\": 200,\n        \"deliveredAt\": \"2026-11-03T08:39:49.000Z\"\n      }\n    }\n  ]\n}"
            },
            {
              "name": "404 Not found",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/events",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "events"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"message\": \"Shipment not found\",\n  \"error\": \"Not Found\",\n  \"statusCode\": 404\n}"
            }
          ]
        },
        {
          "name": "Stream a Shipment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "text/event-stream"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/stream",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "stream"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Server-Sent Events for one Shipment, for a live map or status screen. Open it from your backend with the API key; never expose the key to a browser or app.\n\nEach frame's `event` is its type and its `data` is `{ type, payload, ts }` (`ts` in milliseconds):\n\n- `shipment.snapshot` once on connect, before any change: the Shipment as it is now\n- every `shipment.*` event that webhooks also carry, with the Shipment as `payload`\n- `partner.position` `{ lat, lng, at, etaSeconds }` every 5 seconds while a partner has it (about every 3 seconds after pickup in test mode). `etaSeconds` is to the pickup before `PICKED_UP` and to the Recipient after.\n- `ping` `{ ts }` on connect and every 25 seconds\n\nNothing is replayed. After a reconnect the snapshot gives the current state; read the timeline for events you missed. The stream stays open after the Shipment ends; close it yourself.\n\n- `200` `text/event-stream`\n- `400` the id is not a UUID\n- `404` no such Shipment for this key"
          },
          "response": [
            {
              "name": "200 Event stream",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "text/event-stream"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/stream",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "stream"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "text",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/event-stream"
                }
              ],
              "body": "event: shipment.snapshot\nid: 1\ndata: {\"type\":\"shipment.snapshot\",\"payload\":{\"id\":\"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\"reference\":\"IH-20481\",\"mode\":\"LIVE\",\"status\":\"ASSIGNED\",\"sizeClass\":\"SMALL\",\"fee\":\"2518.00\",\"returnFee\":\"1214.00\",\"distanceMeters\":4671,\"pickup\":{\"name\":\"Kacyiru Pharmacy\",\"phone\":\"250788123456\",\"addressText\":\"KG 7 Ave 14, Kacyiru\",\"notes\":\"Counter 2. Ask for order IH-20481.\",\"lat\":-1.9367,\"lng\":30.0866},\"recipient\":{\"name\":\"Aline Uwase\",\"phone\":\"250788654321\",\"addressText\":\"KG 11 Ave 24, Kimironko\",\"notes\":\"Blue gate. Call on arrival.\",\"lat\":-1.9496,\"lng\":30.1266},\"alternateReceiver\":{\"name\":\"Jean Habimana\",\"phone\":\"250788654322\"},\"parcelCount\":2,\"partner\":{\"firstName\":\"Eric\",\"phone\":\"250781112233\",\"vehicle\":{\"type\":\"MOTORCYCLE\",\"plate\":\"RF 482 K\",\"model\":\"TVS HLX 125\",\"color\":\"Red\"}},\"createdAt\":\"2026-11-03T08:14:05.000Z\",\"confirmBy\":\"2026-11-03T08:44:05.000Z\",\"confirmedAt\":\"2026-11-03T08:15:40.000Z\",\"assignedAt\":\"2026-11-03T08:16:22.000Z\",\"partnerArrivedPickupAt\":null,\"pickedUpAt\":null,\"partnerArrivingAt\":null,\"deliveryProof\":\"CODE\",\"deliveryCode\":\"4821\",\"deliveredAt\":null,\"deliveredLocation\":null,\"deliveryConfirmedBy\":null,\"failedAt\":null,\"failureReason\":null,\"failureNote\":null,\"endedAt\":null,\"endedBy\":null,\"endReason\":null,\"noPartnerDeadlineAt\":null,\"problemReportDeadlineAt\":null},\"ts\":1793696400120}\n\nevent: ping\nid: 2\ndata: {\"ts\":1793696400121}\n\nevent: partner.position\nid: 3\ndata: {\"type\":\"partner.position\",\"payload\":{\"lat\":-1.9392,\"lng\":30.0871,\"at\":\"2026-11-03T08:20:05.000Z\",\"etaSeconds\":95},\"ts\":1793696405210}\n\nevent: shipment.partner_arrived_pickup\nid: 4\ndata: {\"type\":\"shipment.partner_arrived_pickup\",\"payload\":{\"id\":\"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\"reference\":\"IH-20481\",\"mode\":\"LIVE\",\"status\":\"ASSIGNED\",\"sizeClass\":\"SMALL\",\"fee\":\"2518.00\",\"returnFee\":\"1214.00\",\"distanceMeters\":4671,\"pickup\":{\"name\":\"Kacyiru Pharmacy\",\"phone\":\"250788123456\",\"addressText\":\"KG 7 Ave 14, Kacyiru\",\"notes\":\"Counter 2. Ask for order IH-20481.\",\"lat\":-1.9367,\"lng\":30.0866},\"recipient\":{\"name\":\"Aline Uwase\",\"phone\":\"250788654321\",\"addressText\":\"KG 11 Ave 24, Kimironko\",\"notes\":\"Blue gate. Call on arrival.\",\"lat\":-1.9496,\"lng\":30.1266},\"alternateReceiver\":{\"name\":\"Jean Habimana\",\"phone\":\"250788654322\"},\"parcelCount\":2,\"partner\":{\"firstName\":\"Eric\",\"phone\":\"250781112233\",\"vehicle\":{\"type\":\"MOTORCYCLE\",\"plate\":\"RF 482 K\",\"model\":\"TVS HLX 125\",\"color\":\"Red\"}},\"createdAt\":\"2026-11-03T08:14:05.000Z\",\"confirmBy\":\"2026-11-03T08:44:05.000Z\",\"confirmedAt\":\"2026-11-03T08:15:40.000Z\",\"assignedAt\":\"2026-11-03T08:16:22.000Z\",\"partnerArrivedPickupAt\":\"2026-11-03T08:21:10.000Z\",\"pickedUpAt\":null,\"partnerArrivingAt\":null,\"deliveryProof\":\"CODE\",\"deliveryCode\":\"4821\",\"deliveredAt\":null,\"deliveredLocation\":null,\"deliveryConfirmedBy\":null,\"failedAt\":null,\"failureReason\":null,\"failureNote\":null,\"endedAt\":null,\"endedBy\":null,\"endReason\":null,\"noPartnerDeadlineAt\":null,\"problemReportDeadlineAt\":null},\"ts\":1793696470330}\n\nevent: ping\nid: 5\ndata: {\"ts\":1793696425122}\n\nevent: shipment.picked_up\nid: 6\ndata: {\"type\":\"shipment.picked_up\",\"payload\":{\"id\":\"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\"reference\":\"IH-20481\",\"mode\":\"LIVE\",\"status\":\"PICKED_UP\",\"sizeClass\":\"SMALL\",\"fee\":\"2518.00\",\"returnFee\":\"1214.00\",\"distanceMeters\":4671,\"pickup\":{\"name\":\"Kacyiru Pharmacy\",\"phone\":\"250788123456\",\"addressText\":\"KG 7 Ave 14, Kacyiru\",\"notes\":\"Counter 2. Ask for order IH-20481.\",\"lat\":-1.9367,\"lng\":30.0866},\"recipient\":{\"name\":\"Aline Uwase\",\"phone\":\"250788654321\",\"addressText\":\"KG 11 Ave 24, Kimironko\",\"notes\":\"Blue gate. Call on arrival.\",\"lat\":-1.9496,\"lng\":30.1266},\"alternateReceiver\":{\"name\":\"Jean Habimana\",\"phone\":\"250788654322\"},\"parcelCount\":2,\"partner\":{\"firstName\":\"Eric\",\"phone\":\"250781112233\",\"vehicle\":{\"type\":\"MOTORCYCLE\",\"plate\":\"RF 482 K\",\"model\":\"TVS HLX 125\",\"color\":\"Red\"}},\"createdAt\":\"2026-11-03T08:14:05.000Z\",\"confirmBy\":\"2026-11-03T08:44:05.000Z\",\"confirmedAt\":\"2026-11-03T08:15:40.000Z\",\"assignedAt\":\"2026-11-03T08:16:22.000Z\",\"partnerArrivedPickupAt\":\"2026-11-03T08:21:10.000Z\",\"pickedUpAt\":\"2026-11-03T08:24:31.000Z\",\"partnerArrivingAt\":null,\"deliveryProof\":\"CODE\",\"deliveryCode\":\"4821\",\"deliveredAt\":null,\"deliveredLocation\":null,\"deliveryConfirmedBy\":null,\"failedAt\":null,\"failureReason\":null,\"failureNote\":null,\"endedAt\":null,\"endedBy\":null,\"endReason\":null,\"noPartnerDeadlineAt\":null,\"problemReportDeadlineAt\":null},\"ts\":1793696671480}\n\n"
            }
          ]
        }
      ]
    },
    {
      "name": "Change",
      "description": "Cancel before pickup, search again after no partner was found, or report a delivered parcel as not received.",
      "item": [
        {
          "name": "Cancel a Shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Cancels a Shipment that has not been picked up. It costs nothing. If a partner already accepted (`ASSIGNED`), `offence` is true and Tujyane records an offence against your account. Test keys record nothing.\n\n`reason` is optional (up to 300 characters) and comes back as `endReason`.\n\nCancelling twice answers `409 ILLEGAL_SHIPMENT_TRANSITION` the second time unless you resend the same `Idempotency-Key`.\n\n- `200` the Shipment, `CANCELLED`, plus `offence`\n- `404` no such Shipment for this key\n- `409 CANNOT_CANCEL_AFTER_PICKUP` the partner has the parcel\n- `409 ILLEGAL_SHIPMENT_TRANSITION` the Shipment already ended",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Customer cancelled the order\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 Cancelled while searching",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "cancel"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"Customer cancelled the order\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"CANCELLED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": null,\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": null,\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": \"2026-11-03T08:16:05.000Z\",\n  \"endedBy\": \"CLIENT\",\n  \"endReason\": \"Customer cancelled the order\",\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null,\n  \"offence\": false\n}"
            },
            {
              "name": "200 Cancelled after a partner accepted",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "cancel"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"Customer cancelled the order\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"CANCELLED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": null,\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": \"2026-11-03T08:16:22.000Z\",\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": \"2026-11-03T08:18:30.000Z\",\n  \"endedBy\": \"CLIENT\",\n  \"endReason\": \"Customer cancelled the order\",\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null,\n  \"offence\": true\n}"
            },
            {
              "name": "409 Already picked up",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "cancel"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"Customer cancelled the order\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"CANNOT_CANCEL_AFTER_PICKUP\",\n  \"message\": \"A partner already has this parcel, so it can no longer be cancelled.\"\n}"
            },
            {
              "name": "409 Already ended",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "cancel"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"Customer cancelled the order\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"ILLEGAL_SHIPMENT_TRANSITION\",\n  \"from\": \"CANCELLED\",\n  \"to\": \"CANCELLED\",\n  \"actor\": \"CLIENT\",\n  \"message\": \"A Shipment cannot move from CANCELLED to CANCELLED by CLIENT\"\n}"
            }
          ]
        },
        {
          "name": "Retry a Shipment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/retry",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "retry"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Starts a new search for a Shipment that is `NO_PARTNER_FOUND`. Allowed until `noPartnerDeadlineAt`, 30 minutes after no partner was found. After that, create a new Shipment.\n\nA `NO_PARTNER_FOUND` Shipment you do not retry costs nothing.\n\n- `200` the Shipment, `SEARCHING` again\n- `404` no such Shipment for this key\n- `409 RETRY_CLOSED` not `NO_PARTNER_FOUND`, or the 30 minutes have passed"
          },
          "response": [
            {
              "name": "200 Searching again",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/retry",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "retry"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"SEARCHING\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": null,\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": null,\n  \"partnerArrivedPickupAt\": null,\n  \"pickedUpAt\": null,\n  \"partnerArrivingAt\": null,\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": null,\n  \"deliveredLocation\": null,\n  \"deliveryConfirmedBy\": null,\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": null,\n  \"endedBy\": null,\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": null\n}"
            },
            {
              "name": "409 Retry window closed",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/retry",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "retry"
                  ]
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"RETRY_CLOSED\",\n  \"message\": \"This Shipment can be retried only within 30 minutes of NO_PARTNER_FOUND. Create a new Shipment instead.\"\n}"
            }
          ]
        },
        {
          "name": "Report a Shipment not received",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/delivery-api/shipments/:id/not-received",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "delivery-api",
                "shipments",
                ":id",
                "not-received"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{shipmentId}}",
                  "description": "The Shipment id returned by Create a Shipment."
                }
              ]
            },
            "description": "Tells Tujyane the Recipient did not get a `DELIVERED` Shipment. Allowed once, before `problemReportDeadlineAt` (24 hours after delivery). `note` is required, 1 to 500 characters.\n\nThe status stays `DELIVERED` and a `shipment.not_received_reported` event follows. Tujyane staff look into it and may credit your balance.\n\n- `200` the Shipment\n- `404` no such Shipment for this key\n- `409 NOT_DELIVERED`, `REPORT_WINDOW_CLOSED` or `ALREADY_REPORTED`",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"Customer says the parcel did not arrive and nobody called her.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 Reported",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/not-received",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "not-received"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"note\": \"Customer says the parcel did not arrive and nobody called her.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"id\": \"7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01\",\n  \"reference\": \"IH-20481\",\n  \"mode\": \"LIVE\",\n  \"status\": \"DELIVERED\",\n  \"sizeClass\": \"SMALL\",\n  \"fee\": \"2518.00\",\n  \"returnFee\": \"1214.00\",\n  \"distanceMeters\": 4671,\n  \"pickup\": {\n    \"name\": \"Kacyiru Pharmacy\",\n    \"phone\": \"250788123456\",\n    \"addressText\": \"KG 7 Ave 14, Kacyiru\",\n    \"notes\": \"Counter 2. Ask for order IH-20481.\",\n    \"lat\": -1.9367,\n    \"lng\": 30.0866\n  },\n  \"recipient\": {\n    \"name\": \"Aline Uwase\",\n    \"phone\": \"250788654321\",\n    \"addressText\": \"KG 11 Ave 24, Kimironko\",\n    \"notes\": \"Blue gate. Call on arrival.\",\n    \"lat\": -1.9496,\n    \"lng\": 30.1266\n  },\n  \"alternateReceiver\": {\n    \"name\": \"Jean Habimana\",\n    \"phone\": \"250788654322\"\n  },\n  \"parcelCount\": 2,\n  \"partner\": {\n    \"firstName\": \"Eric\",\n    \"phone\": \"250781112233\",\n    \"vehicle\": {\n      \"type\": \"MOTORCYCLE\",\n      \"plate\": \"RF 482 K\",\n      \"model\": \"TVS HLX 125\",\n      \"color\": \"Red\"\n    }\n  },\n  \"createdAt\": \"2026-11-03T08:14:05.000Z\",\n  \"confirmBy\": \"2026-11-03T08:44:05.000Z\",\n  \"confirmedAt\": \"2026-11-03T08:15:40.000Z\",\n  \"assignedAt\": \"2026-11-03T08:16:22.000Z\",\n  \"partnerArrivedPickupAt\": \"2026-11-03T08:21:10.000Z\",\n  \"pickedUpAt\": \"2026-11-03T08:24:31.000Z\",\n  \"partnerArrivingAt\": \"2026-11-03T08:37:02.000Z\",\n  \"deliveryProof\": \"CODE\",\n  \"deliveryCode\": \"4821\",\n  \"deliveredAt\": \"2026-11-03T08:39:48.000Z\",\n  \"deliveredLocation\": {\n    \"lat\": -1.9495,\n    \"lng\": 30.1265\n  },\n  \"deliveryConfirmedBy\": \"CODE\",\n  \"failedAt\": null,\n  \"failureReason\": null,\n  \"failureNote\": null,\n  \"endedAt\": \"2026-11-03T08:39:48.000Z\",\n  \"endedBy\": \"PARTNER\",\n  \"endReason\": null,\n  \"noPartnerDeadlineAt\": null,\n  \"problemReportDeadlineAt\": \"2026-11-04T08:39:48.000Z\"\n}"
            },
            {
              "name": "409 Report window closed",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/not-received",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "not-received"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"note\": \"Customer says the parcel did not arrive and nobody called her.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"REPORT_WINDOW_CLOSED\",\n  \"message\": \"A Shipment can be reported as not received only within 24 hours of its delivery.\"\n}"
            },
            {
              "name": "409 Already reported",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/not-received",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "not-received"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"note\": \"Customer says the parcel did not arrive and nobody called her.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"ALREADY_REPORTED\",\n  \"message\": \"You already reported this Shipment as not received.\"\n}"
            },
            {
              "name": "409 Not delivered",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "a3f1c9e2-7b44-4d0e-9c61-5e2f8a0b7d13",
                    "description": "8 to 255 characters. Send the same key again to retry this exact request safely."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/delivery-api/shipments/7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01/not-received",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "delivery-api",
                    "shipments",
                    "7d0f3c52-9a4e-4f1b-8c2d-5e6a7b8c9d01",
                    "not-received"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"note\": \"Customer says the parcel did not arrive and nobody called her.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 409,\n  \"error\": \"NOT_DELIVERED\",\n  \"message\": \"Only a DELIVERED Shipment can be reported as not received.\"\n}"
            }
          ]
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.tujyaneltd.com/api/v1",
      "type": "string"
    },
    {
      "key": "shipmentId",
      "value": "",
      "type": "string"
    }
  ]
}
