{
  "info": {
    "_postman_id": "6f3c2a8e-4b1d-4e7a-9c55-2d8f1e0b7a31",
    "name": "Storefront API",
    "description": "The Storefront API gives an online shop the catalogue, stock, checkout and order tracking of a store that trades on Biz Edge RetailPOS.\n\nOne API key is one storefront. The key fixes the company, branch, till and store every call works against, so no request carries a company or branch id.\n\n## Base URL\n`https://storefrontapi.bizedgehq.com`. Every endpoint is under `/v1`.\n\n## Getting started\n1. Get your storefront's API key from Biz Edge. It is issued when your storefront is set up. Keep it on your server: it identifies your store, and every shopper shares its rate limit.\n2. In Postman, open this collection's **Variables** tab and paste the key into `apiKey`. If you use the **StorefrontAPI - Production** environment, paste it there instead: an environment's value wins over the collection's.\n3. Send **Storefront › Detail**. An `errorCode` of 0 means the key works.\n\n## Authentication\nSend the key in an `X-API-Key` header on every request. This collection sets it once, at collection level, from the `apiKey` variable.\n\n## Responses\nEvery response is **HTTP 200**, failures included, with the same envelope:\n\n```json\n{ \"errorCode\": 0, \"errorMessage\": \"\", \"data\": { } }\n```\n\n`errorCode` 0 is success. Anything else is a failure, and `data` is null, except on **Stock › Check cart stock**, whose failure still lists the short items. Check `errorCode`, not the HTTP status.\n\n| Code | Meaning |\n|---|---|\n| -11 | Missing `X-API-Key` header |\n| -12 | API key is invalid or inactive |\n| -13 | The store's database is unavailable |\n| -21 | Validation failed (the message says which field) |\n| -22 / -23 | `page` or `size` out of range |\n| -24 | Search text too long |\n| -25 / -26 | Invalid id / invalid order number |\n| -27 | Customer email or phone missing |\n| -28 | `from` is later than `to` |\n| -29 | Malformed request body |\n| -30 | Email code wrong or expired |\n| -31 | Not found |\n| -41 | Conflict, e.g. not enough stock or the order can no longer change |\n| -42 | Not configured for this store |\n| -43 | Email not verified |\n| -44 | Store is not live |\n| -45 | Pay on delivery is off |\n| -46 | The delivery company re-priced delivery. Show the shopper the new fee and let them confirm |\n| -47 | Delivery unavailable. The shopper picks another method |\n| -51 | Rate limited. Wait the seconds in the `Retry-After` header, then retry |\n| -99 | Internal error |\n\n## Checkout flow\nA typical checkout calls, in order:\n1. **Catalogue › Browse items** and **Item detail**: show the products.\n2. **Stock › Check cart stock**: confirm the cart can still be filled.\n3. **Address › States** and **Shipping › Shipping quote**: the address form and the delivery fee.\n4. **Payment › Active pay gateway**: which gateway to show.\n5. **Email Verification › Send OTP** and **Verify OTP**: confirm the shopper's email (optional).\n6. **Orders › Create order**: returns the `orderNo`.\n7. **Orders › Pay for order**: send the shopper to `authorizationUrl`.\n8. **Orders › Settle order**: when the shopper comes back, confirm the payment.\n9. **Orders › Order status**: the order-tracking page.\n\n## Paging and limits\n- `page` 1-1000 (default 1) and `size` 1-100 (default 20).\n- Search text `q` up to 200 characters.\n- Orders and stock checks take 1-200 lines.\n- Rate limits, per storefront: 300 requests a minute overall; 20 a minute on stock checks, OTPs, orders and payments; 60 a minute on **POST Shipping quote**. Over the limit answers -51, with a `Retry-After` header giving the seconds to wait.\n\n## Examples\nEach request has saved example responses (open the example list beside it), including common failures. Lists in the examples are trimmed to a few entries, and personal details are replaced with samples.\n\n## Running the requests\nRequests that create something save its id for the ones that follow: **Create order** saves `orderNo`, **Pay for order** and **Initialize payment** save `paymentReference`, and **Verify OTP** saves `verificationToken`. Set `itemId`, `stateId`, `payMethodId` and the other id variables to rows in your own store.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Failures still come back as HTTP 200, so errorCode is what tells.",
          "const isJson = (pm.response.headers.get('Content-Type') || '').includes('application/json');",
          "if (isJson) {",
          "    const body = pm.response.json();",
          "    if (body && Object.prototype.hasOwnProperty.call(body, 'errorCode')) {",
          "        pm.test('HTTP 200', () => pm.response.to.have.status(200));",
          "        pm.test('errorCode is 0', () => pm.expect(body.errorCode, body.errorMessage).to.eql(0));",
          "    }",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://storefrontapi.bizedgehq.com"
    },
    {
      "key": "apiKey",
      "value": "<your-api-key>"
    },
    {
      "key": "itemId",
      "value": "816554"
    },
    {
      "key": "groupId",
      "value": "654"
    },
    {
      "key": "subgroupId",
      "value": "6470"
    },
    {
      "key": "countryId",
      "value": "163"
    },
    {
      "key": "stateId",
      "value": "1"
    },
    {
      "key": "shippingMethodId",
      "value": "0"
    },
    {
      "key": "payMethodId",
      "value": "3510"
    },
    {
      "key": "customerEmail",
      "value": "shopper@example.com"
    },
    {
      "key": "customerPhone",
      "value": "8031234567"
    },
    {
      "key": "orderNo",
      "value": "SO261120B001C0001"
    },
    {
      "key": "paymentReference",
      "value": "T284716395028174"
    },
    {
      "key": "otp",
      "value": "123456"
    },
    {
      "key": "verificationToken",
      "value": "<verification-token>"
    }
  ],
  "item": [
    {
      "name": "Storefront",
      "description": "The storefront's own settings. The company is resolved from the API key, so there is no id to pass.",
      "item": [
        {
          "name": "Detail",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/storefront/detail",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "storefront",
                "detail"
              ]
            },
            "description": "The storefront's public detail: name, contact, address, branding, social links and SEO."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/detail",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "detail"
                  ]
                },
                "description": "The storefront's public detail: name, contact, address, branding, social links and SEO."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"name\": \"My Store\",\n    \"tagline\": \"...the best or nothing\",\n    \"contact\": {\n      \"phone\": \"8031234567\",\n      \"email\": \"shopper@example.com\",\n      \"whatsApp\": null,\n      \"website\": null\n    },\n    \"address\": {\n      \"address1\": \"1B, Ogunlowo Street C\",\n      \"address2\": null,\n      \"city\": \"ikeja\",\n      \"state\": \"Lagos\",\n      \"country\": \"Nigeria\"\n    },\n    \"social\": {\n      \"facebook\": null,\n      \"instagram\": null,\n      \"twitter\": null,\n      \"tikTok\": null,\n      \"linkedIn\": null\n    },\n    \"branding\": {\n      \"logo\": null,\n      \"bannerImage\": null,\n      \"primaryColor\": \"#36a59c\",\n      \"secondaryColor\": \"#284692\",\n      \"currencyCode\": \"NGN\",\n      \"currencySymbol\": \"₦\",\n      \"favicon\": null\n    },\n    \"businessHours\": null,\n    \"announcement\": \"Free delivery on purchases over ₦1M\",\n    \"seo\": {\n      \"metaTitle\": null,\n      \"metaDescription\": null,\n      \"shareImage\": null,\n      \"gaId\": null,\n      \"pixelId\": null\n    },\n    \"payOnDelivery\": true\n  }\n}"
            },
            {
              "name": "Missing API key",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/detail",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "detail"
                  ]
                },
                "description": "The storefront's public detail: name, contact, address, branding, social links and SEO.",
                "auth": {
                  "type": "noauth"
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -11,\n  \"errorMessage\": \"Missing X-API-Key header\",\n  \"data\": null\n}"
            },
            {
              "name": "Invalid API key",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/detail",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "detail"
                  ]
                },
                "description": "The storefront's public detail: name, contact, address, branding, social links and SEO.",
                "auth": {
                  "type": "apikey",
                  "apikey": [
                    {
                      "key": "key",
                      "value": "X-API-Key",
                      "type": "string"
                    },
                    {
                      "key": "value",
                      "value": "not-a-real-key",
                      "type": "string"
                    },
                    {
                      "key": "in",
                      "value": "header",
                      "type": "string"
                    }
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -12,\n  \"errorMessage\": \"API key is invalid or inactive\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "About",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/storefront/about",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "storefront",
                "about"
              ]
            },
            "description": "About-page text. A merchant who has written none gets success with a null field."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/about",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "about"
                  ]
                },
                "description": "About-page text. A merchant who has written none gets success with a null field."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"about\": null\n  }\n}"
            }
          ]
        },
        {
          "name": "Return policy",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/storefront/returnpolicy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "storefront",
                "returnpolicy"
              ]
            },
            "description": "The store's return policy."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/returnpolicy",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "returnpolicy"
                  ]
                },
                "description": "The store's return policy."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"returnPolicy\": null\n  }\n}"
            }
          ]
        },
        {
          "name": "Pages",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/storefront/pages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "storefront",
                "pages"
              ]
            },
            "description": "Information pages the merchant has written (about, terms, privacy, FAQ, shipping, returns). Pages still holding starter text are left out."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/storefront/pages",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "storefront",
                    "pages"
                  ]
                },
                "description": "Information pages the merchant has written (about, terms, privacy, FAQ, shipping, returns). Pages still holding starter text are left out."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": []\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Catalogue",
      "description": "Groups, subgroups, manufacturers and items for the store and branch the API key trades as.",
      "item": [
        {
          "name": "Groups",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/group",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "group"
              ]
            },
            "description": "All item groups."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/group",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "group"
                  ]
                },
                "description": "All item groups."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 886,\n      \"name\": \"Alcohol\",\n      \"description\": \"Alcohol\",\n      \"priority\": 1\n    },\n    {\n      \"id\": 903,\n      \"name\": \"Alcoholic Drink\",\n      \"description\": \"Alcoholic Drink\",\n      \"priority\": 1\n    },\n    {\n      \"id\": 1182,\n      \"name\": \"Bath\",\n      \"description\": \"bath\",\n      \"priority\": 1\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Subgroups",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/subgroup",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subgroup"
              ],
              "query": [
                {
                  "key": "groupId",
                  "value": "{{groupId}}",
                  "description": "Optional group filter",
                  "disabled": true
                }
              ]
            },
            "description": "Item subgroups, optionally filtered by group."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/subgroup",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "subgroup"
                  ],
                  "query": [
                    {
                      "key": "groupId",
                      "value": "{{groupId}}",
                      "description": "Optional group filter",
                      "disabled": true
                    }
                  ]
                },
                "description": "Item subgroups, optionally filtered by group."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 6470,\n      \"groupId\": 654,\n      \"name\": \"Cocktail\",\n      \"description\": \"Cocktail\",\n      \"priority\": 1\n    },\n    {\n      \"id\": 2654,\n      \"groupId\": 886,\n      \"name\": \"Whisky\",\n      \"description\": \"Whisky\",\n      \"priority\": 1\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Subgroup menu",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/subgroup/menu",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "subgroup",
                "menu"
              ]
            },
            "description": "The category menu, in the merchant's order, with the featured flag."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/subgroup/menu",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "subgroup",
                    "menu"
                  ]
                },
                "description": "The category menu, in the merchant's order, with the featured flag."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 6470,\n      \"groupId\": 654,\n      \"name\": \"Cocktail\",\n      \"description\": \"Cocktail\",\n      \"isFeatured\": false,\n      \"priority\": 0\n    },\n    {\n      \"id\": 2654,\n      \"groupId\": 886,\n      \"name\": \"Whisky\",\n      \"description\": \"Whisky\",\n      \"isFeatured\": false,\n      \"priority\": 0\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Manufacturers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/manufacturer",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "manufacturer"
              ]
            },
            "description": "All manufacturers."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/manufacturer",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "manufacturer"
                  ]
                },
                "description": "All manufacturers."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 59,\n      \"name\": \"(One-time Manufacturer)\"\n    },\n    {\n      \"id\": 184,\n      \"name\": \"(One-time Manufacturer)\"\n    },\n    {\n      \"id\": 186,\n      \"name\": \"(One-time Manufacturer)\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Search items",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/item?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "item"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Text search, max 200 characters",
                  "disabled": true
                },
                {
                  "key": "subgroupId",
                  "value": "{{subgroupId}}",
                  "description": "Optional subgroup filter",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "1-1000, default 1"
                },
                {
                  "key": "size",
                  "value": "20",
                  "description": "1-100, default 20"
                }
              ]
            },
            "description": "Paged item search, optionally filtered by subgroup and a text query (max 200 characters)."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item"
                  ],
                  "query": [
                    {
                      "key": "q",
                      "value": "",
                      "description": "Text search, max 200 characters",
                      "disabled": true
                    },
                    {
                      "key": "subgroupId",
                      "value": "{{subgroupId}}",
                      "description": "Optional subgroup filter",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "1",
                      "description": "1-1000, default 1"
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "description": "1-100, default 20"
                    }
                  ]
                },
                "description": "Paged item search, optionally filtered by subgroup and a text query (max 200 characters)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"total\": 4,\n    \"items\": [\n      {\n        \"id\": 816554,\n        \"barcode\": \"T010209\",\n        \"name\": \"33 Larger Beer\",\n        \"summary\": \"Purchase of 3 creates of 33 Larger Beer.\",\n        \"price\": 1500,\n        \"promoPrice\": 1500,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"Bottle\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 0,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      },\n      {\n        \"id\": 797638,\n        \"barcode\": \"T010100\",\n        \"name\": \"5 Alive Pulp\",\n        \"summary\": \"Test Summary\",\n        \"price\": 2300,\n        \"promoPrice\": 2300,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"Bottle\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 7.5,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      },\n      {\n        \"id\": 816552,\n        \"barcode\": \"00001\",\n        \"name\": \"5alive\",\n        \"summary\": \"softdrive\",\n        \"price\": 995,\n        \"promoPrice\": 995,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"can\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 0,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      }\n    ]\n  }\n}"
            },
            {
              "name": "Page size too large",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item?page=1&size=500",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item"
                  ],
                  "query": [
                    {
                      "key": "q",
                      "value": "",
                      "description": "Text search, max 200 characters",
                      "disabled": true
                    },
                    {
                      "key": "subgroupId",
                      "value": "{{subgroupId}}",
                      "description": "Optional subgroup filter",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "1",
                      "description": "1-1000, default 1"
                    },
                    {
                      "key": "size",
                      "value": "500",
                      "description": "1-100, default 20"
                    }
                  ]
                },
                "description": "Paged item search, optionally filtered by subgroup and a text query (max 200 characters)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -23,\n  \"errorMessage\": \"size must be between 1 and 100\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Items in subgroup",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/item/subgroup/{{subgroupId}}?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "item",
                "subgroup",
                "{{subgroupId}}"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Text search, max 200 characters",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "1-1000, default 1"
                },
                {
                  "key": "size",
                  "value": "20",
                  "description": "1-100, default 20"
                }
              ]
            },
            "description": "Same as search with the subgroup in the route. An unknown subgroup answers NotFound (-31) rather than an empty page."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item/subgroup/{{subgroupId}}?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item",
                    "subgroup",
                    "{{subgroupId}}"
                  ],
                  "query": [
                    {
                      "key": "q",
                      "value": "",
                      "description": "Text search, max 200 characters",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "1",
                      "description": "1-1000, default 1"
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "description": "1-100, default 20"
                    }
                  ]
                },
                "description": "Same as search with the subgroup in the route. An unknown subgroup answers NotFound (-31) rather than an empty page."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"total\": 0,\n    \"items\": []\n  }\n}"
            }
          ]
        },
        {
          "name": "Browse items",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/item/browse?sort=featured&featured=false&inStock=false&page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "item",
                "browse"
              ],
              "query": [
                {
                  "key": "sort",
                  "value": "featured",
                  "description": "featured | newest | priceasc | pricedesc | name"
                },
                {
                  "key": "featured",
                  "value": "false",
                  "description": "true = featured items only (home page)"
                },
                {
                  "key": "inStock",
                  "value": "false",
                  "description": "true = leave out sold-out items"
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Text search, max 200 characters",
                  "disabled": true
                },
                {
                  "key": "subgroupId",
                  "value": "{{subgroupId}}",
                  "description": "Optional subgroup filter",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "1-1000, default 1"
                },
                {
                  "key": "size",
                  "value": "20",
                  "description": "1-100, default 20"
                }
              ]
            },
            "description": "The shop listing: search plus a sort order, a featured-only filter and an in-stock filter. A store whose database lacks the storefront columns answers NotConfigured (-42)."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item/browse?sort=featured&featured=false&inStock=false&page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item",
                    "browse"
                  ],
                  "query": [
                    {
                      "key": "sort",
                      "value": "featured",
                      "description": "featured | newest | priceasc | pricedesc | name"
                    },
                    {
                      "key": "featured",
                      "value": "false",
                      "description": "true = featured items only (home page)"
                    },
                    {
                      "key": "inStock",
                      "value": "false",
                      "description": "true = leave out sold-out items"
                    },
                    {
                      "key": "q",
                      "value": "",
                      "description": "Text search, max 200 characters",
                      "disabled": true
                    },
                    {
                      "key": "subgroupId",
                      "value": "{{subgroupId}}",
                      "description": "Optional subgroup filter",
                      "disabled": true
                    },
                    {
                      "key": "page",
                      "value": "1",
                      "description": "1-1000, default 1"
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "description": "1-100, default 20"
                    }
                  ]
                },
                "description": "The shop listing: search plus a sort order, a featured-only filter and an in-stock filter. A store whose database lacks the storefront columns answers NotConfigured (-42)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"total\": 4,\n    \"items\": [\n      {\n        \"id\": 816554,\n        \"barcode\": \"T010209\",\n        \"name\": \"33 Larger Beer\",\n        \"summary\": \"Purchase of 3 creates of 33 Larger Beer.\",\n        \"price\": 1500,\n        \"promoPrice\": 1500,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"Bottle\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 0,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      },\n      {\n        \"id\": 797638,\n        \"barcode\": \"T010100\",\n        \"name\": \"5 Alive Pulp\",\n        \"summary\": \"Test Summary\",\n        \"price\": 2300,\n        \"promoPrice\": 2300,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"Bottle\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 7.5,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      },\n      {\n        \"id\": 816552,\n        \"barcode\": \"00001\",\n        \"name\": \"5alive\",\n        \"summary\": \"softdrive\",\n        \"price\": 995,\n        \"promoPrice\": 995,\n        \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n        \"unit\": \"can\",\n        \"availableQuantity\": 0,\n        \"inStock\": false,\n        \"taxRate1\": 0,\n        \"taxRate2\": 0,\n        \"taxRate3\": 0\n      }\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "Item detail",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/item/{{itemId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "item",
                "{{itemId}}"
              ]
            },
            "description": "One item with its full detail."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item/{{itemId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item",
                    "{{itemId}}"
                  ]
                },
                "description": "One item with its full detail."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"id\": 816554,\n    \"barcode\": \"T010209\",\n    \"name\": \"33 Larger Beer\",\n    \"summary\": \"Purchase of 3 creates of 33 Larger Beer.\",\n    \"description\": null,\n    \"price\": 1500,\n    \"promoPrice\": 1500,\n    \"tierPrices\": [\n      1500,\n      0,\n      0\n    ],\n    \"imageUrl\": \"https://bizedgehq.s3.amazonaws.com/itemprofile/defaultitemimage.png\",\n    \"unit\": \"Bottle\",\n    \"brand\": \"(One-time Manufacturer)\",\n    \"subGroupId\": 6653,\n    \"subGroupName\": null,\n    \"groupId\": 654,\n    \"groupName\": \"Beverage\",\n    \"availableQuantity\": 0,\n    \"inStock\": false,\n    \"weight\": 0,\n    \"dimensions\": null,\n    \"taxRate1\": 0,\n    \"taxRate2\": 0,\n    \"taxRate3\": 0,\n    \"seoTitle\": null,\n    \"seoDescription\": null\n  }\n}"
            },
            {
              "name": "Unknown item",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/item/999999999",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "item",
                    "999999999"
                  ]
                },
                "description": "One item with its full detail."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Item 999999999 not found\",\n  \"data\": null\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Stock",
      "description": "Checks a cart against the store's stock before checkout, so the shopper hears what is short before paying.",
      "item": [
        {
          "name": "Check cart stock",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/stock/check",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "stock",
                "check"
              ]
            },
            "description": "Tells the shopper what is short before checkout. Reads and writes nothing. 1-200 lines.\n\nWhen something is short the envelope fails with Conflict (-41) and `data` still carries `insufficientItems`, each with a `reason` of `InsufficientStock` or `NotAvailable` and the quantity `available`, so the shop can offer what is left.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -41: 1 item(s) unavailable",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/stock/check",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "stock",
                    "check"
                  ]
                },
                "description": "Tells the shopper what is short before checkout. Reads and writes nothing. 1-200 lines.\n\nWhen something is short the envelope fails with Conflict (-41) and `data` still carries `insufficientItems`, each with a `reason` of `InsufficientStock` or `NotAvailable` and the quantity `available`, so the shop can offer what is left.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -41,\n  \"errorMessage\": \"1 item(s) unavailable\",\n  \"data\": {\n    \"ok\": false,\n    \"insufficientItems\": [\n      {\n        \"itemId\": 816554,\n        \"name\": \"33 Larger Beer\",\n        \"requested\": 1,\n        \"available\": 0,\n        \"reason\": \"InsufficientStock\"\n      }\n    ]\n  }\n}"
            },
            {
              "name": "Not enough stock",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/stock/check",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "stock",
                    "check"
                  ]
                },
                "description": "Tells the shopper what is short before checkout. Reads and writes nothing. 1-200 lines.\n\nWhen something is short the envelope fails with Conflict (-41) and `data` still carries `insufficientItems`, each with a `reason` of `InsufficientStock` or `NotAvailable` and the quantity `available`, so the shop can offer what is left.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1000000\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -41,\n  \"errorMessage\": \"1 item(s) unavailable\",\n  \"data\": {\n    \"ok\": false,\n    \"insufficientItems\": [\n      {\n        \"itemId\": 816554,\n        \"name\": \"33 Larger Beer\",\n        \"requested\": 1000000,\n        \"available\": 0,\n        \"reason\": \"InsufficientStock\"\n      }\n    ]\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Address",
      "description": "Reference data behind a checkout form. The same for every storefront.",
      "item": [
        {
          "name": "Countries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/address/countries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "address",
                "countries"
              ]
            },
            "description": "All countries."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/address/countries",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "address",
                    "countries"
                  ]
                },
                "description": "All countries."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 3,\n      \"name\": \"Afghanistan\"\n    },\n    {\n      \"id\": 16,\n      \"name\": \"Aland Islands\"\n    },\n    {\n      \"id\": 6,\n      \"name\": \"Albania\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Countries with currency",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/address/countrieswithcurrency",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "address",
                "countrieswithcurrency"
              ]
            },
            "description": "Countries with their currency."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/address/countrieswithcurrency",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "address",
                    "countrieswithcurrency"
                  ]
                },
                "description": "Countries with their currency."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 3,\n      \"name\": \"Afghanistan\",\n      \"currencyCode\": \"AFN\",\n      \"currencySymbol\": \"?\"\n    },\n    {\n      \"id\": 16,\n      \"name\": \"Aland Islands\",\n      \"currencyCode\": \"EUR\",\n      \"currencySymbol\": \"€\"\n    },\n    {\n      \"id\": 6,\n      \"name\": \"Albania\",\n      \"currencyCode\": \"ALL\",\n      \"currencySymbol\": \"Lek\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Dial codes",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/address/dialcodes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "address",
                "dialcodes"
              ]
            },
            "description": "Every country with a dial code, for phone-number dropdowns. `phoneCode` is digits only, e.g. `234`."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/address/dialcodes",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "address",
                    "dialcodes"
                  ]
                },
                "description": "Every country with a dial code, for phone-number dropdowns. `phoneCode` is digits only, e.g. `234`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"isoAlpha2\": \"AF\",\n      \"name\": \"Afghanistan\",\n      \"phoneCode\": \"93\"\n    },\n    {\n      \"isoAlpha2\": \"AX\",\n      \"name\": \"Aland Islands\",\n      \"phoneCode\": \"358\"\n    },\n    {\n      \"isoAlpha2\": \"AL\",\n      \"name\": \"Albania\",\n      \"phoneCode\": \"355\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "States",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/address/states?countryId={{countryId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "address",
                "states"
              ],
              "query": [
                {
                  "key": "countryId",
                  "value": "{{countryId}}",
                  "description": "Country id (required)"
                }
              ]
            },
            "description": "States of a country."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/address/states?countryId={{countryId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "address",
                    "states"
                  ],
                  "query": [
                    {
                      "key": "countryId",
                      "value": "{{countryId}}",
                      "description": "Country id (required)"
                    }
                  ]
                },
                "description": "States of a country."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 8,\n      \"countryId\": 163,\n      \"name\": \"Abia\"\n    },\n    {\n      \"id\": 17,\n      \"countryId\": 163,\n      \"name\": \"Abuja\"\n    },\n    {\n      \"id\": 18,\n      \"countryId\": 163,\n      \"name\": \"Adamawa\"\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Branch",
      "description": "The company's branches, for a store locator or a pickup-point picker.",
      "item": [
        {
          "name": "Branch addresses",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/branch/addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "branch",
                "addresses"
              ]
            },
            "description": "All of the company's branches with their addresses."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/branch/addresses",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "branch",
                    "addresses"
                  ]
                },
                "description": "All of the company's branches with their addresses."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Ikeja Obanta Branch\",\n      \"phone\": \"8031234567\",\n      \"email\": \"shopper@example.com\",\n      \"address1\": \"1A  Ogunlowo Street\",\n      \"address2\": \"Obanta Avenue\",\n      \"city\": \"Ikeja\",\n      \"state\": \"Lagos\",\n      \"country\": \"Nigeria\"\n    },\n    {\n      \"id\": 378,\n      \"name\": \"Nairobi Branch\",\n      \"phone\": \"8031234567\",\n      \"email\": \"shopper@example.com\",\n      \"address1\": \"G & K Mall\",\n      \"address2\": \"\",\n      \"city\": \"Nairobi\",\n      \"state\": \"Lagos\",\n      \"country\": \"Nigeria\"\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Shipping",
      "description": "Shipping options for checkout. The shop shows the quote, the shopper picks a method, and the shop posts its id and fee to **Create order**.",
      "item": [
        {
          "name": "Shipping methods",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/shipping/methods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "shipping",
                "methods"
              ]
            },
            "description": "The company's active shipping methods."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/shipping/methods",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "shipping",
                    "methods"
                  ]
                },
                "description": "The company's active shipping methods."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Pickup\",\n      \"description\": \"Collect from our store during business hours.\",\n      \"requiresAddress\": false\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Delivery\",\n      \"description\": \"Delivered to your address in 2-5 working days.\",\n      \"requiresAddress\": true\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Shipping quote",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/shipping/quote?stateId={{stateId}}&total=25000",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "shipping",
                "quote"
              ],
              "query": [
                {
                  "key": "stateId",
                  "value": "{{stateId}}",
                  "description": "Destination state (0 for pickup only)"
                },
                {
                  "key": "total",
                  "value": "25000",
                  "description": "Goods total including tax"
                }
              ]
            },
            "description": "Fees for a cart by destination state. Enough for flat-rate and merchant-priced methods; a method a delivery company prices needs **POST Shipping quote**."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/shipping/quote?stateId={{stateId}}&total=25000",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "shipping",
                    "quote"
                  ],
                  "query": [
                    {
                      "key": "stateId",
                      "value": "{{stateId}}",
                      "description": "Destination state (0 for pickup only)"
                    },
                    {
                      "key": "total",
                      "value": "25000",
                      "description": "Goods total including tax"
                    }
                  ]
                },
                "description": "Fees for a cart by destination state. Enough for flat-rate and merchant-priced methods; a method a delivery company prices needs **POST Shipping quote**."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Pickup\",\n      \"description\": \"Collect from our store during business hours.\",\n      \"requiresAddress\": false,\n      \"merchantPriced\": false,\n      \"fee\": null,\n      \"providerPriced\": false,\n      \"available\": true,\n      \"reason\": null\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Delivery\",\n      \"description\": \"Delivered to your address in 2-5 working days.\",\n      \"requiresAddress\": true,\n      \"merchantPriced\": false,\n      \"fee\": null,\n      \"providerPriced\": false,\n      \"available\": true,\n      \"reason\": null\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Shipping quote for address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/shipping/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "shipping",
                "quote"
              ]
            },
            "description": "Fees for a cart with the full delivery address and lines, which methods priced by a delivery company need. A method the company can't serve comes back with `available` false and a `reason`.\n\nRate-limited at 60 a minute, apart from the orders budget, so a shopper editing their address doesn't use up the limit their order needs.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"stateId\": {{stateId}},\n  \"address1\": \"12 Allen Avenue\",\n  \"address2\": null,\n  \"city\": \"Ikeja\",\n  \"total\": 25000,\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/shipping/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "shipping",
                    "quote"
                  ]
                },
                "description": "Fees for a cart with the full delivery address and lines, which methods priced by a delivery company need. A method the company can't serve comes back with `available` false and a `reason`.\n\nRate-limited at 60 a minute, apart from the orders budget, so a shopper editing their address doesn't use up the limit their order needs.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"stateId\": {{stateId}},\n  \"address1\": \"12 Allen Avenue\",\n  \"address2\": null,\n  \"city\": \"Ikeja\",\n  \"total\": 25000,\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Pickup\",\n      \"description\": \"Collect from our store during business hours.\",\n      \"requiresAddress\": false,\n      \"merchantPriced\": false,\n      \"fee\": null,\n      \"providerPriced\": false,\n      \"available\": true,\n      \"reason\": null\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Delivery\",\n      \"description\": \"Delivered to your address in 2-5 working days.\",\n      \"requiresAddress\": true,\n      \"merchantPriced\": false,\n      \"fee\": null,\n      \"providerPriced\": false,\n      \"available\": true,\n      \"reason\": null\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Payment",
      "description": "How the store takes payment: its pay methods, and the online gateway checkout should drive.",
      "item": [
        {
          "name": "Pay methods",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/payment/methods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payment",
                "methods"
              ]
            },
            "description": "Payment methods the company accepts. Send the chosen `id` as `payMethodId` in **Create order**."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/payment/methods",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "payment",
                    "methods"
                  ]
                },
                "description": "Payment methods the company accepts. Send the chosen `id` as `payMethodId` in **Create order**."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": [\n    {\n      \"id\": 1483,\n      \"name\": \"Cash\",\n      \"payType\": 1\n    },\n    {\n      \"id\": 1268,\n      \"name\": \"Cash\",\n      \"payType\": 1\n    },\n    {\n      \"id\": 1278,\n      \"name\": \"Cash\",\n      \"payType\": 1\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Active pay gateway",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/paygateway/active",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "paygateway",
                "active"
              ]
            },
            "description": "The active gateway at checkout: which to drive (Paystack or SeerBit), its pay method id, live or test mode, and its public key (never the secret)."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/paygateway/active",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "paygateway",
                    "active"
                  ]
                },
                "description": "The active gateway at checkout: which to drive (Paystack or SeerBit), its pay method id, live or test mode, and its public key (never the secret)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"id\": 3,\n    \"name\": \"Paystack\",\n    \"payMethodId\": 3510,\n    \"live\": false,\n    \"publicKey\": \"\"\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Email Verification",
      "description": "Optional email check before checkout: send a code, then verify it.",
      "item": [
        {
          "name": "Send OTP",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/emailverification/sendotp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "emailverification",
                "sendotp"
              ]
            },
            "description": "Mails a 6-digit code. Always succeeds with the same shape, so it can't be used to tell which addresses are customers. `resendAfterSeconds` is non-zero when a resend was suppressed: count down from it before offering another.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{customerEmail}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/emailverification/sendotp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "emailverification",
                    "sendotp"
                  ]
                },
                "description": "Mails a 6-digit code. Always succeeds with the same shape, so it can't be used to tell which addresses are customers. `resendAfterSeconds` is non-zero when a resend was suppressed: count down from it before offering another.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"{{customerEmail}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": {\n    \"maskedEmail\": \"s*****@example.com\",\n    \"expiresInSeconds\": 900,\n    \"resendAfterSeconds\": 60\n  }\n}"
            }
          ]
        },
        {
          "name": "Verify OTP",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/emailverification/verifyotp",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "emailverification",
                "verifyotp"
              ]
            },
            "description": "Checks the code. A wrong, expired or missing code answers EmailCodeInvalid (-30), and `attemptsRemaining` counts down. On success, `verificationToken` is returned once (only its hash is kept) and saved to the `verificationToken` variable.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{customerEmail}}\",\n  \"otp\": \"{{otp}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -30: Code is invalid or has expired",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/emailverification/verifyotp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "emailverification",
                    "verifyotp"
                  ]
                },
                "description": "Checks the code. A wrong, expired or missing code answers EmailCodeInvalid (-30), and `attemptsRemaining` counts down. On success, `verificationToken` is returned once (only its hash is kept) and saved to the `verificationToken` variable.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"{{customerEmail}}\",\n  \"otp\": \"{{otp}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -30,\n  \"errorMessage\": \"Code is invalid or has expired\",\n  \"data\": null\n}"
            },
            {
              "name": "Wrong code",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/emailverification/verifyotp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "emailverification",
                    "verifyotp"
                  ]
                },
                "description": "Checks the code. A wrong, expired or missing code answers EmailCodeInvalid (-30), and `attemptsRemaining` counts down. On success, `verificationToken` is returned once (only its hash is kept) and saved to the `verificationToken` variable.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"{{customerEmail}}\",\n  \"otp\": \"000000\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -30,\n  \"errorMessage\": \"Code is invalid or has expired\",\n  \"data\": null\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.errorCode === 0 && body.data && body.data.verificationToken) {",
                  "    pm.collectionVariables.set(\"verificationToken\", body.data.verificationToken);",
                  "    console.log(\"Saved verificationToken =\", body.data.verificationToken);",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Orders",
      "description": "Create, read, track, pay for, deliver and cancel orders. Send **Create order** first: it saves the new order number to the `orderNo` variable for the requests after it.",
      "item": [
        {
          "name": "Create order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/order/add",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "add"
              ]
            },
            "description": "Creates an order. 1-200 lines.\n\n- `shipping.methodId` 0 means no method chosen (no fee, address required). Otherwise it must be an active shipping method, and the address fields are required only when that method needs an address.\n- `shipping.fee` is the fee from **Shipping quote** (0 to 10,000,000). For a method a delivery company prices, a different fee answers -46 with the new fee in the message.\n- `customer.phone` is the number without the country code, and `customer.phoneCode` is the country code in digits only, e.g. `234`.\n\nCan fail with ValidationFailed (-21), Conflict (-41, e.g. not enough stock), StoreNotLive (-44), PayOnDeliveryOff (-45), ShippingQuoteChanged (-46) or DeliveryUnavailable (-47).\n\nOrder numbers look like `SO261120B001C0001`: `SO`, the date (YYMMDD), the branch and a counter.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer\": {\n    \"firstName\": \"Ada\",\n    \"lastName\": \"Okafor\",\n    \"otherName\": null,\n    \"email\": \"{{customerEmail}}\",\n    \"phone\": \"{{customerPhone}}\",\n    \"phoneCode\": \"234\"\n  },\n  \"shipping\": {\n    \"fullName\": \"Ada Okafor\",\n    \"phone\": \"{{customerPhone}}\",\n    \"email\": \"{{customerEmail}}\",\n    \"address1\": \"12 Allen Avenue\",\n    \"address2\": null,\n    \"city\": \"Ikeja\",\n    \"stateId\": {{stateId}},\n    \"postalCode\": \"100001\",\n    \"instructions\": \"Call on arrival\",\n    \"methodId\": {{shippingMethodId}},\n    \"fee\": 0\n  },\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ],\n  \"payMethodId\": {{payMethodId}},\n  \"gatewayReference\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -41: Insufficient stock for item 816554 (available 0, requested 1)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/add",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "add"
                  ]
                },
                "description": "Creates an order. 1-200 lines.\n\n- `shipping.methodId` 0 means no method chosen (no fee, address required). Otherwise it must be an active shipping method, and the address fields are required only when that method needs an address.\n- `shipping.fee` is the fee from **Shipping quote** (0 to 10,000,000). For a method a delivery company prices, a different fee answers -46 with the new fee in the message.\n- `customer.phone` is the number without the country code, and `customer.phoneCode` is the country code in digits only, e.g. `234`.\n\nCan fail with ValidationFailed (-21), Conflict (-41, e.g. not enough stock), StoreNotLive (-44), PayOnDeliveryOff (-45), ShippingQuoteChanged (-46) or DeliveryUnavailable (-47).\n\nOrder numbers look like `SO261120B001C0001`: `SO`, the date (YYMMDD), the branch and a counter.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"customer\": {\n    \"firstName\": \"Ada\",\n    \"lastName\": \"Okafor\",\n    \"otherName\": null,\n    \"email\": \"{{customerEmail}}\",\n    \"phone\": \"{{customerPhone}}\",\n    \"phoneCode\": \"234\"\n  },\n  \"shipping\": {\n    \"fullName\": \"Ada Okafor\",\n    \"phone\": \"{{customerPhone}}\",\n    \"email\": \"{{customerEmail}}\",\n    \"address1\": \"12 Allen Avenue\",\n    \"address2\": null,\n    \"city\": \"Ikeja\",\n    \"stateId\": {{stateId}},\n    \"postalCode\": \"100001\",\n    \"instructions\": \"Call on arrival\",\n    \"methodId\": {{shippingMethodId}},\n    \"fee\": 0\n  },\n  \"lines\": [\n    {\n      \"itemId\": {{itemId}},\n      \"quantity\": 1\n    }\n  ],\n  \"payMethodId\": {{payMethodId}},\n  \"gatewayReference\": null\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -41,\n  \"errorMessage\": \"Insufficient stock for item 816554 (available 0, requested 1)\",\n  \"data\": null\n}"
            },
            {
              "name": "Empty cart",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/add",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "add"
                  ]
                },
                "description": "Creates an order. 1-200 lines.\n\n- `shipping.methodId` 0 means no method chosen (no fee, address required). Otherwise it must be an active shipping method, and the address fields are required only when that method needs an address.\n- `shipping.fee` is the fee from **Shipping quote** (0 to 10,000,000). For a method a delivery company prices, a different fee answers -46 with the new fee in the message.\n- `customer.phone` is the number without the country code, and `customer.phoneCode` is the country code in digits only, e.g. `234`.\n\nCan fail with ValidationFailed (-21), Conflict (-41, e.g. not enough stock), StoreNotLive (-44), PayOnDeliveryOff (-45), ShippingQuoteChanged (-46) or DeliveryUnavailable (-47).\n\nOrder numbers look like `SO261120B001C0001`: `SO`, the date (YYMMDD), the branch and a counter.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"customer\": {\n    \"firstName\": \"Ada\",\n    \"lastName\": \"Okafor\",\n    \"otherName\": null,\n    \"email\": \"{{customerEmail}}\",\n    \"phone\": \"{{customerPhone}}\",\n    \"phoneCode\": \"234\"\n  },\n  \"shipping\": {\n    \"fullName\": \"Ada Okafor\",\n    \"phone\": \"{{customerPhone}}\",\n    \"email\": \"{{customerEmail}}\",\n    \"address1\": \"12 Allen Avenue\",\n    \"address2\": null,\n    \"city\": \"Ikeja\",\n    \"stateId\": {{stateId}},\n    \"postalCode\": \"100001\",\n    \"instructions\": \"Call on arrival\",\n    \"methodId\": {{shippingMethodId}},\n    \"fee\": 0\n  },\n  \"lines\": [],\n  \"payMethodId\": {{payMethodId}},\n  \"gatewayReference\": null\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -29,\n  \"errorMessage\": \"Order must contain at least one line\",\n  \"data\": null\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.errorCode === 0 && body.data && body.data.orderNo) {",
                  "    pm.collectionVariables.set(\"orderNo\", body.data.orderNo);",
                  "    console.log(\"Saved orderNo =\", body.data.orderNo);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}"
              ]
            },
            "description": "One order with its lines, customer and shipping."
          },
          "response": [
            {
              "name": "Error -31: Order SO261120B001C0001 not found",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}"
                  ]
                },
                "description": "One order with its lines, customer and shipping."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order SO261120B001C0001 not found\",\n  \"data\": null\n}"
            },
            {
              "name": "Unknown order",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/SO000000B000C0000",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "SO000000B000C0000"
                  ]
                },
                "description": "One order with its lines, customer and shipping."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order SO000000B000C0000 not found\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Order status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}",
                "status"
              ]
            },
            "description": "Order tracking: the order's stage, payment status and delivery booking. `email` and `phone` are returned so the shop can check the shopper's identity before showing anything."
          },
          "response": [
            {
              "name": "Error -31: Order SO261120B001C0001 not found",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}/status",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}",
                    "status"
                  ]
                },
                "description": "Order tracking: the order's stage, payment status and delivery booking. `email` and `phone` are returned so the shop can check the shopper's identity before showing anything."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order SO261120B001C0001 not found\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Orders by customer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/order/bycustomer?customer={{customerEmail}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "bycustomer"
              ],
              "query": [
                {
                  "key": "customer",
                  "value": "{{customerEmail}}",
                  "description": "Email or phone (required)"
                },
                {
                  "key": "from",
                  "value": "2026-01-01",
                  "description": "Optional start date",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-12-31",
                  "description": "Optional end date",
                  "disabled": true
                },
                {
                  "key": "stage",
                  "value": "0",
                  "description": "Optional stage filter (0 = pending)",
                  "disabled": true
                }
              ]
            },
            "description": "A customer's orders, by email or phone. `from` must not be later than `to`."
          },
          "response": [
            {
              "name": "Success",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/bycustomer?customer={{customerEmail}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "bycustomer"
                  ],
                  "query": [
                    {
                      "key": "customer",
                      "value": "{{customerEmail}}",
                      "description": "Email or phone (required)"
                    },
                    {
                      "key": "from",
                      "value": "2026-01-01",
                      "description": "Optional start date",
                      "disabled": true
                    },
                    {
                      "key": "to",
                      "value": "2026-12-31",
                      "description": "Optional end date",
                      "disabled": true
                    },
                    {
                      "key": "stage",
                      "value": "0",
                      "description": "Optional stage filter (0 = pending)",
                      "disabled": true
                    }
                  ]
                },
                "description": "A customer's orders, by email or phone. `from` must not be later than `to`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": 0,\n  \"errorMessage\": \"\",\n  \"data\": []\n}"
            },
            {
              "name": "Dates reversed",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/bycustomer?customer={{customerEmail}}&from=2026-12-31&to=2026-01-01",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "bycustomer"
                  ],
                  "query": [
                    {
                      "key": "customer",
                      "value": "{{customerEmail}}",
                      "description": "Email or phone (required)"
                    },
                    {
                      "key": "from",
                      "value": "2026-12-31",
                      "description": "Optional start date"
                    },
                    {
                      "key": "to",
                      "value": "2026-01-01",
                      "description": "Optional end date"
                    },
                    {
                      "key": "stage",
                      "value": "0",
                      "description": "Optional stage filter (0 = pending)",
                      "disabled": true
                    }
                  ]
                },
                "description": "A customer's orders, by email or phone. `from` must not be later than `to`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -28,\n  \"errorMessage\": \"from must not be later than to\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Pay for order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}",
                "pay"
              ]
            },
            "description": "Opens a transaction with the store's active gateway (Paystack or SeerBit) for the order's own total, and returns `authorizationUrl` to send the shopper to. Saves `reference` to the `paymentReference` variable.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"callbackUrl\": \"https://shop.example.com/checkout/complete\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -31: Order SO261120B001C0001 not found",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}/pay",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}",
                    "pay"
                  ]
                },
                "description": "Opens a transaction with the store's active gateway (Paystack or SeerBit) for the order's own total, and returns `authorizationUrl` to send the shopper to. Saves `reference` to the `paymentReference` variable.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"callbackUrl\": \"https://shop.example.com/checkout/complete\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order SO261120B001C0001 not found\",\n  \"data\": null\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.errorCode === 0 && body.data && body.data.reference) {",
                  "    pm.collectionVariables.set(\"paymentReference\", body.data.reference);",
                  "    console.log(\"Saved paymentReference =\", body.data.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Settle order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}/settle",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}",
                "settle"
              ]
            },
            "description": "Verifies the reference with the gateway that issued it and, if it paid this order in full, marks the payment verified. Not paid is a success with `paid` false.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"{{paymentReference}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -31: Order SO261120B001C0001 not found",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}/settle",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}",
                    "settle"
                  ]
                },
                "description": "Verifies the reference with the gateway that issued it and, if it paid this order in full, marks the payment verified. Not paid is a success with `paid` false.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference\": \"{{paymentReference}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order SO261120B001C0001 not found\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Book delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}/delivery/book",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}",
                "delivery",
                "book"
              ]
            },
            "description": "Books the order's delivery with the store's delivery company (e.g. Dellyman). Not needed when the store books automatically.\n\nBoth body fields are optional: `pickupDate` (yyyy-MM-dd, in the store's time zone) and `pickupWindow` default to the next pickup in the merchant's window. Fails with NotFound (-31), NotConfigured (-42), Conflict (-41) or DeliveryUnavailable (-47).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pickupDate\": null,\n  \"pickupWindow\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -31: Order not found",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}/delivery/book",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}",
                    "delivery",
                    "book"
                  ]
                },
                "description": "Books the order's delivery with the store's delivery company (e.g. Dellyman). Not needed when the store books automatically.\n\nBoth body fields are optional: `pickupDate` (yyyy-MM-dd, in the store's time zone) and `pickupWindow` default to the next pickup in the merchant's window. Fails with NotFound (-31), NotConfigured (-42), Conflict (-41) or DeliveryUnavailable (-47).",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"pickupDate\": null,\n  \"pickupWindow\": null\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"Order not found\",\n  \"data\": null\n}"
            }
          ]
        },
        {
          "name": "Cancel order",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/order/{{orderNo}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "order",
                "{{orderNo}}"
              ]
            },
            "description": "Cancels a pending (stage 0) order. A missing or already-sold order answers NotFound (-31)."
          },
          "response": [
            {
              "name": "Error -31: No pending order SO261120B001C0001 to cancel",
              "originalRequest": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/order/{{orderNo}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "order",
                    "{{orderNo}}"
                  ]
                },
                "description": "Cancels a pending (stage 0) order. A missing or already-sold order answers NotFound (-31)."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -31,\n  \"errorMessage\": \"No pending order SO261120B001C0001 to cancel\",\n  \"data\": null\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Paystack",
      "description": "A thin pass-through to Paystack for shops that run their own Paystack checkout. **Neither endpoint touches an order**: to pay for an order, use **Orders › Pay for order** and **Settle order**.",
      "item": [
        {
          "name": "Initialize payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/paystack/initialize",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "paystack",
                "initialize"
              ]
            },
            "description": "Opens a Paystack transaction for an amount in kobo (100 kobo = 1 naira). Saves `reference` to the `paymentReference` variable.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{customerEmail}}\",\n  \"amountInKobo\": 500000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Error -42: Payment gateway rejected the request (HTTP 401)",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/paystack/initialize",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "paystack",
                    "initialize"
                  ]
                },
                "description": "Opens a Paystack transaction for an amount in kobo (100 kobo = 1 naira). Saves `reference` to the `paymentReference` variable.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"{{customerEmail}}\",\n  \"amountInKobo\": 500000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"errorCode\": -42,\n  \"errorMessage\": \"Payment gateway rejected the request (HTTP 401)\",\n  \"data\": null\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.errorCode === 0 && body.data && body.data.reference) {",
                  "    pm.collectionVariables.set(\"paymentReference\", body.data.reference);",
                  "    console.log(\"Saved paymentReference =\", body.data.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Verify payment",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/paystack/verify?reference={{paymentReference}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "paystack",
                "verify"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "{{paymentReference}}",
                  "description": "Paystack reference (required)"
                }
              ]
            },
            "description": "What Paystack reports for a reference."
          },
          "response": []
        }
      ]
    }
  ]
}
