{
  "info": {
    "name": "GoOrder Partner API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Stable, versioned REST API for partners. Authenticate with a secret API key, browse live menus, place and track orders, and receive signed webhooks.\n\nStart with the **Quickstart** on the developer portal. Use a `gok_test_…` key to try everything in the sandbox first."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://back.goorder.com/api/partner/v1"
    },
    {
      "key": "apiKey",
      "value": "gok_test_…"
    },
    {
      "key": "store_id",
      "value": ""
    },
    {
      "key": "item_id",
      "value": ""
    },
    {
      "key": "order_id",
      "value": ""
    },
    {
      "key": "delivery_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Account",
      "item": [
        {
          "name": "Check your key",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/ping",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "ping"
              ],
              "query": [],
              "variable": []
            },
            "description": "Verifies authentication and returns the partner, environment, scopes and rate limit attached to the API key. Use it as a connectivity check."
          }
        }
      ]
    },
    {
      "name": "Stores",
      "item": [
        {
          "name": "List stores",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores"
              ],
              "query": [],
              "variable": []
            },
            "description": "Stores you can order from. Pass `lat` and `lng` to get only the stores that deliver to that point, nearest first, each with its distance. `status` reflects opening hours, snoozes and restaurant availability right now."
          }
        },
        {
          "name": "Get a store",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores/:store_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores",
                ":store_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "store_id",
                  "value": "{{store_id}}"
                }
              ]
            },
            "description": "Full store profile including opening hours."
          }
        },
        {
          "name": "Get a store’s menu",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores/:store_id/menu",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores",
                ":store_id",
                "menu"
              ],
              "query": [],
              "variable": [
                {
                  "key": "store_id",
                  "value": "{{store_id}}"
                }
              ]
            },
            "description": "The whole menu grouped by category, with prices, availability and modifier groups. Cache it for a few minutes; use `available` to grey out items."
          }
        },
        {
          "name": "Get one menu item",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores/:store_id/items/:item_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores",
                ":store_id",
                "items",
                ":item_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "store_id",
                  "value": "{{store_id}}"
                },
                {
                  "key": "item_id",
                  "value": "{{item_id}}"
                }
              ]
            },
            "description": "A single item with its modifier groups."
          }
        },
        {
          "name": "Quote delivery to an address",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores/:store_id/delivery-quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores",
                ":store_id",
                "delivery-quote"
              ],
              "query": [
                {
                  "key": "lat",
                  "value": "25.2048"
                },
                {
                  "key": "lng",
                  "value": "55.2708"
                }
              ],
              "variable": [
                {
                  "key": "store_id",
                  "value": "{{store_id}}"
                }
              ]
            },
            "description": "Is the address inside the delivery area, how far, and what the delivery fee will be. Call before creating an order."
          }
        },
        {
          "name": "Search stores and dishes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/search",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "search"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "string"
                }
              ],
              "variable": []
            },
            "description": "Search by name across stores and menu items."
          }
        },
        {
          "name": "List categories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/categories",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "categories"
              ],
              "query": [],
              "variable": []
            },
            "description": "Top-level food categories (Burgers, Pizza, …)."
          }
        }
      ]
    },
    {
      "name": "Offers",
      "item": [
        {
          "name": "Offers near a location",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/offers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "offers"
              ],
              "query": [],
              "variable": []
            },
            "description": "Active promotions that can be redeemed by a customer at this location."
          }
        },
        {
          "name": "Offers for a store",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/stores/:store_id/offers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "stores",
                ":store_id",
                "offers"
              ],
              "query": [],
              "variable": [
                {
                  "key": "store_id",
                  "value": "{{store_id}}"
                }
              ]
            },
            "description": "Store-wide offers that will be applied automatically to an order from this store."
          }
        },
        {
          "name": "Validate a promo code",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/promo-codes/validate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "promo-codes",
                "validate"
              ],
              "query": [],
              "variable": []
            },
            "description": "Checks a code against a store and basket value and returns the discount it would give. Codes are redeemed when you create the order with `promo_code`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"WELCOME10\",\n  \"store_id\": \"66f1a2b3c4d5e6f708192a3b\",\n  \"subtotal\": 85\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Orders",
      "item": [
        {
          "name": "Create an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [],
              "variable": []
            },
            "description": "Places an order with the restaurant. Prices are always calculated by GoOrder — you never send them. **Send an `Idempotency-Key` header** (any unique string, e.g. your order id): retrying with the same key returns the original order instead of creating a duplicate. For `payment_method: \"card\"` the order is held until the customer pays; call *Create a payment link*.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"store_id\": \"66f1a2b3c4d5e6f708192a3b\",\n  \"fulfilment\": \"delivery\",\n  \"items\": [\n    {\n      \"item_id\": \"66f1a2b3c4d5e6f708192a50\",\n      \"quantity\": 2,\n      \"modifier_ids\": [],\n      \"notes\": \"No onions\"\n    }\n  ],\n  \"customer\": {\n    \"name\": \"Sara Ahmed\",\n    \"phone\": \"+971501234567\"\n  },\n  \"delivery_address\": {\n    \"line1\": \"Marina Tower\",\n    \"building\": \"Marina Tower\",\n    \"floor\": \"12\",\n    \"apartment\": \"1204\",\n    \"area\": \"Dubai Marina\",\n    \"city\": \"Dubai\",\n    \"location\": {\n      \"lat\": 25.0805,\n      \"lng\": 55.1403\n    }\n  },\n  \"payment_method\": \"cash\",\n  \"reference\": \"PARTNER-100234\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List your orders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [],
              "variable": []
            },
            "description": "Orders created with your keys in this environment, newest first."
          }
        },
        {
          "name": "Get an order",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}"
                }
              ]
            },
            "description": "Current state of one order."
          }
        },
        {
          "name": "Track an order",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/tracking",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "tracking"
              ],
              "query": [],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}"
                }
              ]
            },
            "description": "Status timeline and, while a rider is delivering, the rider and their live position. Poll every 10–15 seconds at most — or use webhooks."
          }
        },
        {
          "name": "Cancel an order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "cancel"
              ],
              "query": [],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}"
                }
              ]
            },
            "description": "Cancels an order that the restaurant has not started preparing. Card orders that were already paid are reviewed by GoOrder support for refund.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Customer changed their mind\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create a payment link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/:order_id/payment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                ":order_id",
                "payment"
              ],
              "query": [],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}"
                }
              ]
            },
            "description": "For orders created with `payment_method: \"card\"`: returns a hosted payment page URL to send the customer to. The link is single-use: if the customer comes back later, call this endpoint again for a fresh one. When the customer pays, you receive an `order.payment_updated` webhook."
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Get your webhook endpoint",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/endpoint",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "endpoint"
              ],
              "query": [],
              "variable": []
            },
            "description": "The URL events are delivered to. The signing secret is never returned here."
          }
        },
        {
          "name": "Set your webhook endpoint",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/endpoint",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "endpoint"
              ],
              "query": [],
              "variable": []
            },
            "description": "Registers or changes the HTTPS URL that receives events. The first time, a signing secret (`whsec_…`) is generated and returned **once** — store it to verify signatures.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://partner.example.com/hooks/goorder\",\n  \"events\": [\n    \"order.status_changed\",\n    \"order.payment_updated\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Rotate the signing secret",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/endpoint/rotate-secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "endpoint",
                "rotate-secret"
              ],
              "query": [],
              "variable": []
            },
            "description": "Generates a new secret and returns it once. The old secret stops working immediately."
          }
        },
        {
          "name": "Send a test event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "test"
              ],
              "query": [],
              "variable": []
            },
            "description": "Queues a `webhook.test` event to your endpoint so you can verify your signature check."
          }
        },
        {
          "name": "List webhook deliveries",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "deliveries"
              ],
              "query": [],
              "variable": []
            },
            "description": "Recent deliveries with their status and your server’s last response. Kept for 30 days."
          }
        },
        {
          "name": "Redeliver an event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/deliveries/:delivery_id/redeliver",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "deliveries",
                ":delivery_id",
                "redeliver"
              ],
              "query": [],
              "variable": [
                {
                  "key": "delivery_id",
                  "value": "{{delivery_id}}"
                }
              ]
            },
            "description": "Re-sends a delivery (any status) immediately — useful after fixing your endpoint."
          }
        }
      ]
    },
    {
      "name": "Sandbox",
      "item": [
        {
          "name": "Advance a sandbox order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/sandbox/orders/:order_id/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "orders",
                ":order_id",
                "advance"
              ],
              "query": [],
              "variable": [
                {
                  "key": "order_id",
                  "value": "{{order_id}}"
                }
              ]
            },
            "description": "Sandbox keys only. Moves a sandbox order to the next status (or a specific one) and fires the matching webhook, so you can test your whole integration without a real restaurant. Use `payment` to simulate the customer paying.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"preparing\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}