{
  "info": {
    "_postman_id": "d5c9aaf9-0d0f-4f85-84ef-7be1f8f3510c",
    "name": "Sync",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Push Order Snapshot",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          },
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"source\": \"branch-sync\",\n  \"branch_uuid\": \"{{branch_uuid}}\",\n  \"events\": [\n    {\n      \"event_uuid\": \"9f2f74da-50c9-4e74-a365-c9d8764d1001\",\n      \"aggregate_type\": \"order\",\n      \"aggregate_uuid\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n      \"event_type\": \"orders.created\",\n      \"schema_version\": 1,\n      \"headers\": {\n        \"producer\": \"branch-app\",\n        \"sent_at\": \"2026-03-04T09:54:17Z\"\n      },\n      \"payload\": {\n        \"id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n        \"date\": \"2026-03-04\",\n        \"note\": \"\",\n        \"time\": \"11:54:17\",\n        \"type\": \"Delivery\",\n        \"status\": \"pending\",\n        \"address\": {\n          \"id\": \"7c46c43a-0592-4ed5-b0bb-42dd1d6e9230\",\n          \"notes\": \"1\",\n          \"street\": null,\n          \"address\": \"1\",\n          \"area_id\": 8,\n          \"city_id\": 7,\n          \"user_id\": 7,\n          \"building\": \"1\",\n          \"hotel_id\": null,\n          \"latitude\": \"30.0689000\",\n          \"is_active\": 1,\n          \"user_name\": \"جمعة\",\n          \"country_id\": \"9e80453d-561f-4f8c-8f99-865fd4ef8ecd\",\n          \"created_at\": \"2026-03-04T09:47:31.000000Z\",\n          \"created_by\": 159,\n          \"deleted_at\": null,\n          \"is_default\": 1,\n          \"longtitude\": \"31.2357000\",\n          \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n          \"address_type\": \"apartment\",\n          \"country_code\": \"+20\",\n          \"floor_number\": null,\n          \"address_phone\": \"01061455960\",\n          \"whatsapp_number\": \"01061455960\",\n          \"apartment_number\": \"1\",\n          \"whatsapp_number_code\": \"+20\"\n        },\n        \"invoice\": {\n          \"id\": \"eba748a8-c8ef-407a-8d05-31f145666560\",\n          \"tax\": \"16.100\",\n          \"date\": \"2026-03-04\",\n          \"note\": \"\",\n          \"time\": \"11:03:54\",\n          \"status\": \"unpaid\",\n          \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n          \"coupon_id\": null,\n          \"is_active\": 1,\n          \"make_type\": \"cashier\",\n          \"parent_id\": null,\n          \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n          \"created_by\": 159,\n          \"deleted_at\": null,\n          \"deleted_by\": null,\n          \"order_type\": \"order\",\n          \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n          \"invoice_num\": \"INV-CS-32541\",\n          \"modified_by\": null,\n          \"coupon_value\": \"0.000\",\n          \"invoice_type\": \"invoice\",\n          \"service_fees\": \"0.000\",\n          \"delivery_fees\": \"0.000\",\n          \"original_price\": \"131.100\",\n          \"tax_percentage\": \"14.000\",\n          \"invoice_details\": [\n            {\n              \"id\": \"33f3e016-1483-4011-9fe3-734f9c56ddfa\",\n              \"tax\": \"2.100\",\n              \"note\": null,\n              \"type\": \"addon\",\n              \"status\": \"pending\",\n              \"quantity\": 1,\n              \"coupon_id\": null,\n              \"is_active\": 1,\n              \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"created_by\": 7,\n              \"deleted_at\": null,\n              \"deleted_by\": null,\n              \"details_id\": \"2afb7197-427a-4a04-96b4-1dcb4839fae5\",\n              \"invoice_id\": \"eba748a8-c8ef-407a-8d05-31f145666560\",\n              \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"modified_by\": null,\n              \"coupon_value\": \"0.000\",\n              \"dish_size_id\": null,\n              \"service_fees\": \"0.000\",\n              \"order_detail_id\": \"bd4ce880-5811-4029-a489-147ce14ccfcf\",\n              \"total_after_tax\": \"17.100\",\n              \"total_before_tax\": \"15.000\",\n              \"in_request_return\": 0,\n              \"total_before_coupon\": \"15.000\"\n            },\n            {\n              \"id\": \"692809d6-03e2-4d67-bfe0-bbc1e681f142\",\n              \"tax\": \"12.600\",\n              \"note\": \"\",\n              \"type\": \"dish\",\n              \"status\": \"pending\",\n              \"quantity\": 1,\n              \"coupon_id\": null,\n              \"is_active\": 1,\n              \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"created_by\": 7,\n              \"deleted_at\": null,\n              \"deleted_by\": null,\n              \"details_id\": \"bd4ce880-5811-4029-a489-147ce14ccfcf\",\n              \"invoice_id\": \"eba748a8-c8ef-407a-8d05-31f145666560\",\n              \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"modified_by\": null,\n              \"coupon_value\": \"0.000\",\n              \"dish_size_id\": 3,\n              \"service_fees\": \"0.000\",\n              \"order_detail_id\": null,\n              \"total_after_tax\": \"102.600\",\n              \"total_before_tax\": \"90.000\",\n              \"in_request_return\": 0,\n              \"total_before_coupon\": \"90.000\"\n            },\n            {\n              \"id\": \"badc45dc-ded8-4173-82bc-639bd3d476c2\",\n              \"tax\": \"1.400\",\n              \"note\": \"\",\n              \"type\": \"dish\",\n              \"status\": \"pending\",\n              \"quantity\": 1,\n              \"coupon_id\": null,\n              \"is_active\": 1,\n              \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"created_by\": 7,\n              \"deleted_at\": null,\n              \"deleted_by\": null,\n              \"details_id\": \"52fe9f4c-e874-4bad-888c-b40b303fa8a2\",\n              \"invoice_id\": \"eba748a8-c8ef-407a-8d05-31f145666560\",\n              \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n              \"modified_by\": null,\n              \"coupon_value\": \"0.000\",\n              \"dish_size_id\": null,\n              \"service_fees\": \"0.000\",\n              \"order_detail_id\": null,\n              \"total_after_tax\": \"11.400\",\n              \"total_before_tax\": \"10.000\",\n              \"in_request_return\": 0,\n              \"total_before_coupon\": \"10.000\"\n            }\n          ],\n          \"total_after_tax\": \"131.100\",\n          \"total_before_tax\": \"115.000\",\n          \"in_request_return\": 0,\n          \"service_percentage\": \"0.000\",\n          \"total_before_coupon\": \"115.000\"\n        },\n        \"table_id\": null,\n        \"tracking\": [\n          {\n            \"id\": \"d9e4735d-3a73-4e0b-8877-2aecac7ec94c\",\n            \"time\": null,\n            \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n            \"modify_by\": null,\n            \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"created_by\": 7,\n            \"deleted_at\": null,\n            \"deleted_by\": null,\n            \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"modified_by\": null,\n            \"order_status\": \"pending\",\n            \"created_by_type\": null,\n            \"deleted_by_type\": null,\n            \"modified_by_type\": null\n          }\n        ],\n        \"branch_id\": 3,\n        \"client_id\": 7,\n        \"coupon_id\": null,\n        \"make_type\": \"cashier\",\n        \"modify_by\": null,\n        \"parent_id\": null,\n        \"tax_value\": 16.1,\n        \"waiter_id\": null,\n        \"cashier_id\": 159,\n        \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n        \"created_by\": 7,\n        \"deleted_at\": null,\n        \"deleted_by\": null,\n        \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n        \"client_name\": \"جمعة\",\n        \"delivery_id\": null,\n        \"discount_id\": null,\n        \"transaction\": {\n          \"id\": \"ffa6c874-4290-4af0-af79-f1ac07d54d3f\",\n          \"date\": \"2026-03-04\",\n          \"paid\": \"131.100\",\n          \"reason\": null,\n          \"refund\": null,\n          \"paid_at\": null,\n          \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n          \"coupon_id\": null,\n          \"is_refund\": 0,\n          \"modify_by\": null,\n          \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n          \"created_by\": 7,\n          \"deleted_at\": null,\n          \"deleted_by\": null,\n          \"invoice_id\": \"eba748a8-c8ef-407a-8d05-31f145666560\",\n          \"points_num\": 0,\n          \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n          \"discount_id\": null,\n          \"modified_by\": null,\n          \"original_price\": \"131.10\",\n          \"payment_method\": \"cash\",\n          \"payment_status\": \"unpaid\",\n          \"transaction_id\": \"4b17d3c2-9fe6-4d56-a49d-b4c110966aee\",\n          \"created_by_type\": null,\n          \"deleted_by_type\": null,\n          \"modified_by_type\": null,\n          \"reference_number\": null,\n          \"payment_gateway_date\": null,\n          \"payment_gateway_method\": null,\n          \"payment_gateway_status\": null,\n          \"payment_gateway_currency\": null,\n          \"payment_gateway_reference\": null\n        },\n        \"client_phone\": \"01061455960\",\n        \"coupon_value\": \"0.000\",\n        \"invoice_type\": null,\n        \"order_addons\": [\n          {\n            \"id\": \"2afb7197-427a-4a04-96b4-1dcb4839fae5\",\n            \"waste\": \"not_wasted\",\n            \"status\": \"pending\",\n            \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n            \"quantity\": 1,\n            \"modify_by\": null,\n            \"tax_value\": \"2.100\",\n            \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"created_by\": 7,\n            \"deleted_at\": null,\n            \"deleted_by\": null,\n            \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"modified_by\": null,\n            \"service_fees\": \"0.000\",\n            \"dish_addon_id\": 4,\n            \"created_by_type\": null,\n            \"deleted_by_type\": null,\n            \"price_after_tax\": \"17.100\",\n            \"modified_by_type\": null,\n            \"order_details_id\": \"bd4ce880-5811-4029-a489-147ce14ccfcf\",\n            \"price_before_tax\": \"15.000\",\n            \"in_request_return\": 0,\n            \"price_before_coupon\": \"15.000\"\n          }\n        ],\n        \"order_number\": \"#CS-32541\",\n        \"print_status\": \"hold\",\n        \"service_fees\": 0,\n        \"delivery_fees\": \"0.000\",\n        \"order_details\": [\n          {\n            \"id\": \"52fe9f4c-e874-4bad-888c-b40b303fa8a2\",\n            \"note\": \"\",\n            \"total\": \"0.000\",\n            \"waste\": \"not_wasted\",\n            \"status\": \"pending\",\n            \"dish_id\": 73,\n            \"offer_id\": null,\n            \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n            \"quantity\": 1,\n            \"coupon_id\": null,\n            \"modify_by\": null,\n            \"tax_value\": \"1.400\",\n            \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"created_by\": 7,\n            \"deleted_at\": null,\n            \"deleted_by\": null,\n            \"dish_order\": \"-1\",\n            \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"modified_by\": null,\n            \"coupon_value\": \"0.000\",\n            \"dish_size_id\": null,\n            \"service_fees\": \"0.000\",\n            \"dish_size_name\": null,\n            \"created_by_type\": null,\n            \"deleted_by_type\": null,\n            \"price_after_tax\": \"11.400\",\n            \"price_befor_tax\": \"10.000\",\n            \"modified_by_type\": null,\n            \"in_request_return\": 0,\n            \"price_before_coupon\": \"10.000\"\n          },\n          {\n            \"id\": \"bd4ce880-5811-4029-a489-147ce14ccfcf\",\n            \"note\": \"\",\n            \"total\": \"0.000\",\n            \"waste\": \"not_wasted\",\n            \"status\": \"pending\",\n            \"dish_id\": 77,\n            \"offer_id\": null,\n            \"order_id\": \"79268ecb-6ce4-4ae0-8deb-dbbe6beba74f\",\n            \"quantity\": 1,\n            \"coupon_id\": null,\n            \"modify_by\": null,\n            \"tax_value\": \"12.600\",\n            \"created_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"created_by\": 7,\n            \"deleted_at\": null,\n            \"deleted_by\": null,\n            \"dish_order\": \"-1\",\n            \"updated_at\": \"2026-03-04T09:54:17.000000Z\",\n            \"modified_by\": null,\n            \"coupon_value\": \"0.000\",\n            \"dish_size_id\": 3,\n            \"service_fees\": \"0.000\",\n            \"dish_size_name\": null,\n            \"created_by_type\": null,\n            \"deleted_by_type\": null,\n            \"price_after_tax\": \"102.600\",\n            \"price_befor_tax\": \"90.000\",\n            \"modified_by_type\": null,\n            \"in_request_return\": 0,\n            \"price_before_coupon\": \"90.000\"\n          }\n        ],\n        \"invoice_number\": \"INV-CS-32541\",\n        \"tax_percentage\": \"14.00\",\n        \"tax_application\": 0,\n        \"client_address_id\": \"7c46c43a-0592-4ed5-b0bb-42dd1d6e9230\",\n        \"in_request_return\": 0,\n        \"cashier_machine_id\": 17,\n        \"print_count_waiter\": 0,\n        \"server_received_at\": null,\n        \"service_percentage\": \"0.00\",\n        \"client_country_code\": \"+20\",\n        \"customer_service_id\": null,\n        \"print_count_cashier\": 0,\n        \"takeaway_pickup_time\": null,\n        \"total_price_after_tax\": \"131.100\",\n        \"total_price_befor_tax\": \"115.000\",\n        \"preparation_appointment\": null,\n        \"total_price_before_coupon\": \"115.000\"\n      }\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/sync/push",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "sync",
            "push"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Pull Data",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{base_url}}/api/sync/pull-data?branch_id=1&since=2024-03-15 10:00:00",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "sync",
            "pull-data"
          ],
          "query": [
            {
              "key": "branch_id",
              "value": "1",
              "description": "ID of the branch to sync data for"
            },
            {
              "key": "since",
              "value": "2024-03-15 10:00:00",
              "description": "Optional: Pull only changes after this date"
            }
          ]
        }
      },
      "response": []
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:8000"
    },
    {
      "key": "branch_uuid",
      "value": "3f7c2d11-9c6b-4c93-8cf1-1c2d7f85b111"
    }
  ]
}