{
  "info": {
    "_postman_id": "3acdd770-6f6a-4d78-bde8-acdbc49ede4d",
    "name": "Snap & Bill API v1",
    "description": "Snap & Bill Third-Party Reading Ingestion API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "10866285",
    "_collection_link": "https://go.postman.co/collection/10866285-3acdd770-6f6a-4d78-bde8-acdbc49ede4d?source=collection_link"
  },
  "item": [
    {
      "name": "Submit Readings",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"request_id\": \"{{request_id}}\",\n  \"service_type_id\": {{service_type_id}},\n  \"readings\": [\n    {\n      \"barcode\": \"{{barcode}}\",\n      \"current_unit\": 452.7,\n      \"reading_date\": \"2026-03-25\"\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/integrations/readings",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "integrations",
            "readings"
          ]
        }
      },
      "response": [
        {
          "name": "Lot not found (replayed rejection)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"request_id\": \"{{request_id}}\",\n  \"service_type_id\": {{service_type_id}},\n  \"readings\": [\n    {\n      \"barcode\": \"{{barcode}}\",\n      \"current_unit\": 452.7,\n      \"reading_date\": \"2026-03-25\"\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{base_url}}/integrations/readings",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ]
            }
          },
          "status": "Unprocessable Content",
          "code": 422,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 09:52:27 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"status\": \"rejected\",\n    \"results\": [\n        {\n            \"code\": \"LOT_NOT_FOUND\",\n            \"status\": \"rejected\",\n            \"barcode\": \"102248\",\n            \"message\": \"No lot found for this barcode in the given site and service type\"\n        }\n    ],\n    \"request_id\": \"partner-unique-id-001\",\n    \"accepted_count\": 0,\n    \"rejected_count\": 1,\n    \"replayed\": true\n}"
        },
        {
          "name": "Invalid reading",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"request_id\": \"{{request_id}}\",\n  \"service_type_id\": {{service_type_id}},\n  \"readings\": [\n    {\n      \"barcode\": \"{{barcode}}\",\n      \"current_unit\": 452.7,\n      \"reading_date\": \"2026-03-25\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/integrations/readings",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ]
            }
          },
          "status": "Unprocessable Content",
          "code": 422,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 10:14:41 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"status\": \"rejected\",\n    \"request_id\": \"partner-unique-id-004\",\n    \"accepted_count\": 0,\n    \"rejected_count\": 1,\n    \"results\": [\n        {\n            \"barcode\": \"100248\",\n            \"status\": \"rejected\",\n            \"code\": \"READING_BELOW_PREVIOUS\",\n            \"message\": \"Reading 452.7 is below previous unit 1315133\"\n        }\n    ]\n}"
        },
        {
          "name": "Accepted",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"request_id\": \"{{request_id}}\",\n  \"service_type_id\": {{service_type_id}},\n  \"readings\": [\n    {\n      \"barcode\": \"{{barcode}}\",\n      \"current_unit\": 1315133,\n      \"reading_date\": \"2026-03-25\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/integrations/readings",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 10:16:01 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"status\": \"accepted\",\n    \"request_id\": \"partner-unique-id-005\",\n    \"accepted_count\": 1,\n    \"rejected_count\": 0,\n    \"results\": [\n        {\n            \"barcode\": \"100248\",\n            \"status\": \"accepted\",\n            \"open_session_id\": 26991\n        }\n    ]\n}"
        }
      ]
    },
    {
      "name": "Submit Readings (Multiple)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"request_id\": \"{{request_id}}-multi\",\n  \"service_type_id\": {{service_type_id}},\n  \"readings\": [\n    {\n      \"barcode\": \"ABC123456\",\n      \"current_unit\": 452.7,\n      \"reading_date\": \"2026-03-25\"\n    },\n    {\n      \"barcode\": \"XYZ987654\",\n      \"current_unit\": 123.4,\n      \"reading_date\": \"2026-03-25\"\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/integrations/readings",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "integrations",
            "readings"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Get Previous Readings (All)",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/integrations/readings",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "integrations",
            "readings"
          ]
        }
      },
      "response": [
        {
          "name": "Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/integrations/readings",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 10:12:54 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"service_provider_id\": 3,\n    \"service_provider_name\": \"Pieter Both Syndic Services\",\n    \"site_id\": 4,\n    \"site_name\": \"Aqua Springs\",\n    \"site_fullname\": \"SYNDICAT DES COPROPRIÉTAIRES DE AQUA SPRINGS\",\n    \"readings\": [\n        {\n            \"barcode\": \"100248\",\n            \"service_type_id\": 2,\n            \"previous_unit\": 1315133,\n            \"last_reading_date\": \"2019-03-25\"\n        },\n        {\n            \"barcode\": \"100249\",\n            \"service_type_id\": 2,\n            \"previous_unit\": 71196,\n            \"last_reading_date\": \"2019-03-25\"\n        }\n    ]\n}"
        }
      ]
    },
    {
      "name": "Get Previous Readings (Filtered)",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/integrations/readings?service_type_id={{service_type_id}}",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "integrations",
            "readings"
          ],
          "query": [
            {
              "key": "service_type_id",
              "value": "{{service_type_id}}"
            }
          ]
        }
      },
      "response": [
        {
          "name": "Invalid Service type",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/integrations/readings?service_type_id={{service_type_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ],
              "query": [
                {
                  "key": "service_type_id",
                  "value": "{{service_type_id}}"
                }
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 10:13:23 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"service_provider_id\": 3,\n    \"service_provider_name\": \"Pieter Both Syndic Services\",\n    \"site_id\": 4,\n    \"site_name\": \"Aqua Springs\",\n    \"site_fullname\": \"SYNDICAT DES COPROPRIÉTAIRES DE AQUA SPRINGS\",\n    \"readings\": []\n}"
        },
        {
          "name": "Success",
          "originalRequest": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{token}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/integrations/readings?service_type_id={{service_type_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "integrations",
                "readings"
              ],
              "query": [
                {
                  "key": "service_type_id",
                  "value": "{{service_type_id}}"
                }
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": null,
          "header": [
            {
              "key": "Host",
              "value": "127.0.0.1:8000"
            },
            {
              "key": "Connection",
              "value": "close"
            },
            {
              "key": "X-Powered-By",
              "value": "PHP/8.4.7"
            },
            {
              "key": "Cache-Control",
              "value": "no-cache, private"
            },
            {
              "key": "Date",
              "value": "Wed, 29 Apr 2026 10:13:47 GMT"
            },
            {
              "key": "Content-Type",
              "value": "application/json"
            },
            {
              "key": "Vary",
              "value": "Origin"
            }
          ],
          "cookie": [],
          "body": "{\n    \"service_provider_id\": 3,\n    \"service_provider_name\": \"Pieter Both Syndic Services\",\n    \"site_id\": 4,\n    \"site_name\": \"Aqua Springs\",\n    \"site_fullname\": \"SYNDICAT DES COPROPRIÉTAIRES DE AQUA SPRINGS\",\n    \"readings\": [\n        {\n            \"barcode\": \"100248\",\n            \"service_type_id\": 2,\n            \"previous_unit\": 1315133,\n            \"last_reading_date\": \"2019-03-25\"\n        },\n        {\n            \"barcode\": \"100249\",\n            \"service_type_id\": 2,\n            \"previous_unit\": 71196,\n            \"last_reading_date\": \"2019-03-25\"\n        }\n    ]\n}"
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://your-domain/api/v1"
    },
    {
      "key": "token",
      "value": "YOUR_BEARER_TOKEN"
    },
    {
      "key": "service_type_id",
      "value": "2"
    },
    {
      "key": "request_id",
      "value": "partner-unique-id-001"
    },
    {
      "key": "barcode",
      "value": "ABC123456"
    }
  ]
}