{
  "info": {
    "name": "Aboki Data API 1.0",
    "description": "The Aboki Data partner API. Authenticate with an API key (`abk_test_…` or `abk_live_…`) as a Bearer token. Money is whole kobo everywhere (₦1 = 100 kobo), in fields named `*_kobo`; rates are basis points in fields named `*_bp` (250 = 2.5%). Every response uses the envelope `{success, status_code, message, data, meta}`; errors add `error_code`. Guides: https://abokidata.com/docs\n\nSet the `apiKey` collection variable to your abk_test_ key first. Docs: https://abokidata.com/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.abokidata.com/api/v1"
    },
    {
      "key": "apiKey",
      "value": "",
      "description": "Your abk_test_ or abk_live_ key. Never share or commit it."
    }
  ],
  "item": [
    {
      "name": "Services and products",
      "item": [
        {
          "name": "List services",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/services",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "services"
              ]
            },
            "description": "Returns the services that are currently available. The `service_code` (or `id`) is what you pass to [List products](#list-products).\n\nThis endpoint also works without a key, at standard prices. Limited to 120 requests per minute per IP address; cache the result."
          }
        },
        {
          "name": "List products and prices",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/services/:service/products?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "services",
                ":service",
                "products"
              ],
              "query": [
                {
                  "key": "network",
                  "value": "MTN",
                  "description": "Only products for this network or biller group, e.g. `MTN` (case-insensitive).",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "Only products of this type, e.g. `SME` for data. Ignored for airtime.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "service",
                  "value": "DATA",
                  "description": "A `service_code` such as `DATA` (any case) or the service `id`."
                }
              ]
            },
            "description": "Returns what you can buy in a service, priced for your account type (standard for Customer accounts, wholesale for API Partner accounts).\n\n**Airtime** returns networks and their airtime types with a discount in basis points (`discount_bp`); you buy airtime by `network` and `type` with your own amount. **Every other service** returns products with a `sku` and a fixed `selling_price_kobo`. For electricity the product identifies the distribution company; you are charged `amount_kobo × (1 − discount_bp / 10000)`.\n\nPrices and discounts use your account type's rule, falling back to the Customer rule, the same way purchases are charged; the order's `amount_debited_kobo` is always what you paid. Limited to 120 requests per minute per IP address and path."
          }
        }
      ]
    },
    {
      "name": "Wallet and transactions",
      "item": [
        {
          "name": "Get wallet balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/wallets/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "wallets",
                "me"
              ]
            },
            "description": "With a **live** key, returns your Aboki Data wallets; purchases are paid from `main_wallet.available_balance`. With a **test** key, returns your test wallet instead, with `is_test: true` and the balance also at the top level."
          }
        },
        {
          "name": "List transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/transactions?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "transactions"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Number of entries to return.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` (or `prev_cursor`) from the previous page's `meta.pagination`.",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "",
                  "description": "`next` for older entries, `prev` for newer ones.",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "Only credits or only debits.",
                  "disabled": true
                },
                {
                  "key": "service_category",
                  "value": "",
                  "description": "Only entries for one service, e.g. `AIRTIME` or `DATA` (any case).",
                  "disabled": true
                },
                {
                  "key": "date_from",
                  "value": "",
                  "description": "Only entries on or after this date: `YYYY-MM-DD` or an ISO 8601 timestamp.",
                  "disabled": true
                },
                {
                  "key": "date_to",
                  "value": "",
                  "description": "Only entries up to the end of this date: `YYYY-MM-DD` or an ISO 8601 timestamp. Must not be before `date_from`.",
                  "disabled": true
                },
                {
                  "key": "q",
                  "value": "",
                  "description": "Free-text search in the narration and reference.",
                  "disabled": true
                }
              ]
            },
            "description": "Returns ledger entries (credits and debits) on your **live** wallets, newest first, using cursor pagination. Test-mode orders do not create ledger entries, so they never appear here, even with a test key; use [List orders](/docs/api/orders#list-orders) for those."
          }
        },
        {
          "name": "Get a transaction",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/transactions/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "transactions",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                  "description": "The transaction `id` (a UUID) from List transactions."
                }
              ]
            },
            "description": "Returns one ledger entry with the wallet balance before and after it."
          }
        }
      ]
    },
    {
      "name": "Airtime",
      "item": [
        {
          "name": "Buy airtime",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/airtime/purchase",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "airtime",
                "purchase"
              ]
            },
            "description": "Sends airtime of any amount from ₦100 to ₦1,000,000 (`amount_kobo` 10000 to 100000000) to one number. Get the networks and `type` values from [List products](/docs/api/catalog#list-products) with service `AIRTIME`. You pay `amount_kobo` less the discount for your account type; the response's `amount_debited_kobo` is the exact charge.\n\nThe phone number's network is not checked against `network` for single purchases, so validate it on your side.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"network\": \"MTN\",\n  \"type\": \"VTU\",\n  \"phone_number\": \"08031234560\",\n  \"amount_kobo\": 50000,\n  \"reference\": \"your-order-1042\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Buy airtime in bulk",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/airtime/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "airtime",
                "bulk"
              ]
            },
            "description": "Sends airtime to up to **50** numbers in one request. The total is reserved at once and the orders are processed in the background; the response is always `202`. Follow progress with [Get a bulk batch](/docs/api/orders#get-bulk-batch) and read each item's `status`, or wait for one webhook per order.\n\nEvery number must belong to `network` (checked by its prefix); for a number ported to another network, set `network` on that line. A number repeated in the batch is bought once. Every line is checked before anything is reserved: a bad line (not a Nigerian number, wrong network, below ₦100, or the same product sent to that number within your duplicate-guard window) is reported in `400 BULK_LINES_INVALID`, with one `details` entry per line, and nothing is charged. Bulk requests do not take `reference` or `callback_url`; webhooks go to your account webhook URL.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"network\": \"MTN\",\n  \"type\": \"VTU\",\n  \"amount_kobo\": 50000,\n  \"recipients\": [\n    {\n      \"phone_number\": \"08031112220\"\n    },\n    {\n      \"phone_number\": \"08061112224\",\n      \"amount_kobo\": 100000\n    },\n    {\n      \"phone_number\": \"08021112228\",\n      \"network\": \"AIRTEL\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Data",
      "item": [
        {
          "name": "Buy data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/data/purchase",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "data",
                "purchase"
              ]
            },
            "description": "Buys one data bundle for one number. Find the `sku` with [List products](/docs/api/catalog#list-products) for service `DATA`, for example `?network=MTN&type=SME`. The price is the product's `selling_price_kobo`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"DATA_MTN_SME_1GB\",\n  \"phone_number\": \"08031234560\",\n  \"reference\": \"your-order-1043\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Buy data in bulk",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/data/bulk",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "data",
                "bulk"
              ]
            },
            "description": "Buys the same bundle for up to **50** numbers. Every number must belong to the bundle's network (checked by its prefix); for a number ported to that network, send `{ \"phone_number\": \"…\", \"ported\": true }` instead of a plain string. A number repeated in the batch is bought once. Bad lines are reported together in `400 BULK_LINES_INVALID` and nothing is charged. The orders are processed in the background and the response is always `202`; see [Get a bulk batch](/docs/api/orders#get-bulk-batch).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"DATA_MTN_SME_1GB\",\n  \"phone_numbers\": [\n    \"08031112220\",\n    \"08061112224\",\n    {\n      \"phone_number\": \"08021112228\",\n      \"ported\": true\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Cable TV",
      "item": [
        {
          "name": "Validate a smartcard",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/cable/validate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "cable",
                "validate"
              ]
            },
            "description": "Checks a smartcard or IUC number with the cable provider and returns the customer's name, so your customer can confirm it before paying. Send the `sku` of the bouquet you are about to buy (the same value you send to [Pay for a cable TV bouquet](#purchase-cable)); Aboki Data finds the TV provider from it. A well-formed request always returns `200`; check `is_valid`. No Idempotency-Key is needed.\n\nThe old `biller` field is refused with `400`: \"Use sku instead of biller (the sku of the bouquet you will buy).\"",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"CABLE_DSTV_COMPACT\",\n  \"smartcard_number\": \"7032345670\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Pay for a cable TV bouquet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/cable/purchase",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "cable",
                "purchase"
              ]
            },
            "description": "Pays for a bouquet on a smartcard. Find the bouquet `sku` with [List products](/docs/api/catalog#list-products) for service `CABLE_TV`. Validate the smartcard first so your customer can confirm the name.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"CABLE_DSTV_COMPACT\",\n  \"smartcard_number\": \"7032345670\",\n  \"reference\": \"your-order-1044\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Electricity",
      "item": [
        {
          "name": "Validate a meter",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/electricity/validate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "electricity",
                "validate"
              ]
            },
            "description": "Checks a prepaid meter number with its distribution company and returns the customer's name. Send the `sku` of the electricity plan you are about to buy (the same value you send to [Buy an electricity token](#purchase-electricity)); Aboki Data finds the distribution company from it. Postpaid meters return `is_valid: false`; only prepaid electricity is supported. A well-formed request always returns `200`; check `is_valid`.\n\nThe old `biller` field is refused with `400`: \"Use sku instead of biller (the sku of the electricity plan you will buy).\"",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"ELECTRICITY_IKEDC_PREPAID\",\n  \"meter_number\": \"45012345670\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Buy an electricity token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/electricity/purchase",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "electricity",
                "purchase"
              ]
            },
            "description": "Buys a prepaid token for ₦100 to ₦1,000,000 (`amount_kobo` 10000 to 100000000; your distribution company may set its own minimum). Use the `sku` of the distribution company from [List products](/docs/api/catalog#list-products) for service `ELECTRICITY`. The token is in `token` on the order once it succeeds.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"ELECTRICITY_IKEDC_PREPAID\",\n  \"meter_number\": \"45012345670\",\n  \"amount_kobo\": 100000,\n  \"reference\": \"your-order-1045\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Exam PINs",
      "item": [
        {
          "name": "Buy an exam PIN",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Unique per order. Reuse the same value when retrying the same order."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/vtu/exam/purchase",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "exam",
                "purchase"
              ]
            },
            "description": "Buys one exam PIN. Find the `sku` with [List products](/docs/api/catalog#list-products) for service `EXAM_PIN`. `phone_number` is your customer's number and becomes the order's recipient. In live mode the PIN and serial number are returned together in `token`, as the provider sends them.\n\nThe duplicate guard applies per phone number and product, so a second PIN of the same exam for the same phone number within the window is refused; lower the window in Developer settings if you need that.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"EXAM_WAEC_PIN\",\n  \"phone_number\": \"08031234560\",\n  \"reference\": \"your-order-1046\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Orders and bulk status",
      "item": [
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/vtu/orders?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "orders"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20",
                  "description": "Number of orders to return.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "Only orders with this status (any case).",
                  "disabled": true
                },
                {
                  "key": "reference",
                  "value": "",
                  "description": "Only the order with this `order_ref` or your `reference`.",
                  "disabled": true
                }
              ]
            },
            "description": "Returns your most recent orders, newest first. A test key lists test orders and a live key lists live orders. Use `status` and `reference` to find specific orders; to look up one order, use [Get an order](#get-order)."
          }
        },
        {
          "name": "Get an order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/vtu/orders/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "orders",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "VTU-20261017-9A8B7C6D5E4F",
                  "description": "`order_id`, `order_ref` or your `reference`."
                }
              ]
            },
            "description": "Returns the current state of one order. `{id}` can be the `order_id`, the `order_ref` or your own `reference`. Use this (or [Verify an order](#verify-order)) to resolve a pending order."
          }
        },
        {
          "name": "Verify an order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/vtu/orders/verify/:reference",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "orders",
                "verify",
                ":reference"
              ],
              "variable": [
                {
                  "key": "reference",
                  "value": "your-order-1042",
                  "description": "Your `reference`, or the `order_ref`."
                }
              ]
            },
            "description": "Looks up an order by your own `reference` (or its `order_ref`) and returns its current state. This is the requery endpoint: call it after a timeout or a `202` to learn whether an order exists and how it ended, **before** you consider buying again."
          }
        },
        {
          "name": "Get a bulk batch",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/vtu/bulk/:batch_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "vtu",
                "bulk",
                ":batch_id"
              ],
              "variable": [
                {
                  "key": "batch_id",
                  "value": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                  "description": "The `batch_id` from the bulk purchase response."
                }
              ]
            },
            "description": "Returns a bulk batch and every order in it. The batch-level `status` and counts are recomputed each time an order in it finishes; read **each item's `status`** (or `customer_status`) to know what was delivered to whom."
          }
        }
      ]
    }
  ]
}
