{
  "info": {
    "name": "Let's Pizza Partner API",
    "description": "Let's Pizza Partner API 1.0.0. Set baseUrl to your environment's address and apiKey to your key (lpk_test_… on the sandbox). Generated from the OpenAPI document.",
    "version": "1.0.0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.example.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Identity",
      "description": "Who the key is and what it may do.",
      "item": [
        {
          "name": "The key, its partner and settings",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "me"
              ]
            },
            "description": "The key, its partner and settings\n\nAny valid key may call it: the first call to make with a new key. `environment` is the host’s (always the key’s own, or the key would be refused). `settings` say how orders, statuses, the menu and invoices flow for your system."
          },
          "response": []
        },
        {
          "name": "OAuth 2.0 access token (client credentials)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/oauth/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "oauth",
                "token"
              ]
            },
            "description": "OAuth 2.0 access token (client credentials)\n\nFor systems that prefer OAuth to a fixed key. `grant_type=client_credentials`, `client_id` = your key’s id (the `key.id` of `GET /me`), `client_secret` = the key; in a JSON or form body, or in HTTP Basic. The answer is a bearer token `lpt_…` valid for one hour (never past the key’s own end) with the key’s scopes: send it as `Authorization: Bearer` exactly like the key. A revoked key stops its tokens at once. Refusals carry `detail.error` (`invalid_client`, `unsupported_grant_type`, `invalid_request`).",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"grant_type\": \"client_credentials\",\n  \"client_id\": \"key_01JD5ZC9\",\n  \"client_secret\": \"lpk_test_…\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Your request log",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/logs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "logs"
              ],
              "query": [
                {
                  "key": "before",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ]
            },
            "description": "Your request log\n\nEvery request of your keys in this environment (refusals included), newest first, kept 30 days; never a body. `nextBefore` pages back. Quote a `requestId` to support."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Branches",
      "description": "Let's Pizza branches as the key may see them (hours and zones stay in the Let's Pizza console).",
      "item": [
        {
          "name": "The branches the key may act on",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/branches",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "branches"
              ]
            },
            "description": "The branches the key may act on\n\nScope `branches:read`. `live` = your flows run at that branch; `externalCode` = your code for it once mapped."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Menu",
      "description": "The published menu with your codes, and the mapping between Let's Pizza ids and your codes.",
      "item": [
        {
          "name": "The published menu with your codes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "If-None-Match",
                "value": "",
                "description": "",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/catalog",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "catalog"
              ]
            },
            "description": "The published menu with your codes\n\nScope `catalog:read`. The menu customers see now (categories, products — one per size —, modifier groups and options with their prices in halalas, VAT-inclusive), and under `external` your code for every id you mapped. Send `If-None-Match` with the last `ETag`: 304 when nothing changed (the menu or your mappings)."
          },
          "response": []
        },
        {
          "name": "Your codes for our ids",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/mappings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "mappings"
              ]
            },
            "description": "Your codes for our ids\n\nScope `catalog:read`. Every mapping of this key's environment: branches, categories, products (with your size as `variant`), groups, options, tenders (`online_card`, `online_apple_pay`, `online_stc_pay`, `cash_on_delivery`, `card_on_delivery`, `pay_at_branch`, `card_at_branch`)."
          },
          "response": []
        },
        {
          "name": "Set your codes",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/mappings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "mappings"
              ]
            },
            "description": "Set your codes\n\nScope `mappings:write`. All or nothing: any bad row refuses the whole request (422 with `errors[]`: UNKNOWN_ID, DUPLICATE_ROW, CODE_TAKEN). `merge` adds and replaces the rows sent; `replace` also removes the mappings of the kinds sent that are not listed. `dryRun` checks and counts only. An order whose branch, products or options are not mapped still reaches you: `external.unmapped` lists what is missing.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"merge\",\n  \"dryRun\": true,\n  \"items\": [\n    {\n      \"kind\": \"branch\",\n      \"ourId\": \"string\",\n      \"code\": \"string\",\n      \"variant\": \"string\",\n      \"unit\": \"string\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Your last menus",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/catalog/imports",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "catalog",
                "imports"
              ]
            },
            "description": "Your last menus\n\nScope `catalog:write`. Newest first, with what became of each."
          },
          "response": []
        },
        {
          "name": "Send your menu",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/catalog/imports",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "catalog",
                "imports"
              ]
            },
            "description": "Send your menu\n\nScope `catalog:write`, and your settings must name you the menu source. Your codes are matched to Let's Pizza ids through your mappings; only the fields your settings give you change (names, descriptions, prices, groups, options, categories, availability). Pictures, the pizza builder, display order and sections stay with Let's Pizza. A code with no mapping is listed in `unknown`, never added on its own. `blocked`, and in a `full` menu a mapped product you no longer list, take the item off at your live branches (never a deletion). The candidate is checked like any menu edit (`issues`) and compared with what customers see (`diff`). Then your publish policy decides: `manual` waits for Let's Pizza staff (`staged`); `auto_prices` publishes price-only changes within `maxPriceChangePct`; `auto` publishes unless more than `maxRemovals` products would go. `dryRun` returns the report without keeping it. A newer menu replaces a staged one (`superseded`).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"full\",\n  \"dryRun\": true,\n  \"categories\": [\n    {\n      \"code\": \"string\",\n      \"nameAr\": \"string\",\n      \"nameEn\": \"string\",\n      \"sortOrder\": 0,\n      \"blocked\": true\n    }\n  ],\n  \"items\": [\n    {\n      \"code\": \"string\",\n      \"nameAr\": \"string\",\n      \"nameEn\": \"string\",\n      \"descriptionAr\": \"string\",\n      \"descriptionEn\": \"string\",\n      \"categoryCode\": \"string\",\n      \"price\": 0,\n      \"variants\": [\n        {\n          \"code\": \"string\",\n          \"price\": 0,\n          \"blocked\": true\n        }\n      ],\n      \"groupCodes\": [\n        \"string\"\n      ],\n      \"blocked\": true\n    }\n  ],\n  \"groups\": [\n    {\n      \"code\": \"string\",\n      \"nameAr\": \"string\",\n      \"nameEn\": \"string\",\n      \"minSelect\": 0,\n      \"maxSelect\": 1,\n      \"maxPerOption\": 1,\n      \"options\": [\n        {\n          \"code\": \"string\",\n          \"nameAr\": \"string\",\n          \"nameEn\": \"string\",\n          \"price\": 0,\n          \"pricesBySize\": {\n            \"medium\": 0,\n            \"large\": 0\n          },\n          \"blocked\": true\n        }\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "One menu import",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/catalog/imports/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "catalog",
                "imports",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "One menu import\n\nScope `catalog:write`."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Orders",
      "description": "The order feed, acknowledgement, statuses, cancellations, facts (receipts, invoices, money collected) and payments.",
      "item": [
        {
          "name": "The order feed",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders"
              ],
              "query": [
                {
                  "key": "state",
                  "value": "awaiting_ack",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "branchId",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "updatedSince",
                  "value": "",
                  "description": "ISO 8601 instant: only orders changed after it.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `nextCursor` of the previous page.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "description": "",
                  "disabled": true
                }
              ]
            },
            "description": "The order feed\n\nScope `orders:read`. Your orders, oldest change first. An order becomes yours when your settings say (`placed` if you accept orders, `accepted` if Let's Pizza accepts them first, `ready` for a delivery fleet), at your live branches. Poll with `state=awaiting_ack` (default) and acknowledge each; or follow everything with `state=all` and the last `nextCursor` (or `updatedSince`): any change of an order (a status, your acknowledgement) brings it back."
          },
          "response": []
        },
        {
          "name": "One order of the feed",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "One order of the feed\n\nScope `orders:read`."
          },
          "response": []
        },
        {
          "name": "Acknowledge an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id/ack",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id",
                "ack"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "Acknowledge an order\n\nScope `orders:ack`. The order reached your system. Send your own numbers when you have them. Acknowledge within `settings.orders.ackMinutes` or Let's Pizza is alerted (`order.ack_overdue`). A repeat with the same numbers answers the same; other numbers are 409 ACK_CONFLICT. Answers the order as it is now.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalOrderNo\": \"WEB-ORD-000123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Report a status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id",
                "status"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "Report a status\n\nScope `orders:status`; `to` must be in your `settings.orders.statuses`. The order moves forward only, through the steps between (a `ready` before `preparing` passes both); one behind it is `ignored`; a finished order never moves. `rejected` applies from `placed`, `cancelled` from `placed` or `accepted`: later they are `parked` for a person. `delivery_failed` needs a `reasonCode` (or `reasonText`). Each `eventId` is applied once (`duplicate`).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"eventId\": \"BC-EVT-000985\",\n  \"to\": \"preparing\",\n  \"expectedFrom\": \"accepted\",\n  \"occurredAt\": \"2026-11-19T19:35:02+03:00\",\n  \"estimatedReadyAt\": \"2026-11-19T19:50:00+03:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Cancel an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "Cancel an order\n\nScope `orders:cancel`. Applies before the kitchen starts (`placed`, `accepted`); later it is `parked` and Let’s Pizza staff decide (the food may be made and paid). Same answer and rules as a status.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"eventId\": \"BC-EVT-000985\",\n  \"reasonCode\": \"customer_request\",\n  \"reasonText\": \"العميل اتصل بالفرع وألغى الطلب\",\n  \"occurredAt\": \"2026-11-19T19:35:02+03:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Record a fact on an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id",
                "events"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "Record a fact on an order\n\nScope `orders:events`. `receipt_issued` (`receiptNo`), `invoice_issued` (`invoiceNo`, optional ZATCA `invoiceQr`), `payment_collected` (`amount` in halalas, `tender`), `note` (`note`). Each `eventId` once.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"eventId\": \"BC-EVT-000985\",\n  \"type\": \"payment_collected\",\n  \"amount\": 11400,\n  \"tender\": \"cash\",\n  \"occurredAt\": \"2026-11-19T19:35:02+03:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "How an order is paid",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/orders/:id/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "orders",
                ":id",
                "payments"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": "The Let's Pizza order id (`order.id`)."
                }
              ]
            },
            "description": "How an order is paid\n\nScope `payments:read`. The method, what was paid and refunded (halalas), the online payment attempts and the refunds."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Availability",
      "description": "What is out at a branch now, from your POS or ERP.",
      "item": [
        {
          "name": "Your unavailable items at a branch (whole list)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/branches/:id/availability",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "branches",
                ":id",
                "availability"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "28",
                  "description": "The Let's Pizza branch id."
                }
              ]
            },
            "description": "Your unavailable items at a branch (whole list)\n\nScope `availability:write`. Everything your system says is out at this branch now, by our id or your code: your earlier flags not listed are cleared. A flag branch staff set is never cleared by you (`keptStaff`). Changes reach the website and the app at once.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"kind\": \"product\",\n      \"id\": \"649\",\n      \"available\": false\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Change availability at a branch",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/branches/:id/availability",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "branches",
                ":id",
                "availability"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "28",
                  "description": "The Let's Pizza branch id."
                }
              ]
            },
            "description": "Change availability at a branch\n\nScope `availability:write`. Only the items listed: `available: false` takes one off, `true` puts back one you took off.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    {\n      \"kind\": \"product\",\n      \"id\": \"649\",\n      \"available\": false\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Reports",
      "description": "Your day as Let’s Pizza counts it, and the daily reconciliation.",
      "item": [
        {
          "name": "Your day per branch",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/reports/daily?date=string",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "reports",
                "daily"
              ],
              "query": [
                {
                  "key": "date",
                  "value": "string",
                  "description": ""
                },
                {
                  "key": "branchId",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ]
            },
            "description": "Your day per branch\n\nScope `reports:read`. Your orders created on a Riyadh calendar day (00:00–24:00 +03:00) at the branches your key may see: per branch how many, served (delivered or picked up), ended unserved, still open, the served total and refunds (halalas, VAT-inclusive); and the served orders with your order numbers. Use it every morning for the day before."
          },
          "response": []
        },
        {
          "name": "Compare your count of a day with ours",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/reports/reconciliation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "reports",
                "reconciliation"
              ]
            },
            "description": "Compare your count of a day with ours\n\nScope `reports:read`. Send your served count and total per branch (and, best, your order numbers): the answer says per branch whether they match, which of your numbers we do not know, and which of our served orders you did not list. Nothing is stored.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"date\": \"string\",\n  \"branches\": [\n    {\n      \"branchId\": \"28\",\n      \"served\": 0,\n      \"servedTotal\": 0,\n      \"externalOrderNos\": [\n        \"string\"\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Sandbox",
      "description": "Tools that exist on the sandbox only: test orders.",
      "item": [
        {
          "name": "Place a test order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/sandbox/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "sandbox",
                "orders"
              ]
            },
            "description": "Place a test order\n\nSandbox only (403 SANDBOX_ONLY on production). Scopes `orders:read` and `orders:status`. A real order on the sandbox, made the way a customer’s is (quote, then order), so it reaches your feed, your webhooks and your connector like any order — at a branch your key may act on. Lines absent = one Margherita. Then move it with your status calls, or let the sandbox branch staff do it.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"branchId\": \"28\",\n  \"fulfilment\": \"pickup\",\n  \"paymentMethod\": \"pay_at_branch\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Your own signed webhook subscriptions: events pushed to your address instead of polling.",
      "item": [
        {
          "name": "Your subscriptions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks"
              ]
            },
            "description": "Your subscriptions\n\nScope `webhooks:manage`. Your own subscriptions on the Let’s Pizza webhook service: signed deliveries (`X-LP-Signature: v1=<hex HMAC-SHA256(secret, \"<X-LP-Timestamp>.<raw body>\")>`), retries after 1 min, 5 min, 30 min, 2 h and 12 h, a delivery log and replay. The branches are your key’s; whether the customer’s full details travel is your `settings.customerData`, not the request."
          },
          "response": []
        },
        {
          "name": "Subscribe an address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Your unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks"
              ]
            },
            "description": "Subscribe an address\n\nScope `webhooks:manage`. Your own subscriptions on the Let’s Pizza webhook service: signed deliveries (`X-LP-Signature: v1=<hex HMAC-SHA256(secret, \"<X-LP-Timestamp>.<raw body>\")>`), retries after 1 min, 5 min, 30 min, 2 h and 12 h, a delivery log and replay. The branches are your key’s; whether the customer’s full details travel is your `settings.customerData`, not the request. The signing secret is returned this once (a replay of the same request answers the subscription with an empty secret: rotate it if it was lost).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"string\",\n  \"url\": \"string\",\n  \"events\": [\n    \"order.created\"\n  ],\n  \"branches\": [\n    \"string\"\n  ],\n  \"pii\": true,\n  \"active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "One subscription",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "One subscription"
          },
          "response": []
        },
        {
          "name": "Change a subscription",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "Change a subscription",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"string\",\n  \"url\": \"string\",\n  \"events\": [\n    \"order.created\"\n  ],\n  \"branches\": [\n    \"string\"\n  ],\n  \"pii\": true,\n  \"active\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Remove a subscription and its log",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "Remove a subscription and its log"
          },
          "response": []
        },
        {
          "name": "A new signing secret",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id/secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id",
                "secret"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "A new signing secret\n\nReturned this once; the old secret stops working at once."
          },
          "response": []
        },
        {
          "name": "Send a signed ping now",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id",
                "test"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "Send a signed ping now\n\nOne attempt, logged like any delivery, never retried."
          },
          "response": []
        },
        {
          "name": "The delivery log",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id",
                "deliveries"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "Comma-separated: pending, delivered, failed, dead.",
                  "disabled": true
                },
                {
                  "key": "before",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                }
              ]
            },
            "description": "The delivery log"
          },
          "response": []
        },
        {
          "name": "Send a delivery again",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/partner/v1/webhooks/:id/deliveries/:deliveryId/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "partner",
                "v1",
                "webhooks",
                ":id",
                "deliveries",
                ":deliveryId",
                "replay"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
                  "description": ""
                },
                {
                  "key": "deliveryId",
                  "value": "string",
                  "description": ""
                }
              ]
            },
            "description": "Send a delivery again\n\nA new delivery of the same envelope (same `id`: deduplicate on it), sent by the worker."
          },
          "response": []
        }
      ]
    }
  ]
}
