Skip to Content
GuidesStates and LGAs

States and LGAs

A Nigerian address on an e-invoice names its state and local government area (LGA) with the tax authority’s own codes: NG-LA for Lagos, NG-LA-IKE for Ikeja. Yona serves both lists, checks a buyer’s address against them, and sends the codes to the authority when an invoice is issued.

The lists

Both are free to read with any key (reference.read) and change rarely, so read them once and keep them.

ListRouteItemExample
StatesGET /i/v1/invoices/resources/states{ code, name }{ "code": "NG-LA", "name": "Lagos" }
LGAsGET /i/v1/invoices/resources/lgas{ code, name, stateCode }{ "code": "NG-LA-IKE", "name": "Ikeja", "stateCode": "NG-LA" }
CountriesGET /i/v1/invoices/resources/countries{ code, name }{ "code": "NG", "name": "Nigeria" }
bash
curl https://gp.useyona.com/i/v1/invoices/resources/lgas \
-H "Authorization: Bearer sk_test_your_key_here"

The answer is the usual envelope with data: { type, version, items, fetchedAt, stale }. version goes up when the authority changes a list, and GET /i/v1/invoices/resources lists every code list with its version, which is a cheap way to notice a change.

  • There are 37 states: the 36 states and the Federal Capital Territory (NG-FC).
  • An LGA belongs to one state. Its stateCode is that state’s code.
  • A code cannot be worked out from a name. Ikeja is NG-LA-IKE; Kwali in the FCT is NG-FC-KL1. Read the codes from the list.
  • A few LGA names exist in two states (Surulere, Obi, Bassa, Ifelodun, Irepodun, Nasarawa). Keep the code, never the name alone.

A State and LGA picker

Load both lists once. When the user picks a state, show the LGAs whose stateCode is that state’s code, and keep the two codes.

const lagos = states.find((state) => state.name === 'Lagos'); // { code: 'NG-LA', name: 'Lagos' } const lgasOfLagos = lgas.filter((lga) => lga.stateCode === lagos.code); // the LGA picker's options

Buyers

A postal address is { line1, line2?, city, state?, lga?, postalCode?, country }. state and lga are optional. For an address in Nigeria (country: "NG"):

  1. state is a state code. Its exact name (Lagos) is accepted too and is stored as the code.
  2. lga is the code of an LGA of that state. Its exact name within the state (Ikeja) is accepted too and is stored as the code.
  3. An lga sent without a state fills the state in, unless the name exists in two states.
  4. Answers always carry the codes.

For any other country, state is free text and is not checked.

bash
curl -X POST https://gp.useyona.com/i/v1/buyers \
-H "Authorization: Bearer sk_test_your_key_here" \
-H "Content-Type: application/json" \
-d '{
  "name": "Acme Trading",
  "partyType": "individual",
  "address": {
    "line1": "12 Allen Avenue",
    "city": "Ikeja",
    "state": "NG-LA",
    "lga": "NG-LA-IKE",
    "postalCode": "100271",
    "country": "NG"
  }
}'

POST /i/v1/buyers and PATCH /i/v1/buyers/{id} refuse a value that is not on the lists. Nothing is saved and nothing is charged:

StatuserrorCodeMeaningField in errors
400VAL202state is not on the list of statesaddress.state
400VAL203lga is not on the list of LGAs, or belongs to another stateaddress.lga

Your own address

Your organization is the seller on every invoice. Its address is edited in the Yona app, where the state and the LGA are chosen from the same lists.

What the tax authority receives

When an invoice is issued, the seller’s and the buyer’s state and LGA go to the authority as codes, and the invoice keeps the names beside them as stateName and lgaName for the PDF.

A buyer or an organization address saved before these lists (free text such as “Lagos State”) is matched to them when the invoice is issued. A value that matches nothing is left off what the authority receives and still prints on the PDF. Issuing never fails because of an old address.