{
  "info": {
    "name": "Restofy POS API",
    "_postman_id": "6a4c1f0e-2d1b-4f7e-9b3a-5c8d2e7f1a90",
    "description": "Sürüm 1.0. Rehber ve API referansı: https://dev.restofytech.com\n\n1. `branchToken` değişkenine Restofy'ın verdiği anahtarı yazın.\n2. Test anahtarıyla önce **Test siparişi aç**, sonra **Olayları oku** ve **Siparişi oku** isteklerini çalıştırın: `orderId` ve `cursor` kendiliğinden dolar.\n3. Kabul ve iptal aynı siparişin iki ayrı senaryosudur; her birini ayrı test siparişinde deneyin.\n\nHer isteğin Examples bölümünde örnek cevap vardır.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{branchToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://panel.restofytech.com/api/pos/v1",
      "type": "string"
    },
    {
      "key": "branchToken",
      "value": "",
      "type": "string",
      "description": "rpos_test_… ya da rpos_live_…. Gizlidir, paylaşılan ortamda saklamayın."
    },
    {
      "key": "orderId",
      "value": "",
      "type": "string",
      "description": "Test siparişi açınca kendiliğinden dolar."
    },
    {
      "key": "cursor",
      "value": "",
      "type": "string",
      "description": "Olayları oku çalışınca nextCursor ile dolar."
    }
  ],
  "item": [
    {
      "name": "Kurulum",
      "item": [
        {
          "name": "Şubeyi doğrula",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/branch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "branch"
              ]
            },
            "description": "Anahtarın bağlı olduğu şube, para birimi, saat dilimi ve kanallar."
          },
          "response": [
            {
              "name": "Şube",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/branch",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "branch"
                  ]
                },
                "description": "Anahtarın bağlı olduğu şube, para birimi, saat dilimi ve kanallar."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"connection\": {\n    \"id\": \"8d0ab7bb-d251-4cd3-9375-4c05b1155fdc\",\n    \"name\": \"NarPOS\",\n    \"mode\": \"TEST\",\n    \"feedStartsAt\": \"2026-11-25T08:00:00.000Z\"\n  },\n  \"branch\": {\n    \"branchId\": \"pos-test-kadikoy\",\n    \"code\": \"K7MPQ2\",\n    \"name\": \"Kadıköy\",\n    \"brandName\": \"Restofy POS Test\",\n    \"phone\": \"+90 216 000 0000\",\n    \"isActive\": true,\n    \"country\": \"TR\",\n    \"currency\": \"TRY\",\n    \"timeZone\": \"Europe/Istanbul\",\n    \"autoAcceptOrders\": false,\n    \"channels\": {\n      \"delivery\": true,\n      \"pickup\": true,\n      \"selfService\": false,\n      \"shipping\": false\n    }\n  }\n}"
            }
          ]
        },
        {
          "name": "Menüyü oku",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/catalog",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "catalog"
              ]
            },
            "description": "Şubenin satıştaki ürünleri ve seçenekleri. productId ve (groupId, choiceId) kasa ürünleriyle eşlenir."
          },
          "response": [
            {
              "name": "Menü",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/catalog",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "catalog"
                  ]
                },
                "description": "Şubenin satıştaki ürünleri ve seçenekleri. productId ve (groupId, choiceId) kasa ürünleriyle eşlenir."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"currency\": \"TRY\",\n  \"categories\": [\n    {\n      \"categoryId\": \"8e824e0f-3c32-4439-a28f-1d84b02dd86b\",\n      \"name\": \"Kahveler\",\n      \"aisle\": null,\n      \"products\": [\n        {\n          \"productId\": \"484fceb5-bb32-4e12-8ba1-4005342648e7\",\n          \"name\": \"Filtre Kahve\",\n          \"description\": \"Günün çekirdeği\",\n          \"priceMinor\": 9000,\n          \"vatRatePercent\": 10,\n          \"isAvailable\": true,\n          \"barcode\": null,\n          \"imageUrl\": null,\n          \"soldByWeight\": false,\n          \"depositMinor\": 0,\n          \"optionGroups\": [\n            {\n              \"groupId\": \"142fbf4d-4632-4cf8-be74-160bb0269fdf\",\n              \"name\": \"Boy\",\n              \"minSelections\": 1,\n              \"maxSelections\": 1,\n              \"choices\": [\n                {\n                  \"choiceId\": \"a417f0bc-42f7-488e-9909-32f04b7881ca\",\n                  \"name\": \"Küçük\",\n                  \"priceModifierMinor\": 0,\n                  \"isAvailable\": true,\n                  \"isDefault\": true\n                },\n                {\n                  \"choiceId\": \"f5db8835-8812-4e65-b5d2-9d0620675941\",\n                  \"name\": \"Büyük\",\n                  \"priceModifierMinor\": 1000,\n                  \"isAvailable\": true,\n                  \"isDefault\": false\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Siparişler",
      "item": [
        {
          "name": "Olayları oku",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/order-events?cursor={{cursor}}&limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "order-events"
              ],
              "query": [
                {
                  "key": "cursor",
                  "value": "{{cursor}}"
                },
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": "Yeni ve değişen siparişler, yazıldıkları sırayla. İlk çağrıda cursor boş kalır; sonra kaydedilen nextCursor gönderilir."
          },
          "response": [
            {
              "name": "Bir sayfa",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/order-events?cursor={{cursor}}&limit=50",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "order-events"
                  ],
                  "query": [
                    {
                      "key": "cursor",
                      "value": "{{cursor}}"
                    },
                    {
                      "key": "limit",
                      "value": "50"
                    }
                  ]
                },
                "description": "Yeni ve değişen siparişler, yazıldıkları sırayla. İlk çağrıda cursor boş kalır; sonra kaydedilen nextCursor gönderilir."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"events\": [\n    {\n      \"eventId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34:1\",\n      \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n      \"orderNumber\": \"HZLVHGFK\",\n      \"version\": 1,\n      \"status\": \"PENDING\",\n      \"changedAt\": \"2026-11-25T09:00:00.309Z\"\n    }\n  ],\n  \"nextCursor\": \"MXw4ZDBhYjdiYi1kMjUxLTRjZDMtOTM3NS00YzA1YjExNTVmZGN8MTE2MzU0fDg4MjY0OWM1\",\n  \"hasMore\": false\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.ok) pm.collectionVariables.set('cursor', body.nextCursor);",
                  "if (body.ok && body.events.length) pm.collectionVariables.set('orderId', body.events[body.events.length - 1].orderId);"
                ]
              }
            }
          ]
        },
        {
          "name": "Siparişi oku",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/orders/{{orderId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                "{{orderId}}"
              ]
            },
            "description": "Siparişin güncel hali: satırlar, seçimler, kuruş cinsinden toplamlar, ödeme, müşteri ve adres."
          },
          "response": [
            {
              "name": "Sipariş",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}"
                  ]
                },
                "description": "Siparişin güncel hali: satırlar, seçimler, kuruş cinsinden toplamlar, ödeme, müşteri ve adres."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"order\": {\n    \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n    \"orderNumber\": \"HZLVHGFK\",\n    \"version\": 1,\n    \"status\": \"PENDING\",\n    \"channel\": \"DELIVERY\",\n    \"source\": \"RESTOFY\",\n    \"isTest\": false,\n    \"currency\": \"TRY\",\n    \"createdAt\": \"2026-11-25T09:00:00.309Z\",\n    \"updatedAt\": \"2026-11-25T09:00:00.309Z\",\n    \"alertAt\": \"2026-11-25T09:00:00.308Z\",\n    \"scheduledFor\": null,\n    \"estimatedAt\": \"2026-11-25T09:40:00.308Z\",\n    \"acceptedAt\": null,\n    \"pickedUpAt\": null,\n    \"deliveredAt\": null,\n    \"cancelledAt\": null,\n    \"cancellation\": null,\n    \"actions\": {\n      \"advanceTo\": \"PREPARING\",\n      \"cancellable\": true\n    },\n    \"customer\": {\n      \"name\": \"Ayşe Yılmaz\",\n      \"phone\": \"+905321112233\"\n    },\n    \"delivery\": {\n      \"address\": \"Moda Cd. 12\",\n      \"district\": \"Kadıköy\",\n      \"city\": \"İstanbul\",\n      \"detail\": \"No: 12 · Kat: 3 · Daire: 7\",\n      \"buildingNo\": \"12\",\n      \"floor\": \"3\",\n      \"apartment\": \"7\",\n      \"directions\": \"Eczanenin üstü\",\n      \"latitude\": 40.9862,\n      \"longitude\": 29.0253\n    },\n    \"notes\": \"Zili çalmayın\",\n    \"items\": [\n      {\n        \"lineId\": \"2525e7be-85f3-4d76-a7b6-5abd4892cc7a\",\n        \"productId\": \"484fceb5-bb32-4e12-8ba1-4005342648e7\",\n        \"name\": \"Filtre Kahve\",\n        \"quantity\": 2,\n        \"unitPriceMinor\": 10000,\n        \"lineTotalMinor\": 20000,\n        \"vatRatePercent\": 10,\n        \"barcode\": null,\n        \"notes\": null,\n        \"options\": [\n          {\n            \"groupId\": \"142fbf4d-4632-4cf8-be74-160bb0269fdf\",\n            \"groupName\": \"Boy\",\n            \"choiceId\": \"f5db8835-8812-4e65-b5d2-9d0620675941\",\n            \"choiceName\": \"Büyük\",\n            \"priceModifierMinor\": 1000\n          }\n        ],\n        \"missingQuantity\": null,\n        \"depositMinor\": 0\n      }\n    ],\n    \"totals\": {\n      \"subtotalMinor\": 20000,\n      \"deliveryFeeMinor\": 1500,\n      \"serviceFeeMinor\": 0,\n      \"discountMinor\": 2500,\n      \"taxMinor\": 0,\n      \"tipMinor\": 0,\n      \"depositMinor\": 0,\n      \"totalMinor\": 19000,\n      \"returnedMinor\": 0\n    },\n    \"payment\": {\n      \"method\": \"ONLINE\",\n      \"mealCard\": null,\n      \"paidOnline\": true,\n      \"amountToCollectMinor\": 0\n    },\n    \"courier\": null,\n    \"shipment\": null\n  }\n}"
            },
            {
              "name": "Başka şubenin siparişi",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}"
                  ]
                },
                "description": "Siparişin güncel hali: satırlar, seçimler, kuruş cinsinden toplamlar, ödeme, müşteri ve adres."
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": false,\n  \"error\": \"ORDER_NOT_FOUND\",\n  \"message\": \"Sipariş bulunamadı.\",\n  \"orderId\": \"00000000-0000-4000-8000-000000000000\"\n}"
            }
          ]
        },
        {
          "name": "Kabul et",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/{{orderId}}/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                "{{orderId}}",
                "advance"
              ]
            },
            "description": "Kasada görülen durumdan bir sonraki adıma geçirir. Hazır, yola çıkar ve teslim için fromStatus'u kasadaki durumla değiştirin.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"prepMinutes\": 20\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Kabul edildi",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}/advance",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}",
                    "advance"
                  ]
                },
                "description": "Kasada görülen durumdan bir sonraki adıma geçirir. Hazır, yola çıkar ve teslim için fromStatus'u kasadaki durumla değiştirin.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"prepMinutes\": 20\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n  \"status\": \"PREPARING\"\n}"
            },
            {
              "name": "Başka ekranda ilerlemiş",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}/advance",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}",
                    "advance"
                  ]
                },
                "description": "Kasada görülen durumdan bir sonraki adıma geçirir. Hazır, yola çıkar ve teslim için fromStatus'u kasadaki durumla değiştirin.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"prepMinutes\": 20\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": false,\n  \"error\": \"ORDER_ALREADY_MOVED\",\n  \"message\": \"Bu sipariş başka bir ekranda güncellendi.\",\n  \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n  \"expectedStatus\": \"PENDING\",\n  \"status\": \"PREPARING\"\n}"
            }
          ]
        },
        {
          "name": "Hazır",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/{{orderId}}/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                "{{orderId}}",
                "advance"
              ]
            },
            "description": "Hazırlanan siparişi hazıra alır.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fromStatus\": \"PREPARING\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Hazır",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}/advance",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}",
                    "advance"
                  ]
                },
                "description": "Hazırlanan siparişi hazıra alır.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fromStatus\": \"PREPARING\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n  \"status\": \"READY\"\n}"
            }
          ]
        },
        {
          "name": "Reddet / iptal et",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders/{{orderId}}/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders",
                "{{orderId}}",
                "cancel"
              ]
            },
            "description": "Sebep koduyla iptal. OTHER için reasonNote (en az 10 karakter) zorunlu.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"reasonCode\": \"OUT_OF_STOCK\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "İptal edildi",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}",
                    "cancel"
                  ]
                },
                "description": "Sebep koduyla iptal. OTHER için reasonNote (en az 10 karakter) zorunlu.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"reasonCode\": \"OUT_OF_STOCK\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n  \"status\": \"CANCELLED\"\n}"
            },
            {
              "name": "Açıklamasız Diğer",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Her yeni kasiyer işlemi yeni anahtar alır. Tekrarı denemek için bir değeri sabitleyip iki kez gönderin."
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/orders/{{orderId}}/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "orders",
                    "{{orderId}}",
                    "cancel"
                  ]
                },
                "description": "Sebep koduyla iptal. OTHER için reasonNote (en az 10 karakter) zorunlu.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fromStatus\": \"PENDING\",\n  \"reasonCode\": \"OUT_OF_STOCK\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": false,\n  \"error\": \"VALIDATION_FAILED\",\n  \"message\": \"Girdi doğrulanamadı.\",\n  \"issues\": [\n    {\n      \"path\": \"reasonNote\",\n      \"message\": \"Diğer sebebini seçtiyseniz en az 10 karakterlik açıklama yazın.\"\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Test",
      "item": [
        {
          "name": "Test siparişi aç",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/test-orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "test-orders"
              ]
            },
            "description": "Yalnız test anahtarıyla. Gövde boş olabilir; şubenin menüsünden sipariş açılır.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"channel\": \"DELIVERY\",\n  \"payment\": \"CASH\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Açıldı",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/test-orders",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "test-orders"
                  ]
                },
                "description": "Yalnız test anahtarıyla. Gövde boş olabilir; şubenin menüsünden sipariş açılır.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"channel\": \"DELIVERY\",\n  \"payment\": \"CASH\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"order\": {\n    \"orderId\": \"882649c5-f468-434a-8d9d-e7228f9eaa34\",\n    \"orderNumber\": \"HZLVHGFK\",\n    \"totalMinor\": 11500\n  }\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body.ok) pm.collectionVariables.set('orderId', body.order.orderId);"
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
