{
  "item": [
    {
      "name": "v1",
      "description": "",
      "item": [
        {
          "name": "auth",
          "description": "",
          "item": [
            {
              "name": "login",
              "description": "",
              "item": [
                {
                  "id": "cb07c774-4684-482e-9f28-f0e5e0d44161",
                  "name": "Authenticate user",
                  "request": {
                    "name": "Authenticate user",
                    "description": {
                      "content": "Authenticates a user with email and password. Returns access token and user details including assigned location(s).",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "auth", "login"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "3becc5a0-96f8-47b5-b8fb-ea12208ccec6",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "auth", "login"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"email\": \"<email>\",\n  \"password\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"access_token\": \"<string>\",\n    \"refresh_token\": \"<string>\",\n    \"expires_in\": \"<integer>\",\n    \"token_type\": \"bearer\",\n    \"user\": {\n      \"id\": \"<uuid>\",\n      \"email\": \"<email>\",\n      \"user_type\": \"owner\",\n      \"merchant_id\": \"<uuid>\",\n      \"merchant_name\": \"<string>\",\n      \"locations\": [\n        {\n          \"id\": \"<uuid>\",\n          \"name\": \"<string>\",\n          \"display_order\": \"<integer>\"\n        },\n        {\n          \"id\": \"<uuid>\",\n          \"name\": \"<string>\",\n          \"display_order\": \"<integer>\"\n        }\n      ],\n      \"location\": {\n        \"id\": \"<uuid>\",\n        \"name\": \"<string>\",\n        \"display_order\": \"<integer>\"\n      }\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (pm.response.code === 200) {",
                          "    const json = pm.response.json();",
                          "    if (json.success && json.data) {",
                          "        pm.environment.set(\"access_token\", json.data.access_token);",
                          "        pm.environment.set(\"refresh_token\", json.data.refresh_token);",
                          "        if (json.data.user && json.data.user.id) {",
                          "            pm.environment.set(\"staff_user_id\", json.data.user.id);",
                          "        }",
                          "        if (json.data.user && json.data.user.locations && json.data.user.locations.length > 0) {",
                          "            pm.environment.set(\"location_id\", json.data.user.locations[0].id);",
                          "        }",
                          "    }",
                          "}"
                        ]
                      }
                    }
                  ],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            },
            {
              "name": "me",
              "description": "",
              "item": [
                {
                  "id": "dd5af7b2-eb78-4cd0-9f5c-5378b9b92a0b",
                  "name": "Get current user",
                  "request": {
                    "name": "Get current user",
                    "description": {
                      "content": "Returns the current authenticated user's profile including location information.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "auth", "me"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "GET",
                    "body": {},
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "c35ee164-9dcf-41a9-a3ab-76153cc2f8a3",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "auth", "me"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "GET",
                        "body": {}
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"<uuid>\",\n    \"email\": \"<email>\",\n    \"user_type\": \"system_user\",\n    \"merchant_id\": \"<uuid>\",\n    \"merchant_name\": \"<string>\",\n    \"locations\": [\n      {\n        \"id\": \"<uuid>\",\n        \"name\": \"<string>\",\n        \"display_order\": \"<integer>\"\n      },\n      {\n        \"id\": \"<uuid>\",\n        \"name\": \"<string>\",\n        \"display_order\": \"<integer>\"\n      }\n    ],\n    \"location\": {\n      \"id\": \"<uuid>\",\n      \"name\": \"<string>\",\n      \"display_order\": \"<integer>\"\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            },
            {
              "name": "refresh",
              "description": "",
              "item": [
                {
                  "id": "f5712a82-fabd-4760-b64c-b72bbb4b9980",
                  "name": "Refresh access token",
                  "request": {
                    "name": "Refresh access token",
                    "description": {
                      "content": "Exchanges a refresh token for a new access token and refresh token pair.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "auth", "refresh"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"refresh_token\": \"{{refresh_token}}\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "e5e3fded-80bc-438b-ac9c-25b5afe9c3cd",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "auth", "refresh"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"refresh_token\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"access_token\": \"<string>\",\n    \"refresh_token\": \"<string>\",\n    \"expires_in\": \"<integer>\",\n    \"token_type\": \"bearer\"\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (pm.response.code === 200) {",
                          "    const json = pm.response.json();",
                          "    if (json.success && json.data) {",
                          "        pm.environment.set(\"access_token\", json.data.access_token);",
                          "        pm.environment.set(\"refresh_token\", json.data.refresh_token);",
                          "    }",
                          "}"
                        ]
                      }
                    }
                  ],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "cards",
          "description": "",
          "item": [
            {
              "name": "lookup",
              "description": "",
              "item": [
                {
                  "id": "92246dae-870a-4533-9977-d77c9e6846be",
                  "name": "Look up card balance",
                  "request": {
                    "name": "Look up card balance",
                    "description": {
                      "content": "Looks up a card's balance and details by QR code data or barcode value. Accepts either qr_code_data (base64-encoded) or barcode_value (numeric display_id). Returns type-specific balance information for punch, cashback, or discount cards. This endpoint is read-only and does not create transactions.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "cards", "lookup"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"qr_code_data\": \"<string>\",\n  \"barcode_value\": \"23\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "18a70d43-5932-47e4-9a6c-fe64eebfdd25",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "cards", "lookup"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"qr_code_data\": \"<string>\",\n  \"barcode_value\": \"23\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"card_instance_id\": \"<uuid>\",\n    \"card_type\": \"discount\",\n    \"card_title\": \"<string>\",\n    \"merchant_name\": \"<string>\",\n    \"customer_name\": \"<string>\",\n    \"status\": \"active\",\n    \"balance\": {\n      \"type\": \"punch\",\n      \"current_punches\": \"<integer>\",\n      \"punch_requirement\": \"<integer>\",\n      \"progress_percent\": \"<integer>\",\n      \"punches_to_next_reward\": \"<integer>\",\n      \"pending_rewards\": \"<integer>\",\n      \"claimed_rewards\": \"<integer>\",\n      \"total_punches_lifetime\": \"<integer>\",\n      \"reward_name\": \"<string>\",\n      \"reward_amount\": \"<string>\"\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "type": "text/javascript",
                        "exec": [
                          "if (pm.response.code === 200) {",
                          "    const json = pm.response.json();",
                          "    if (json.success && json.data && json.data.card_instance_id) {",
                          "        pm.environment.set(\"card_instance_id\", json.data.card_instance_id);",
                          "    }",
                          "}"
                        ]
                      }
                    }
                  ],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "cashback",
          "description": "",
          "item": [
            {
              "name": "redeem",
              "description": "",
              "item": [
                {
                  "id": "c9de360b-4d16-4b1b-aeea-47099ed3d8c8",
                  "name": "Redeem cashback balance",
                  "request": {
                    "name": "Redeem cashback balance",
                    "description": {
                      "content": "Redeems cashback balance against a purchase (FIFO order). Validates redemption amount against available balance, redeems from oldest earned cashback first, supports partial entry redemption, and returns breakdown of redeemed entries.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "cashback", "redeem"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"card_instance_id\": \"{{card_instance_id}}\",\n  \"redemption_amount\": \"<number>\",\n  \"purchase_amount\": \"<number>\",\n  \"location_id\": \"{{location_id}}\",\n  \"staff_user_id\": \"{{staff_user_id}}\",\n  \"transaction_notes\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "0495fc68-a969-419c-a838-17232978eb1f",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "cashback", "redeem"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"card_instance_id\": \"<uuid>\",\n  \"redemption_amount\": \"<number>\",\n  \"purchase_amount\": \"<number>\",\n  \"location_id\": \"<uuid>\",\n  \"staff_user_id\": \"<uuid>\",\n  \"transaction_notes\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"transaction_id\": \"<uuid>\",\n    \"redeemed_amount\": \"<number>\",\n    \"new_balance\": \"<number>\",\n    \"final_purchase_amount\": \"<number>\",\n    \"redeemed_entries\": [\n      {\n        \"transaction_id\": \"<uuid>\",\n        \"amount\": \"<number>\",\n        \"earned_date\": \"<string>\"\n      },\n      {\n        \"transaction_id\": \"<uuid>\",\n        \"amount\": \"<number>\",\n        \"earned_date\": \"<string>\"\n      }\n    ]\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "products",
          "description": "",
          "item": [
            {
              "id": "b65ba246-e5ea-4b3d-8d8d-5c08acd7b8ad",
              "name": "List merchant products",
              "request": {
                "name": "List merchant products",
                "description": {
                  "content": "Returns a paginated list of products in the merchant's catalog. Supports filtering by POS provider, category, status, and text search.",
                  "type": "text/plain"
                },
                "url": {
                  "path": ["v1", "products"],
                  "host": ["{{baseUrl}}"],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {},
                "auth": null
              },
              "response": [
                {
                  "id": "8d5e6cd9-aa5a-4c50-a4b1-c8957724f669",
                  "name": "Successful response",
                  "originalRequest": {
                    "url": {
                      "path": ["v1", "products"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "GET",
                    "body": {}
                  },
                  "status": "OK",
                  "code": 200,
                  "header": [
                    {
                      "key": "Content-Type",
                      "value": "application/json"
                    }
                  ],
                  "body": "{\n  \"success\": true,\n  \"data\": {\n    \"products\": [\n      {\n        \"id\": \"<uuid>\",\n        \"external_id\": \"<string>\",\n        \"pos_provider\": \"<string>\",\n        \"name\": \"<string>\",\n        \"status\": \"<string>\",\n        \"created_at\": \"<string>\",\n        \"updated_at\": \"<string>\",\n        \"description\": \"<string>\",\n        \"category_name\": \"<string>\",\n        \"price\": \"<number>\",\n        \"sku\": \"<string>\",\n        \"barcode\": \"<string>\",\n        \"metadata\": {\n          \"anim_86c\": {},\n          \"Loremc5c\": {}\n        }\n      },\n      {\n        \"id\": \"<uuid>\",\n        \"external_id\": \"<string>\",\n        \"pos_provider\": \"<string>\",\n        \"name\": \"<string>\",\n        \"status\": \"<string>\",\n        \"created_at\": \"<string>\",\n        \"updated_at\": \"<string>\",\n        \"description\": \"<string>\",\n        \"category_name\": \"<string>\",\n        \"price\": \"<number>\",\n        \"sku\": \"<string>\",\n        \"barcode\": \"<string>\",\n        \"metadata\": {\n          \"reprehenderitd\": {},\n          \"ina__\": {}\n        }\n      }\n    ],\n    \"pagination\": {\n      \"page\": \"<integer>\",\n      \"page_size\": \"<integer>\",\n      \"total_items\": \"<integer>\",\n      \"total_pages\": \"<integer>\",\n      \"has_next\": \"<boolean>\",\n      \"has_previous\": \"<boolean>\"\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                  "cookie": [],
                  "_postman_previewlanguage": "json"
                }
              ],
              "event": [],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              }
            },
            {
              "name": "sync",
              "description": "",
              "item": [
                {
                  "id": "ae03777b-8a85-44e1-8152-5a83bf551372",
                  "name": "Sync products from a POS system",
                  "request": {
                    "name": "Sync products from a POS system",
                    "description": {
                      "content": "Batch upsert products into the merchant's product catalog. Products are matched by (merchant_id, pos_provider, external_id). Existing products are updated, new ones are created.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "products", "sync"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"pos_provider\": \"<string>\",\n  \"products\": [\n    {\n      \"external_id\": \"<string>\",\n      \"name\": \"<string>\",\n      \"description\": \"<string>\",\n      \"category_name\": \"<string>\",\n      \"price\": \"<number>\",\n      \"sku\": \"<string>\",\n      \"barcode\": \"<string>\",\n      \"status\": \"active\",\n      \"metadata\": {\n        \"minim9f7\": {},\n        \"eadc\": {},\n        \"laboris56\": {}\n      }\n    }\n  ]\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "4f1f22df-28db-4f86-81a9-23e063d0d632",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "products", "sync"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"pos_provider\": \"<string>\",\n  \"products\": [\n    {\n      \"external_id\": \"<string>\",\n      \"name\": \"<string>\",\n      \"description\": \"<string>\",\n      \"category_name\": \"<string>\",\n      \"price\": \"<number>\",\n      \"sku\": \"<string>\",\n      \"barcode\": \"<string>\",\n      \"status\": \"active\",\n      \"metadata\": {\n        \"minim9f7\": {},\n        \"eadc\": {},\n        \"laboris56\": {}\n      }\n    }\n  ]\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"total_count\": \"<integer>\",\n    \"created_count\": \"<integer>\",\n    \"updated_count\": \"<integer>\"\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "rewards",
          "description": "",
          "item": [
            {
              "name": "claim",
              "description": "",
              "item": [
                {
                  "id": "53bd368e-4b6f-4d44-9613-10de42916489",
                  "name": "Claim punch card reward",
                  "request": {
                    "name": "Claim punch card reward",
                    "description": {
                      "content": "Claims the oldest pending reward for a punch card (FIFO order). Validates that the card exists and is active, is a punch card, has pending rewards available, and the oldest reward hasn't expired.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "rewards", "claim"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"card_instance_id\": \"{{card_instance_id}}\",\n  \"location_id\": \"{{location_id}}\",\n  \"staff_user_id\": \"{{staff_user_id}}\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "b321f6d4-1382-449b-a328-b51fea215512",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "rewards", "claim"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"card_instance_id\": \"<uuid>\",\n  \"location_id\": \"<uuid>\",\n  \"staff_user_id\": \"<uuid>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"transaction_id\": \"<uuid>\",\n    \"reward_id\": \"<uuid>\",\n    \"reward_name\": \"<string>\",\n    \"reward_amount\": \"<string>\",\n    \"earned_at\": \"<string>\",\n    \"pending_rewards_remaining\": \"<integer>\"\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "transactions",
          "description": "",
          "item": [
            {
              "name": "history",
              "description": "",
              "item": [
                {
                  "id": "210e9b4b-f99d-4965-95b0-7f31decad121",
                  "name": "Get transaction history",
                  "request": {
                    "name": "Get transaction history",
                    "description": {
                      "content": "Retrieves paginated transaction history for a card instance. Supports filtering by transaction type and date range.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "transactions", "history"],
                      "host": ["{{baseUrl}}"],
                      "query": [
                        {
                          "disabled": false,
                          "description": {
                            "content": "UUID of the card instance",
                            "type": "text/plain"
                          },
                          "key": "card_instance_id",
                          "value": "{{card_instance_id}}"
                        },
                        {
                          "disabled": false,
                          "description": {
                            "content": "Page number (default 1)",
                            "type": "text/plain"
                          },
                          "key": "page",
                          "value": "<integer>"
                        },
                        {
                          "disabled": false,
                          "description": {
                            "content": "Items per page (default 20, max 100)",
                            "type": "text/plain"
                          },
                          "key": "page_size",
                          "value": "<integer>"
                        },
                        {
                          "disabled": false,
                          "description": {
                            "content": "Filter by transaction type",
                            "type": "text/plain"
                          },
                          "key": "transaction_type",
                          "value": "<string>"
                        },
                        {
                          "disabled": false,
                          "description": {
                            "content": "Start date filter (ISO 8601)",
                            "type": "text/plain"
                          },
                          "key": "from_date",
                          "value": "<string>"
                        },
                        {
                          "disabled": false,
                          "description": {
                            "content": "End date filter (ISO 8601)",
                            "type": "text/plain"
                          },
                          "key": "to_date",
                          "value": "<string>"
                        }
                      ],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "GET",
                    "body": {},
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "793c4630-76eb-499b-832c-1de1accf30c1",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "transactions", "history"],
                          "host": ["{{baseUrl}}"],
                          "query": [
                            {
                              "disabled": false,
                              "description": {
                                "content": "UUID of the card instance",
                                "type": "text/plain"
                              },
                              "key": "card_instance_id",
                              "value": "<string>"
                            },
                            {
                              "disabled": false,
                              "description": {
                                "content": "Page number (default 1)",
                                "type": "text/plain"
                              },
                              "key": "page",
                              "value": "<integer>"
                            },
                            {
                              "disabled": false,
                              "description": {
                                "content": "Items per page (default 20, max 100)",
                                "type": "text/plain"
                              },
                              "key": "page_size",
                              "value": "<integer>"
                            },
                            {
                              "disabled": false,
                              "description": {
                                "content": "Filter by transaction type",
                                "type": "text/plain"
                              },
                              "key": "transaction_type",
                              "value": "<string>"
                            },
                            {
                              "disabled": false,
                              "description": {
                                "content": "Start date filter (ISO 8601)",
                                "type": "text/plain"
                              },
                              "key": "from_date",
                              "value": "<string>"
                            },
                            {
                              "disabled": false,
                              "description": {
                                "content": "End date filter (ISO 8601)",
                                "type": "text/plain"
                              },
                              "key": "to_date",
                              "value": "<string>"
                            }
                          ],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "GET",
                        "body": {}
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"transactions\": [\n      {\n        \"id\": \"<uuid>\",\n        \"transaction_type\": \"cashback_earned\",\n        \"created_at\": \"<string>\",\n        \"description\": \"<string>\",\n        \"purchase_amount\": \"<number>\",\n        \"reward_amount\": \"<number>\",\n        \"balance_after\": \"<number>\",\n        \"tier_id\": \"<string>\",\n        \"location_name\": \"<string>\"\n      },\n      {\n        \"id\": \"<uuid>\",\n        \"transaction_type\": \"discount_applied\",\n        \"created_at\": \"<string>\",\n        \"description\": \"<string>\",\n        \"purchase_amount\": \"<number>\",\n        \"reward_amount\": \"<number>\",\n        \"balance_after\": \"<number>\",\n        \"tier_id\": \"<string>\",\n        \"location_name\": \"<string>\"\n      }\n    ],\n    \"pagination\": {\n      \"page\": \"<integer>\",\n      \"page_size\": \"<integer>\",\n      \"total_items\": \"<integer>\",\n      \"total_pages\": \"<integer>\",\n      \"has_next\": \"<boolean>\",\n      \"has_previous\": \"<boolean>\"\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            },
            {
              "name": "record",
              "description": "",
              "item": [
                {
                  "id": "4d05a80d-e710-4160-a93f-21c1a1e2b182",
                  "name": "Record a purchase transaction",
                  "request": {
                    "name": "Record a purchase transaction",
                    "description": {
                      "content": "Records a single purchase for punch, cashback, or discount cards. Punch Cards add punches and earn rewards when threshold reached. Cashback Cards calculate and credit cashback based on tier rate. Discount Cards calculate discount applied to purchase. Supports idempotency to prevent duplicate processing.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "transactions", "record"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"location_id\": \"{{location_id}}\",\n  \"staff_user_id\": \"{{staff_user_id}}\",\n  \"purchase_amount\": \"<number>\",\n  \"qr_code_data\": \"<string>\",\n  \"card_instance_id\": \"{{card_instance_id}}\",\n  \"punch_count\": 1,\n  \"transaction_notes\": \"<string>\",\n  \"idempotency_key\": \"<string>\",\n  \"pos_reference_id\": \"<string>\",\n  \"pos_terminal_id\": \"<string>\",\n  \"client_timestamp\": \"<string>\",\n  \"pos_provider\": \"<string>\",\n  \"line_items\": [\n    {\n      \"name\": \"<string>\",\n      \"quantity\": 1,\n      \"unit_price\": \"<number>\",\n      \"total_price\": \"<number>\",\n      \"external_product_id\": \"<string>\",\n      \"metadata\": {\n        \"Duis_d\": {},\n        \"reprehenderit_7\": {}\n      }\n    },\n    {\n      \"name\": \"<string>\",\n      \"quantity\": 1,\n      \"unit_price\": \"<number>\",\n      \"total_price\": \"<number>\",\n      \"external_product_id\": \"<string>\",\n      \"metadata\": {\n        \"ea1\": {}\n      }\n    }\n  ]\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "68d339fe-b65c-4364-8887-2b97b95c2123",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "transactions", "record"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"location_id\": \"<uuid>\",\n  \"staff_user_id\": \"<uuid>\",\n  \"purchase_amount\": \"<number>\",\n  \"qr_code_data\": \"<string>\",\n  \"card_instance_id\": \"<uuid>\",\n  \"punch_count\": 1,\n  \"transaction_notes\": \"<string>\",\n  \"idempotency_key\": \"<string>\",\n  \"pos_reference_id\": \"<string>\",\n  \"pos_terminal_id\": \"<string>\",\n  \"client_timestamp\": \"<string>\",\n  \"pos_provider\": \"<string>\",\n  \"line_items\": [\n    {\n      \"name\": \"<string>\",\n      \"quantity\": 1,\n      \"unit_price\": \"<number>\",\n      \"total_price\": \"<number>\",\n      \"external_product_id\": \"<string>\",\n      \"metadata\": {\n        \"Duis_d\": {},\n        \"reprehenderit_7\": {}\n      }\n    },\n    {\n      \"name\": \"<string>\",\n      \"quantity\": 1,\n      \"unit_price\": \"<number>\",\n      \"total_price\": \"<number>\",\n      \"external_product_id\": \"<string>\",\n      \"metadata\": {\n        \"ea1\": {}\n      }\n    }\n  ]\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": true,\n  \"data\": {\n    \"transaction_id\": \"<uuid>\",\n    \"card_type\": \"punch\",\n    \"transaction_type\": \"cashback_earned\",\n    \"idempotent\": \"<boolean>\",\n    \"result\": {\n      \"type\": \"punch\",\n      \"punches_added\": \"<integer>\",\n      \"new_punch_count\": \"<integer>\",\n      \"punch_requirement\": \"<integer>\",\n      \"punches_remaining\": \"<integer>\",\n      \"rewards_earned\": \"<integer>\",\n      \"reward_earned\": \"<boolean>\",\n      \"reward_id\": \"<uuid>\",\n      \"reward_name\": \"<string>\",\n      \"reward_amount\": \"<string>\"\n    },\n    \"tier_changed\": {\n      \"old_tier_id\": \"<string>\",\n      \"new_tier_id\": \"<string>\",\n      \"new_rate\": \"<number>\"\n    }\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            },
            {
              "name": "sync",
              "description": "",
              "item": [
                {
                  "id": "0239bc17-6361-43fd-82d0-3bb156d35fc4",
                  "name": "Sync offline transactions",
                  "request": {
                    "name": "Sync offline transactions",
                    "description": {
                      "content": "Batch sync offline POS transactions. Processes up to 100 transactions per request. Each transaction requires an idempotency_key for deduplication. Returns HTTP 200 if all succeed, 207 if mixed results.",
                      "type": "text/plain"
                    },
                    "url": {
                      "path": ["v1", "transactions", "sync"],
                      "host": ["{{baseUrl}}"],
                      "query": [],
                      "variable": []
                    },
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "method": "POST",
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"transactions\": [\n    {\n      \"qr_code_data\": \"<string>\",\n      \"location_id\": \"<uuid>\",\n      \"staff_user_id\": \"<uuid>\",\n      \"purchase_amount\": \"<number>\",\n      \"idempotency_key\": \"<string>\",\n      \"punch_count\": 1,\n      \"transaction_notes\": \"<string>\",\n      \"pos_reference_id\": \"<string>\",\n      \"pos_terminal_id\": \"<string>\",\n      \"client_timestamp\": \"<string>\",\n      \"pos_provider\": \"<string>\",\n      \"line_items\": [\n        {\n          \"name\": \"<string>\",\n          \"quantity\": 1,\n          \"unit_price\": \"<number>\",\n          \"total_price\": \"<number>\",\n          \"external_product_id\": \"<string>\",\n          \"metadata\": {\n            \"ut_5\": {},\n            \"veniam6\": {}\n          }\n        },\n        {\n          \"name\": \"<string>\",\n          \"quantity\": 1,\n          \"unit_price\": \"<number>\",\n          \"total_price\": \"<number>\",\n          \"external_product_id\": \"<string>\",\n          \"metadata\": {\n            \"dolor9\": {},\n            \"Duis_c\": {}\n          }\n        }\n      ]\n    }\n  ],\n  \"pos_provider\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "auth": null
                  },
                  "response": [
                    {
                      "id": "d3e1e127-67f3-4ecf-bff3-64f630be027f",
                      "name": "Successful response",
                      "originalRequest": {
                        "url": {
                          "path": ["v1", "transactions", "sync"],
                          "host": ["{{baseUrl}}"],
                          "query": [],
                          "variable": []
                        },
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "method": "POST",
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"transactions\": [\n    {\n      \"qr_code_data\": \"<string>\",\n      \"location_id\": \"<uuid>\",\n      \"staff_user_id\": \"<uuid>\",\n      \"purchase_amount\": \"<number>\",\n      \"idempotency_key\": \"<string>\",\n      \"punch_count\": 1,\n      \"transaction_notes\": \"<string>\",\n      \"pos_reference_id\": \"<string>\",\n      \"pos_terminal_id\": \"<string>\",\n      \"client_timestamp\": \"<string>\",\n      \"pos_provider\": \"<string>\",\n      \"line_items\": [\n        {\n          \"name\": \"<string>\",\n          \"quantity\": 1,\n          \"unit_price\": \"<number>\",\n          \"total_price\": \"<number>\",\n          \"external_product_id\": \"<string>\",\n          \"metadata\": {\n            \"ut_5\": {},\n            \"veniam6\": {}\n          }\n        },\n        {\n          \"name\": \"<string>\",\n          \"quantity\": 1,\n          \"unit_price\": \"<number>\",\n          \"total_price\": \"<number>\",\n          \"external_product_id\": \"<string>\",\n          \"metadata\": {\n            \"dolor9\": {},\n            \"Duis_c\": {}\n          }\n        }\n      ]\n    }\n  ],\n  \"pos_provider\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "body": "{\n  \"success\": \"<boolean>\",\n  \"data\": {\n    \"total_count\": \"<integer>\",\n    \"success_count\": \"<integer>\",\n    \"error_count\": \"<integer>\",\n    \"results\": [\n      {\n        \"idempotency_key\": \"<string>\",\n        \"result\": {\n          \"success\": \"<boolean>\",\n          \"idempotent\": \"<boolean>\",\n          \"transaction_id\": \"<uuid>\",\n          \"card_type\": \"punch\",\n          \"error\": \"<string>\",\n          \"message\": \"<string>\"\n        }\n      },\n      {\n        \"idempotency_key\": \"<string>\",\n        \"result\": {\n          \"success\": \"<boolean>\",\n          \"idempotent\": \"<boolean>\",\n          \"transaction_id\": \"<uuid>\",\n          \"card_type\": \"cashback\",\n          \"error\": \"<string>\",\n          \"message\": \"<string>\"\n        }\n      }\n    ]\n  },\n  \"meta\": {\n    \"request_id\": \"<string>\",\n    \"timestamp\": \"<string>\"\n  }\n}",
                      "cookie": [],
                      "_postman_previewlanguage": "json"
                    }
                  ],
                  "event": [],
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "health",
      "description": "",
      "item": [
        {
          "id": "7b8c423e-1e4d-4053-a908-3833bfcf9c23",
          "name": "Health check",
          "request": {
            "name": "Health check",
            "description": {
              "content": "Returns the API health status. No authentication required.",
              "type": "text/plain"
            },
            "url": {
              "path": ["health"],
              "host": ["{{baseUrl}}"],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {},
            "auth": null
          },
          "response": [
            {
              "id": "3c5e4670-a9de-42a7-ac27-4e142a9533ca",
              "name": "Successful response",
              "originalRequest": {
                "url": {
                  "path": ["health"],
                  "host": ["{{baseUrl}}"],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"status\": \"ok\",\n  \"timestamp\": \"<string>\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ]
    }
  ],
  "event": [],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.forloy.com/api"
    }
  ],
  "info": {
    "_postman_id": "53cc2b06-015e-4f90-9b4a-acd06d5b7670",
    "name": "Forloy Public API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "External API for third-party integrators (POS, CRM, kiosks, etc.) to perform loyalty operations on behalf of merchants.\n\n## Authentication\nAll endpoints require a valid access token in the Authorization header:\n```\nAuthorization: Bearer <access_token>\n```\nObtain tokens via the `/v1/auth/login` endpoint.\n\n## Response Format\nAll endpoints return a consistent JSON envelope:\n```json\n{\n  \"success\": true|false,\n  \"data\": { ... },\n  \"error\": { \"code\": \"...\", \"message\": \"...\" },\n  \"meta\": { \"request_id\": \"req_...\", \"timestamp\": \"...\" }\n}\n```\n\n## Card Types\n- **punch**: Earn punches toward free rewards\n- **cashback**: Earn percentage back on purchases\n- **discount**: Get percentage off purchases\n\nContact Support:\n Name: Forloy API Support",
      "type": "text/plain"
    }
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{access_token}}",
        "type": "string"
      }
    ]
  }
}
