{
  "info": {
    "_postman_id": "shaq-express-api-v1",
    "name": "ShaQ Express API",
    "description": "ShaQ Express Public API Documentation.\n\nWelcome to the ShaQ Express Public API. This collection provides partners and developers with the endpoints needed to seamlessly manage packages, consignments, and receive tracking updates.\n\n**Version:** 1.0\n**Development Base URL:** `https://test-partner.shaqexpress.com/api/v1`\n\n## Authentication\nAll protected endpoints require a Bearer token obtained from the Login endpoint. Tokens are valid for 7 days.\n\n## Standard Headers\n- `Content-Type: application/json`\n- `Accept: application/json`\n- `Authorization: Bearer <token>` (for protected endpoints)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://test-partner.shaqexpress.com/api/v1",
      "type": "string"
    },
    {
      "key": "bearerToken",
      "value": "",
      "type": "string"
    },
    {
      "key": "partnerRef",
      "value": "FGVHKJ567",
      "type": "string"
    },
    {
      "key": "trackingNumber",
      "value": "20250410X51DIQ",
      "type": "string"
    },
    {
      "key": "consignmentReference",
      "value": "PAR-20260322053800",
      "type": "string"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{bearerToken}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Auth",
      "description": "Authentication endpoints for obtaining API access tokens.",
      "item": [
        {
          "name": "Login",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code === 200) {",
                  "    var jsonData = pm.response.json();",
                  "    if (jsonData.data && jsonData.data.token) {",
                  "        pm.collectionVariables.set('bearerToken', jsonData.data.token);",
                  "        console.log('Bearer token saved to collection variable.');",
                  "    }",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"identifier\": \"your_identifier\",\n  \"secret\": \"your_secret\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "auth",
                "login"
              ]
            },
            "description": "Get authentication token for subsequent requests.\n\nAs a security measure the token is valid for **7 days**, after which a new one must be generated.\n\n**Note:** The token is automatically saved to the `bearerToken` collection variable upon a successful response."
          },
          "response": [
            {
              "name": "200 - Successful Login",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"identifier\": \"your_identifier\",\n  \"secret\": \"your_secret\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/login",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "login"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"token\": \"UtXdU9HODhjdmtTNkRtUWNsVlM4OWI1d2Z2TXVIanlkRk\"\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Packages",
      "description": "Endpoints for creating, retrieving, updating, and deleting packages.",
      "item": [
        {
          "name": "Get Packages",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/packages?page=1&limit=15",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number for pagination"
                },
                {
                  "key": "limit",
                  "value": "15",
                  "description": "Number of results per page"
                }
              ]
            },
            "description": "Get all packages with pagination support."
          },
          "response": [
            {
              "name": "200 - Package List",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages?page=1&limit=1",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1"
                    },
                    {
                      "key": "limit",
                      "value": "1"
                    }
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"list\": [\n      {\n        \"partnerRef\": \"FGVHKJ567\",\n        \"trackingNumber\": \"20250410X51DIQ\",\n        \"customerName\": \"Kwaku Ananse\",\n        \"customerPhone1\": \"+233244100200\",\n        \"customerPhone2\": null,\n        \"destinationRegion\": \"Greater Accra\",\n        \"destinationCity\": \"Accra\",\n        \"status\": \"delivered\",\n        \"value\": \"300.00\",\n        \"amountToCollect\": \"300.00\",\n        \"date\": \"2025-04-10T11:15:00.000+00:00\"\n      }\n    ],\n    \"meta\": {\n      \"total\": 1,\n      \"perPage\": 15,\n      \"currentPage\": 1,\n      \"lastPage\": 1\n    }\n  }\n}"
            }
          ]
        },
        {
          "name": "Get Single Package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/packages/{{partnerRef}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "{{partnerRef}}"
              ]
            },
            "description": "Get details for a specific package by its partner reference ID. Includes full tracking history."
          },
          "response": [
            {
              "name": "200 - Package Details",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"partnerRef\": \"FGVHKJ567\",\n    \"trackingNumber\": \"20250410X51DIQ\",\n    \"customerName\": \"Kwaku Ananse\",\n    \"customerPhone1\": \"+233244100200\",\n    \"customerPhone2\": null,\n    \"altPhone\": null,\n    \"destinationRegion\": \"Greater Accra\",\n    \"destinationCity\": \"Accra\",\n    \"destinationAddressLine1\": \"UPSA Hall, Room 3\",\n    \"destinationAddressLine2\": null,\n    \"length\": 0,\n    \"height\": 5,\n    \"weight\": 1.2,\n    \"description\": \"iPhone 16 pro max black edge silver back casing\",\n    \"units\": 1,\n    \"type\": \"box\",\n    \"value\": \"300.00\",\n    \"amountToCollect\": \"300.00\",\n    \"paymentCollector\": \"shaq\",\n    \"paymentStatus\": \"unpaid\",\n    \"handling\": \"normal\",\n    \"specialInstructions\": null,\n    \"status\": \"not_delivered\",\n    \"statusDescription\": \"Attempted delivery but couldn't complete it.\",\n    \"latitude\": null,\n    \"longitude\": null,\n    \"proofPhotoUrl\": \"https://debtufr1vwh35.cloudfront.net/labels_test/label/8B73CE6D.png\",\n    \"receivedAt\": \"Jul 15 2025\",\n    \"isReplacement\": false,\n    \"action\": null,\n    \"items\": [\n      { \"name\": \"iPhone 6\", \"quantity\": 1 },\n      { \"name\": \"iPhone 14 Pro\", \"quantity\": 2 }\n    ],\n    \"rescheduledDate\": null,\n    \"deliveredAt\": null,\n    \"eta\": \"2026-04-20 - 2026-04-22\",\n    \"maxEta\": 5,\n    \"deliveryAttempts\": 1,\n    \"fulfillmentStage\": null,\n    \"fulfillmentStatus\": null,\n    \"pickedAt\": null,\n    \"packedAt\": null,\n    \"cancelledAt\": null,\n    \"trackingHistory\": [\n      {\n        \"name\": \"not_delivered\",\n        \"description\": \"Attempted delivery but couldn't complete it.\",\n        \"date\": \"2025-07-16T09:00:00.000+00:00\",\n        \"comment\": \"Customer was unreachable upon arrival. Package rescheduled for 2nd delivery attempt.\"\n      },\n      {\n        \"name\": \"dispatched\",\n        \"description\": \"Package is en-route to deliver.\",\n        \"date\": \"2025-07-15T15:45:00.000+00:00\",\n        \"comment\": null\n      },\n      {\n        \"name\": \"pending\",\n        \"description\": \"Package is yet to be received by Partner.\",\n        \"date\": \"2025-07-14T10:38:00.000+00:00\",\n        \"comment\": null\n      }\n    ],\n    \"callLogs\": null\n  }\n}"
            }
          ]
        },
        {
          "name": "Create Packages (Bulk)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"packages\": [\n    {\n      \"partner_ref\": \"UNIQUE-REF-001\",\n      \"customer_name\": \"Kwaku Ananse\",\n      \"customer_phone_1\": \"+233244100200\",\n      \"customer_phone_2\": null,\n      \"source_address_line_1\": \"Accra Spintex\",\n      \"source_address_line_2\": null,\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Accra\",\n      \"destination_address_line_1\": \"UPSA Hall, Room 3\",\n      \"destination_address_line_2\": null,\n      \"destination_postal_code\": null,\n      \"length\": 0,\n      \"height\": 5,\n      \"weight\": 1.2,\n      \"description\": \"iPhone 16 pro max black edge silver back casing\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"handling\": \"normal\",\n      \"special_instructions\": null,\n      \"latitude\": null,\n      \"longitude\": null,\n      \"value\": 300.00,\n      \"amount_to_collect\": 300.00,\n      \"items\": [\n        { \"name\": \"iPhone 6\", \"quantity\": 1 },\n        { \"name\": \"iPhone 14 Pro\", \"quantity\": 2 }\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/packages/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "bulk"
              ]
            },
            "description": "Create multiple packages in a single request.\n\n**Required fields per package:**\n- `partner_ref`, `customer_name`, `customer_phone_1`\n- `source_address_line_1`\n- `destination_region` (or `region_id`), `destination_city`, `destination_address_line_1`\n- `description`, `units`, `type` (`parcel`|`box`), `handling` (`normal`|`fragile`), `value`\n- `items` (array of `{name, quantity}`)\n\n**Optional fields:**\n- `customer_phone_2`, `source_address_line_2`\n- `destination_address_line_2`, `destination_postal_code`\n- `length`, `height`, `weight`, `latitude`, `longitude`\n- `special_instructions`, `amount_to_collect`, `landmark`"
          },
          "response": [
            {
              "name": "200 - Packages Created",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"packages\": [\n    {\n      \"partner_ref\": \"UNIQUE-REF-001\",\n      \"customer_name\": \"Kwaku Ananse\",\n      \"customer_phone_1\": \"+233244100200\",\n      \"source_address_line_1\": \"Accra Spintex\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Accra\",\n      \"destination_address_line_1\": \"UPSA Hall, Room 3\",\n      \"description\": \"iPhone 16 pro max\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"handling\": \"normal\",\n      \"value\": 300.00,\n      \"items\": [\n        { \"name\": \"iPhone 6\", \"quantity\": 1 }\n      ]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/packages/bulk",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "bulk"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Packages processed successfully\",\n  \"data\": [\n    {\n      \"partnerRef\": \"UNIQUE-REF-001\",\n      \"trackingNumber\": \"20250410X51DIQ\",\n      \"description\": \"iPhone 16 pro max black edge silver back casing\",\n      \"status\": \"pending\",\n      \"statusDescription\": \"Package is yet to be received from Partner\",\n      \"items\": [\n        { \"name\": \"iPhone 6\", \"quantity\": 1 },\n        { \"name\": \"iPhone 14 Pro\", \"quantity\": 2 }\n      ],\n      \"tracking\": [\n        {\n          \"name\": \"pending\",\n          \"description\": \"Package is yet to be received from Partner\",\n          \"comment\": null,\n          \"date\": \"2025-04-10T11:15:00.000+00:00\"\n        }\n      ]\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Update Package",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_name\": \"Updated Customer Name\",\n  \"customer_phone_1\": \"+233244100200\",\n  \"destination_city\": \"Kumasi\",\n  \"destination_address_line_1\": \"New Address Line 1\",\n  \"description\": \"Updated package description\",\n  \"value\": 350.00,\n  \"items\": [\n    { \"name\": \"iPhone 16\", \"quantity\": 1 }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/packages/{{partnerRef}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "{{partnerRef}}"
              ]
            },
            "description": "Update a specific package by its partner reference ID.\n\nAll fields are optional — only include the fields you want to update.\n\n**Updatable fields:**\n`customer_name`, `customer_phone_1`, `customer_phone_2`, `source_country_iso2`, `source_address_line_1`, `source_address_line_2`, `destination_region`, `destination_city`, `destination_address_line_1`, `destination_address_line_2`, `destination_postal_code`, `length`, `height`, `weight`, `description`, `units`, `type`, `handling`, `special_instructions`, `latitude`, `longitude`, `value`, `amount_to_collect`, `items`"
          },
          "response": [
            {
              "name": "200 - Package Updated",
              "originalRequest": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"customer_name\": \"Updated Customer Name\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"partnerRef\": \"FGVHKJ567\",\n    \"trackingNumber\": \"20250410X51DIQ\",\n    \"customerName\": \"Kwaku Ananse\",\n    \"customerPhone1\": \"+233244100200\",\n    \"customerPhone2\": null,\n    \"altPhone\": null,\n    \"destinationRegion\": \"Greater Accra\",\n    \"destinationCity\": \"Accra\",\n    \"destinationAddressLine1\": \"UPSA Hall, Room 3\",\n    \"destinationAddressLine2\": null,\n    \"length\": 0,\n    \"height\": 5,\n    \"weight\": 1.2,\n    \"description\": \"iPhone 16 pro max black edge silver back casing\",\n    \"units\": 1,\n    \"type\": \"box\",\n    \"value\": \"300.00\",\n    \"amountToCollect\": \"300.00\",\n    \"paymentCollector\": \"shaq\",\n    \"paymentStatus\": \"unpaid\",\n    \"handling\": \"normal\",\n    \"specialInstructions\": null,\n    \"status\": \"not_delivered\",\n    \"statusDescription\": \"Attempted delivery but couldn't complete it.\",\n    \"latitude\": null,\n    \"longitude\": null,\n    \"proofPhotoUrl\": \"https://debtufr1vwh35.cloudfront.net/labels_test/label/8B73CE6D.png\",\n    \"receivedAt\": \"Jul 15 2025\",\n    \"isReplacement\": false,\n    \"action\": null,\n    \"items\": [\n      { \"name\": \"iPhone 6\", \"quantity\": 1 },\n      { \"name\": \"iPhone 14 Pro\", \"quantity\": 2 }\n    ],\n    \"rescheduledDate\": null,\n    \"deliveredAt\": null,\n    \"eta\": \"2026-04-20 - 2026-04-22\",\n    \"maxEta\": 5,\n    \"deliveryAttempts\": 1,\n    \"fulfillmentStage\": null,\n    \"fulfillmentStatus\": null,\n    \"pickedAt\": null,\n    \"packedAt\": null,\n    \"cancelledAt\": null,\n    \"trackingHistory\": [\n      {\n        \"name\": \"not_delivered\",\n        \"description\": \"Attempted delivery but couldn't complete it.\",\n        \"date\": \"2025-07-16T09:00:00.000+00:00\",\n        \"comment\": \"Customer was unreachable upon arrival.\"\n      },\n      {\n        \"name\": \"dispatched\",\n        \"description\": \"Package is en-route to deliver.\",\n        \"date\": \"2025-07-15T15:45:00.000+00:00\",\n        \"comment\": null\n      }\n    ],\n    \"callLogs\": null\n  }\n}"
            }
          ]
        },
        {
          "name": "Delete Pending Package",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/packages/{{partnerRef}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "{{partnerRef}}"
              ]
            },
            "description": "Delete a package by its partner reference ID.\n\n⚠️ **Only packages with `pending` status can be deleted.**"
          },
          "response": [
            {
              "name": "200 - Package Deleted",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Package deleted\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Cancel Order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/packages/{{partnerRef}}/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "{{partnerRef}}",
                "cancel"
              ]
            },
            "description": "Cancel a fulfillment order by its partner reference ID."
          },
          "response": [
            {
              "name": "200 - Order Cancelled",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "cancel"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Order cancelled successfully\",\n  \"data\": null\n}"
            },
            {
              "name": "400 - Cancellation Failed",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "cancel"
                  ]
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Order cannot be cancelled. Order cancellation failed\",\n  \"data\": null\n}"
            },
            {
              "name": "404 - Order Not Found",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "cancel"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Order not found\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Create Package Replacement",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"rule\": \"return_deliver\",\n  \"packages\": [\n    {\n      \"action\": \"deliver\",\n      \"partner_ref\": \"GH945214\",\n      \"customer_name\": \"Derrick Nti\",\n      \"customer_phone_1\": \"+233549632604\",\n      \"source_country_iso2\": \"GH\",\n      \"source_address_line_1\": \"21 Abiriw Street\",\n      \"destination_country_iso2\": \"GH\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Kwashieman\",\n      \"destination_address_line_1\": \"23 Abiriw Street\",\n      \"length\": 30,\n      \"height\": 20,\n      \"weight\": 5.5,\n      \"description\": \"Replacement delivery package\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"value\": 20.00,\n      \"amount_to_collect\": 20.00,\n      \"handling\": \"normal\",\n      \"items\": [\n        { \"name\": \"Bluetooth\", \"quantity\": 3 }\n      ]\n    },\n    {\n      \"action\": \"return\",\n      \"partner_ref\": \"GH545728\",\n      \"customer_name\": \"Kwabena Azaglo\",\n      \"customer_phone_1\": \"+233549632604\",\n      \"source_country_iso2\": \"GH\",\n      \"source_address_line_1\": \"21 Abiriw Street\",\n      \"destination_country_iso2\": \"GH\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Kwashieman\",\n      \"destination_address_line_1\": \"23 Abiriw Street\",\n      \"length\": 30,\n      \"height\": 20,\n      \"weight\": 5.5,\n      \"description\": \"Return package\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"value\": 20.00,\n      \"handling\": \"normal\",\n      \"items\": [\n        { \"name\": \"Bluetooth\", \"quantity\": 3 }\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/packages/replacement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "replacement"
              ]
            },
            "description": "Create one or two packages to replace an existing package.\n\n**Rules:**\n| Rule | Packages Required | Actions Required |\n|---|---|---|\n| `deliver` | 1 | `action = deliver` |\n| `return` | 1 | `action = return` |\n| `return_deliver` | 2 | One `return`, one `deliver` |"
          },
          "response": [
            {
              "name": "200 - Replacement Created",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"rule\": \"return_deliver\",\n  \"packages\": [\n    {\n      \"action\": \"deliver\",\n      \"partner_ref\": \"GH945214\",\n      \"customer_name\": \"Derrick Nti\",\n      \"customer_phone_1\": \"+233549632604\",\n      \"source_country_iso2\": \"GH\",\n      \"source_address_line_1\": \"21 Abiriw Street\",\n      \"destination_country_iso2\": \"GH\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Kwashieman\",\n      \"destination_address_line_1\": \"23 Abiriw Street\",\n      \"description\": \"Replacement delivery package\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"value\": 20.00,\n      \"handling\": \"normal\",\n      \"items\": [{ \"name\": \"Bluetooth\", \"quantity\": 3 }]\n    },\n    {\n      \"action\": \"return\",\n      \"partner_ref\": \"GH545728\",\n      \"customer_name\": \"Kwabena Azaglo\",\n      \"customer_phone_1\": \"+233549632604\",\n      \"source_country_iso2\": \"GH\",\n      \"source_address_line_1\": \"21 Abiriw Street\",\n      \"destination_country_iso2\": \"GH\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Kwashieman\",\n      \"destination_address_line_1\": \"23 Abiriw Street\",\n      \"description\": \"Return package\",\n      \"units\": 1,\n      \"type\": \"box\",\n      \"value\": 20.00,\n      \"handling\": \"normal\",\n      \"items\": [{ \"name\": \"Bluetooth\", \"quantity\": 3 }]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/packages/replacement",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "replacement"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Package replacement created successfully\",\n  \"data\": [\n    {\n      \"partnerRef\": \"GH945214\",\n      \"trackingNumber\": \"9F0FD9D5\",\n      \"customerName\": \"Derrick Nti\",\n      \"customerPhone1\": \"+233549632604\",\n      \"status\": \"pending\",\n      \"isReplacement\": true,\n      \"action\": \"deliver\",\n      \"items\": [{ \"name\": \"Bluetooth\", \"quantity\": 3 }]\n    },\n    {\n      \"partnerRef\": \"GH545728\",\n      \"trackingNumber\": \"A797CA0A\",\n      \"customerName\": \"Kwabena Azaglo\",\n      \"customerPhone1\": \"+233549632604\",\n      \"status\": \"pending\",\n      \"isReplacement\": true,\n      \"action\": \"return\",\n      \"items\": [{ \"name\": \"Bluetooth\", \"quantity\": 3 }]\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get Package Label",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/packages/{{partnerRef}}/print-label",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "packages",
                "{{partnerRef}}",
                "print-label"
              ]
            },
            "description": "Get the shipping label for a specific package.\n\n**Possible responses:**\n- `200` — Label is ready, URL returned in `data`.\n- `202` — Label generation has started; retry shortly.\n- `404` — Package not found."
          },
          "response": [
            {
              "name": "200 - Label Ready",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/print-label",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "print-label"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"type\": \"base64\",\n    \"media_type\": \"application/pdf\",\n    \"data\": \"JVBERi0xLjQKMSAw...\"\n  }\n}"
            },
            {
              "name": "202 - Label Generating",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/print-label",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "print-label"
                  ]
                }
              },
              "status": "Accepted",
              "code": 202,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Label generation started. Please retry shortly.\",\n  \"data\": null\n}"
            },
            {
              "name": "404 - Package Not Found",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/packages/{{partnerRef}}/print-label",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "packages",
                    "{{partnerRef}}",
                    "print-label"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Package not found\",\n  \"data\": null\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Consignments",
      "description": "Endpoints for creating and retrieving consignments.",
      "item": [
        {
          "name": "Create Consignment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"packages\": [\n    {\n      \"partner_ref\": \"qwertyui1a1aaqweqqaqx\",\n      \"customer_name\": \"Hema Mirpuri\",\n      \"customer_phone_1\": \"+233244601165\",\n      \"source_address_line_1\": \"Accra spintex basket junction\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Tesano\",\n      \"destination_address_line_1\": \"OPP total filling station Abeka tesano\",\n      \"description\": \"Color Splicing Cotton Rope Storage Basket\",\n      \"units\": 7,\n      \"type\": \"parcel\",\n      \"handling\": \"normal\",\n      \"value\": 1468.00,\n      \"amount_to_collect\": 1468.00,\n      \"items\": [\n        { \"name\": \"14cm Alya Glass Cookie Holder - Transparent\", \"quantity\": 4 },\n        { \"name\": \"Cotton Rope Storage Basket AB-026\", \"quantity\": 1 },\n        { \"name\": \"6 Pieces Nossa 21cm Cake Plate Set\", \"quantity\": 1 }\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/consignments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consignments"
              ]
            },
            "description": "Create a consignment that represents the physical shipment of packages that will be sent to ShaQ Express.\n\nThe request body structure is identical to **Create Packages (Bulk)** — an array of package objects under the `packages` key."
          },
          "response": [
            {
              "name": "200 - Shipment Created",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"packages\": [\n    {\n      \"partner_ref\": \"qwertyui1a1aaqweqqaqx\",\n      \"customer_name\": \"Hema Mirpuri\",\n      \"customer_phone_1\": \"+233244601165\",\n      \"source_address_line_1\": \"Accra spintex basket junction\",\n      \"destination_region\": \"Greater Accra\",\n      \"destination_city\": \"Tesano\",\n      \"destination_address_line_1\": \"OPP total filling station Abeka tesano\",\n      \"description\": \"Storage Basket\",\n      \"units\": 7,\n      \"type\": \"parcel\",\n      \"handling\": \"normal\",\n      \"value\": 1468.00,\n      \"items\": [{ \"name\": \"Glass Cookie Holder\", \"quantity\": 4 }]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/consignments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Consignment created successfully\",\n  \"data\": {\n    \"id\": 123,\n    \"reference\": \"PAR-20260828093000\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2026-08-28\",\n    \"totalPackages\": 2,\n    \"packages\": [\n      {\n        \"partnerRef\": \"qwertyui1a1aaqweqqaqx\",\n        \"trackingNumber\": \"C561819A\",\n        \"customerName\": \"Hema Mirpuri\",\n        \"customerPhone1\": \"+233244601165\",\n        \"customerPhone2\": null,\n        \"sourceAddressLine1\": \"Accra spintex basket junction\",\n        \"sourceAddressLine2\": null,\n        \"destinationRegion\": \"Greater Accra\",\n        \"destinationCity\": \"Tesano\",\n        \"destinationAddressLine1\": \"OPP total filling station Abeka tesano\",\n        \"destinationAddressLine2\": null,\n        \"destinationPostalCode\": null,\n        \"length\": 0,\n        \"height\": 0,\n        \"weight\": 0,\n        \"description\": \"Color Splicing Cotton Rope Storage Basket AB-026 - Beige Yellow+White\",\n        \"units\": 7,\n        \"type\": \"parcel\",\n        \"handling\": \"normal\",\n        \"specialInstructions\": null,\n        \"status\": \"pending\",\n        \"statusDescription\": \"Package is yet to be received by Partner\",\n        \"latitude\": null,\n        \"longitude\": null,\n        \"value\": \"1468.00\",\n        \"amountToCollect\": \"1468.00\",\n        \"originalAmountToCollect\": null,\n        \"paymentCollector\": \"shaq\",\n        \"paymentStatus\": \"unpaid\",\n        \"date\": \"2026-08-28 09:30\",\n        \"trackingUrl\": \"https://dev.tracking-website.pages.dev/packages/C561819A\",\n        \"items\": [\n          {\n            \"name\": \"14cm Alya Glass Cookie Holder - Transparent\",\n            \"quantity\": 4\n          },\n          {\n            \"name\": \"6 Pieces Nossa 21cm Cake Plate Set\",\n            \"quantity\": 1\n          }\n        ]\n      },\n      {\n        \"partnerRef\": \"zxcvbnm2b2bbrwerrbrby\",\n        \"trackingNumber\": \"C561820B\",\n        \"customerName\": \"Kwaku Ananse\",\n        \"customerPhone1\": \"+233244100200\",\n        \"customerPhone2\": null,\n        \"sourceAddressLine1\": \"Accra spintex basket junction\",\n        \"sourceAddressLine2\": null,\n        \"destinationRegion\": \"Greater Accra\",\n        \"destinationCity\": \"Accra\",\n        \"destinationAddressLine1\": \"UPSA Hall, Room 3\",\n        \"destinationAddressLine2\": null,\n        \"destinationPostalCode\": null,\n        \"length\": 0,\n        \"height\": 5,\n        \"weight\": 1.2,\n        \"description\": \"iPhone 16 pro max black edge silver back casing\",\n        \"units\": 1,\n        \"type\": \"box\",\n        \"handling\": \"normal\",\n        \"specialInstructions\": null,\n        \"status\": \"pending\",\n        \"statusDescription\": \"Package is yet to be received by Partner\",\n        \"latitude\": null,\n        \"longitude\": null,\n        \"value\": \"1468.00\",\n        \"amountToCollect\": \"1468.00\",\n        \"originalAmountToCollect\": null,\n        \"paymentCollector\": \"shaq\",\n        \"paymentStatus\": \"unpaid\",\n        \"date\": \"2026-08-28 09:30\",\n        \"trackingUrl\": \"https://dev.tracking-website.pages.dev/packages/C561820B\",\n        \"items\": [\n          {\n            \"name\": \"iPhone 16 pro max\",\n            \"quantity\": 1\n          }\n        ]\n      }\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "Get Single Consignment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consignments",
                "{{consignmentReference}}"
              ]
            },
            "description": "Get details of a specific shipment by its reference ID, including all packages within the shipment."
          },
          "response": [
            {
              "name": "200 - Shipment Details",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": {\n    \"id\": 124,\n    \"reference\": \"SAAM-20260322053800\",\n    \"partner\": {\n      \"id\": 16,\n      \"countryId\": 1,\n      \"name\": \"Acme Ltd\",\n      \"phone\": \"+233244601165\",\n      \"email\": \"ops@acme.example\",\n      \"identifier\": \"acme\",\n      \"webhookUrl\": \"https://acme.example/webhooks/shaq\",\n      \"testWebhookUrl\": \"https://acme.example/webhooks/shaq-test\",\n      \"enabled\": true,\n      \"hasLabel\": true,\n      \"showNameOnLabel\": true,\n      \"type\": \"merchant\",\n      \"address\": \"Accra spintex basket junction\",\n      \"defaultPaymentCollector\": \"shaq\",\n      \"maskedSecret\": \"pauth_****\",\n      \"createdAt\": \"2026-01-15T09:30:00.000+00:00\",\n      \"updatedAt\": \"2026-08-28T09:30:00.000+00:00\"\n    },\n    \"partnerName\": \"Acme Ltd\",\n    \"status\": \"successful\",\n    \"type\": \"import\",\n    \"author\": \"Acme Ltd\",\n    \"authorName\": \"Acme Ltd\",\n    \"authorType\": \"partner\",\n    \"recipientId\": null,\n    \"recipientName\": null,\n    \"driverId\": null,\n    \"driverName\": null,\n    \"vehicleNumber\": null,\n    \"receivedAt\": null,\n    \"path\": null,\n    \"startsAt\": null,\n    \"endsAt\": null,\n    \"statuses\": [],\n    \"skippedRows\": [],\n    \"skippedCount\": 0,\n    \"createdAt\": \"2026-08-28\",\n    \"totalPackages\": 2,\n    \"packages\": [\n      {\n        \"partnerRef\": \"qwertyui1a1aaqweqqaqx\",\n        \"trackingNumber\": \"C561819A\",\n        \"customerName\": \"Hema Mirpuri\",\n        \"customerPhone1\": \"+233244601165\",\n        \"customerPhone2\": null,\n        \"sourceAddressLine1\": \"Accra spintex basket junction\",\n        \"sourceAddressLine2\": null,\n        \"destinationRegion\": \"Greater Accra\",\n        \"destinationCity\": \"Tesano\",\n        \"destinationAddressLine1\": \"OPP total filling station Abeka tesano\",\n        \"destinationAddressLine2\": null,\n        \"destinationPostalCode\": null,\n        \"length\": 0,\n        \"height\": 0,\n        \"weight\": 0,\n        \"description\": \"Color Splicing Cotton Rope Storage Basket AB-026 - Beige Yellow+White\",\n        \"units\": 7,\n        \"type\": \"parcel\",\n        \"handling\": \"normal\",\n        \"specialInstructions\": null,\n        \"status\": \"pending\",\n        \"statusDescription\": \"Package is yet to be received by Partner\",\n        \"latitude\": null,\n        \"longitude\": null,\n        \"value\": \"1468.00\",\n        \"amountToCollect\": \"1468.00\",\n        \"paymentCollector\": \"shaq\",\n        \"paymentStatus\": \"unpaid\",\n        \"date\": \"2026-08-28 09:30\",\n        \"trackingUrl\": \"https://dev.tracking-website.pages.dev/packages/C561819A\",\n        \"items\": [\n          {\n            \"name\": \"14cm Alya Glass Cookie Holder - Transparent\",\n            \"quantity\": 4\n          },\n          {\n            \"name\": \"6 Pieces Nossa 21cm Cake Plate Set\",\n            \"quantity\": 1\n          }\n        ]\n      },\n      {\n        \"partnerRef\": \"zxcvbnm2b2bbrwerrbrby\",\n        \"trackingNumber\": \"C561820B\",\n        \"customerName\": \"Kwaku Ananse\",\n        \"customerPhone1\": \"+233244100200\",\n        \"customerPhone2\": null,\n        \"sourceAddressLine1\": \"Accra spintex basket junction\",\n        \"sourceAddressLine2\": null,\n        \"destinationRegion\": \"Greater Accra\",\n        \"destinationCity\": \"Accra\",\n        \"destinationAddressLine1\": \"UPSA Hall, Room 3\",\n        \"destinationAddressLine2\": null,\n        \"destinationPostalCode\": null,\n        \"length\": 0,\n        \"height\": 5,\n        \"weight\": 1.2,\n        \"description\": \"iPhone 16 pro max black edge silver back casing\",\n        \"units\": 1,\n        \"type\": \"box\",\n        \"handling\": \"normal\",\n        \"specialInstructions\": null,\n        \"status\": \"pending\",\n        \"statusDescription\": \"Package is yet to be received by Partner\",\n        \"latitude\": null,\n        \"longitude\": null,\n        \"value\": \"1468.00\",\n        \"amountToCollect\": \"1468.00\",\n        \"paymentCollector\": \"shaq\",\n        \"paymentStatus\": \"unpaid\",\n        \"date\": \"2026-08-28 09:30\",\n        \"trackingUrl\": \"https://dev.tracking-website.pages.dev/packages/C561820B\",\n        \"items\": [\n          {\n            \"name\": \"iPhone 16 pro max\",\n            \"quantity\": 1\n          }\n        ]\n      }\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "Group Packages into a Consignment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"GROUP-1\",\n  \"partner_refs\": [\n    \"qwertyui1a1aaqweqqaqx\",\n    \"zxcvbnm2b2bbrwerrbrby\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/consignments/group-packages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consignments",
                "group-packages"
              ]
            },
            "description": "Group already-created packages into a consignment by referencing them with their partner_ref. Only pending packages that are not already in a consignment may be grouped. The reference doubles as an idempotency key: reusing an existing one appends the packages to that consignment; a new one creates a new consignment."
          },
          "response": [
            {
              "name": "200 - Consignment Grouped",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"GROUP-1\",\n  \"partner_refs\": [\n    \"qwertyui1a1aaqweqqaqx\",\n    \"zxcvbnm2b2bbrwerrbrby\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/consignments/group-packages",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "group-packages"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Consignment grouped successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"reference\": \"GROUP-1\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2026-09-14\",\n    \"totalPackages\": 3,\n    \"packages\": [\n      { \"partner_ref\": \"qwertyui1a1aaqweqqaqx\", \"tracking_number\": \"C561819A\", \"status\": \"pending\" },\n      { \"partner_ref\": \"zxcvbnm2b2bbrwerrbrby\", \"tracking_number\": \"C561820B\", \"status\": \"pending\" }\n    ]\n  }\n}"
            },
            {
              "name": "422 - Some Packages Could Not Be Grouped",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"GROUP-1\",\n  \"partner_refs\": [\n    \"qwertyui1a1aaqweqqaqx\",\n    \"zxcvbnm2b2bbrwerrbrby\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/consignments/group-packages",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "group-packages"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Some packages could not be grouped\",\n  \"data\": {\n    \"not_found\": [\"unknownref1\"],\n    \"not_pending\": [\"shippedref2\"],\n    \"already_grouped\": [\"groupedref3\"],\n    \"duplicates\": [\"dupref4\"]\n  }\n}"
            }
          ]
        },
        {
          "name": "Remove a Package from a Consignment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consignments/{{consignmentReference}}/packages/{{partnerRef}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consignments",
                "{{consignmentReference}}",
                "packages",
                "{{partnerRef}}"
              ]
            },
            "description": "Remove a single package from a consignment. Only the grouping is removed — the package itself is not deleted and its status is unchanged. Only a pending consignment can be modified."
          },
          "response": [
            {
              "name": "200 - Package Removed",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}",
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Package removed from consignment\",\n  \"data\": {\n    \"id\": 1,\n    \"reference\": \"GROUP-1\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2026-09-14\",\n    \"totalPackages\": 1,\n    \"packages\": [\n      { \"partner_ref\": \"zxcvbnm2b2bbrwerrbrby\", \"tracking_number\": \"C561820B\", \"status\": \"pending\" }\n    ]\n  }\n}"
            },
            {
              "name": "404 - Consignment Not Found",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}",
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{ \"message\": \"Consignment not found\", \"data\": null }"
            },
            {
              "name": "422 - Not A Pending Consignment",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}/packages/{{partnerRef}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}",
                    "packages",
                    "{{partnerRef}}"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{ \"message\": \"Only a pending consignment can be modified\", \"data\": null }"
            }
          ]
        },
        {
          "name": "Delete a Consignment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consignments",
                "{{consignmentReference}}"
              ]
            },
            "description": "Delete a consignment. Its grouping and membership rows are removed; the packages themselves are not deleted (they persist, un-grouped) and keep their status. Only a pending consignment can be deleted."
          },
          "response": [
            {
              "name": "200 - Consignment Deleted",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{ \"message\": \"Consignment deleted\", \"data\": null }"
            },
            {
              "name": "404 - Consignment Not Found",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{ \"message\": \"Consignment not found\", \"data\": null }"
            },
            {
              "name": "422 - Not A Pending Consignment",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/consignments/{{consignmentReference}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "consignments",
                    "{{consignmentReference}}"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{ \"message\": \"Only a pending consignment can be deleted\", \"data\": null }"
            }
          ]
        }
      ]
    },
    {
      "name": "Tracking",
      "description": "Endpoints for tracking package delivery status.",
      "item": [
        {
          "name": "Track Package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tracking/{{trackingNumber}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tracking",
                "{{trackingNumber}}"
              ]
            },
            "description": "Get tracking statuses of a specific package by its tracking number."
          },
          "response": [
            {
              "name": "200 - Tracking Details",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/tracking/{{trackingNumber}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tracking",
                    "{{trackingNumber}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Package tracking\",\n  \"data\": {\n    \"partnerRef\": \"FGVHKJ567\",\n    \"trackingNumber\": \"20250410X51DIQ\",\n    \"description\": \"Kitchen cabinet\",\n    \"status\": \"shipped\",\n    \"statusDescription\": \"Package has been shipped by Partner.\",\n    \"items\": [\n      { \"name\": \"iPhone 6\", \"quantity\": 1 },\n      { \"name\": \"iPhone 14 Pro\", \"quantity\": 2 }\n    ],\n    \"tracking\": [\n      {\n        \"name\": \"shipped\",\n        \"description\": \"Package has been shipped by Partner.\",\n        \"comment\": null,\n        \"date\": \"2025-04-10T15:17:00.000+00:00\"\n      },\n      {\n        \"name\": \"pending\",\n        \"description\": \"Package is yet to be shipped by Partner.\",\n        \"comment\": null,\n        \"date\": \"2025-04-10T15:16:00.000+00:00\"\n      }\n    ]\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Setup",
      "description": "Configuration and setup endpoints.",
      "item": [
        {
          "name": "Get Regions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/setup/regions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "setup",
                "regions"
              ]
            },
            "description": "Get all allowable regions. Use the returned `id` values for the `region_id` field when creating packages."
          },
          "response": [
            {
              "name": "200 - Regions List",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/setup/regions",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "setup",
                    "regions"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"Request successful\",\n  \"data\": [\n    {\n      \"id\": 16,\n      \"name\": \"Western North\"\n    },\n    {\n      \"id\": 15,\n      \"name\": \"Ashanti\"\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Webhook configuration and payloads. These are incoming requests from ShaQ Express to your server.",
      "item": [
        {
          "name": "Package Status Update (Webhook Payload)",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"event\": \"package.status_updated\",\n  \"event_id\": \"018e2b3c-7f4a-7c2d-9e1b-4a8f3d2c6b5a\",\n  \"api_version\": \"v1\",\n  \"occurred_at\": \"2025-07-20T14:30:00Z\",\n  \"data\": {\n    \"tracking_number\": \"20250410X51DIQ\",\n    \"partner_ref\": \"FGVHKJ567\",\n    \"status\": \"delivered\",\n    \"description\": \"Package was successfully delivered to customer\",\n    \"comment\": \"Left with building security\",\n    \"meta\": {\n      \"proof_url\": \"https://example.com/proof-of-delivery.jpg\"\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "https://YOUR_WEBHOOK_URL",
              "protocol": "https",
              "host": [
                "YOUR_WEBHOOK_URL"
              ]
            },
            "description": "**This is NOT a request you make to ShaQ Express.** This represents the payload that ShaQ Express will send TO your webhook URL when a tracked event occurs on a package.\n\nConfigure your webhook URL with ShaQ Express to receive these updates.\n\n**Envelope fields:**\n- `event` — Event type (e.g. `package.status_updated`, `package.amount_to_collect_updated`)\n- `event_id` — Unique UUID per delivery (use for idempotency/deduplication)\n- `api_version` — Payload version e.g. `v1`\n- `occurred_at` — ISO 8601 UTC timestamp\n- `data` — Event-specific payload\n\n**Data fields (package.status_updated):**\n- `tracking_number` — ShaQ Express tracking number\n- `partner_ref` — Your reference for the package\n- `status` — New package status\n- `description` — Human-readable description\n- `comment` — Additional context (may be null)\n- `meta` — Extra data (includes `proof_url` when status is `delivered`)\n\n**Expected response:** Return HTTP `2xx` within 10 seconds. Non-`2xx` responses will be retried up to 3 times."
          },
          "response": [
            {
              "name": "200 - Webhook Acknowledged",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"event\": \"package.status_updated\",\n  \"event_id\": \"018e2b3c-7f4a-7c2d-9e1b-4a8f3d2c6b5a\",\n  \"api_version\": \"v1\",\n  \"occurred_at\": \"2025-07-20T14:30:00Z\",\n  \"data\": {\n    \"tracking_number\": \"20250410X51DIQ\",\n    \"partner_ref\": \"FGVHKJ567\",\n    \"status\": \"delivered\",\n    \"description\": \"Package was successfully delivered to customer\",\n    \"comment\": null,\n    \"meta\": {\n      \"proof_url\": \"https://example.com/proof.jpg\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://YOUR_WEBHOOK_URL",
                  "protocol": "https",
                  "host": [
                    "YOUR_WEBHOOK_URL"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"message\": \"\",\n  \"data\": {\n    \"status\": \"OK\"\n  }\n}"
            }
          ]
        }
      ]
    }
  ]
}
