{
  "info": {
    "name": "Avunzo API · eSIM",
    "description": "Regional and country data plans, orders and webhooks.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Booking flow",
      "item": [
        {
          "name": "Search eSIM plans",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/search",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "search"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"eSim\": {\n    \"region_type\": \"local\",\n    \"country_code\": \"BD\",\n    \"plan_type\": \"data\",\n    \"topup_included\": \"yes\"\n  },\n  \"supplier_uid\": \"all\",\n  \"partner_id\": \"1\",\n  \"short_ref\": \"xxxx111\",\n  \"language\": \"en\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Searches eSIM plans by region type, country and plan type. Pass supplier_uid \"all\" to search every supplier. The returned tracking_id is used in later calls."
          },
          "response": []
        },
        {
          "name": "Get single eSIM package",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/single-esim-package",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "single-esim-package"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"11763299361URM1\",\n  \"package_id\": \"X1AO00012||bangladesh||1067||fatafati-in-7days-1gb\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns full details, coverage and pricing for one package from a search result. Use the search tracking_id and the package_id."
          },
          "response": []
        },
        {
          "name": "Get eSIM checkout validation status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/validation-get-status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "validation-get-status"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"booking_tracking_id\": \"11178902162088132JZAAP\",\n  \"member_id\": \"1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Called on the checkout page after the single-item step has already run. Returns the validated booking state for a booking tracking id. Do not call the single-item step again at checkout (it creates a second booking). b2b checks only `status === \"success\"` and uses the whole body."
          },
          "response": []
        },
        {
          "name": "Update customer information",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/update-customer",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "update-customer"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"booking_tracking_id\": \"11176335754526194RQYGH\",\n  \"member_id\": \"2\",\n  \"save_pax\": true,\n  \"passenger\": [\n    {\n      \"pax_id\": \"1\",\n      \"pax_type\": \"ADT\",\n      \"title\": \"MR\",\n      \"first_name\": \"Jasim\",\n      \"last_name\": \"Karimm\",\n      \"age\": \"30\",\n      \"isd_code\": \"880\",\n      \"contact_no\": 1966330000,\n      \"email_address\": \"test@mail.com\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Attaches the customer (passenger) details to an eSIM booking session. Call it before create-booking."
          },
          "response": []
        },
        {
          "name": "Create eSIM booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/create-booking",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "create-booking"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"booking_tracking_id\": \"11176335754526194RQYGH\",\n  \"package_tracking_id\": \"11176335754526194RQYGH||fatafati-in-7days-1gb\",\n  \"eSim_quantity\": \"1\",\n  \"member_id\": \"2\",\n  \"isPartialPay\": false,\n  \"redirect_url\": \"https://test.example.com/test-tech/custom_modal.html\",\n  \"payment_type\": \"account_balance\",\n  \"isd_code\": \"880\",\n  \"contact_no\": 1966330000,\n  \"email_address\": \"examplemail.com\",\n  \"agency_email\": \"examplemail.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Creates the eSIM booking for the selected package and quantity, and starts payment. Returns booking and voucher data."
          },
          "response": []
        }
      ]
    },
    {
      "name": "More endpoints",
      "item": [
        {
          "name": "List eSIM region options",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/region",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "region"
              ]
            },
            "description": "Takes no body and no query parameters as called by b2b. Returns an object keyed by supplier code (or `all`), each holding a list of region options with a `value` field. b2b hides `global` and `local` from the regional list. Observed in itt_b2b; semantics unconfirmed."
          },
          "response": []
        },
        {
          "name": "Get installation instructions",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/installation-instructions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "installation-instructions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"1\",\n  \"tracking_id\": \"11176276126126194RHSGI\",\n  \"eSim_iccid\": \"873000000000040589\",\n  \"preferred_language\": \"en\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns QR code and manual installation steps for a booked eSIM, identified by its ICCID."
          },
          "response": []
        },
        {
          "name": "Get data usage",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/data-usage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "data-usage"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"2\",\n  \"tracking_id\": \"11176276126126194RHSGI\",\n  \"eSim_iccid\": \"873000000000040589\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns the remaining and used data for a booked eSIM, identified by its ICCID."
          },
          "response": []
        },
        {
          "name": "Get compatible devices",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/compatible-devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "compatible-devices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Lists the device models known to support eSIM."
          },
          "response": []
        },
        {
          "name": "Get top-up packages",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/topup-packages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "topup-packages"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"1\",\n  \"tracking_id\": \"11176328969726194MHHQA\",\n  \"eSim_iccid\": \"873000000000042014\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Lists top-up packages available for an existing eSIM, identified by its ICCID."
          },
          "response": []
        },
        {
          "name": "Create top-up booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/topup-booking",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "topup-booking"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"booking_tracking_id\": \"11176681417103210LPBXA\",\n  \"topup_tracking_id\": \"TUP11766825537SLD1\",\n  \"package_id\": \"8900000644360253498||asialink-7days-1gb-topup\",\n  \"member_id\": \"2\",\n  \"isd_code\": \"880\",\n  \"contact_no\": 1966330000,\n  \"email_address\": \"examplesaaqeb.com\",\n  \"agency_email\": \"examplesaaqeb.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Books a selected top-up package for an existing eSIM."
          },
          "response": []
        },
        {
          "name": "Get top-up history",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/topup-history",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "topup-history"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"1\",\n  \"tracking_id\": \"11176328969726194MHHQA\",\n  \"eSim_iccid\": \"873000000000042014\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns the top-up purchases made for an eSIM."
          },
          "response": []
        },
        {
          "name": "Register webhook",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/esim/register-webhook",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "esim",
                "register-webhook"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_code\": \"airalo\",\n  \"supplier_uid\": \"X1AO00065\",\n  \"notification_type\": \"webhook_low_data\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registers a webhook so your platform receives asynchronous eSIM events such as low data balance."
          },
          "response": []
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://serviceapi.avunzo.net"
    }
  ]
}