Skip to Content
API ReferenceReference data

Reference data

List HS codes

GET /i/v1/invoices/hsn-codes

reference.read; free. The HS code list of the organization’s jurisdiction, in the token’s mode, filtered by search and category; page and limit.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
searchquerystringNoCase-insensitive text in the code, description or category. At most 100 characters.
categoryquerystringNoExact category name (case-insensitive). At most 100 characters.
pagequerynumberNoDefault: 1. At least 1.
limitquerynumberNoDefault: 20. Between 1 and 100.

Example request

bash
curl https://gp.useyona.com/i/v1/invoices/hsn-codes \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

One page of HS codes, meta.pagination set.

Errors: 400, 401, 403, 404, 422, 429, 500, 503


List HS code categories

GET /i/v1/invoices/hsn-codes/categories

reference.read; free. The category names of the HS code list of the organization’s jurisdiction, in the token’s mode, sorted.

Who can call it: API key or signed-in user.

Example request

bash
curl https://gp.useyona.com/i/v1/invoices/hsn-codes/categories \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The HS code categories, sorted.

Errors: 401, 403, 404, 422, 429, 500, 503


List the reference code lists

GET /i/v1/invoices/resources

reference.read; free. Every code list of the organization’s jurisdiction in the token’s mode: type, version, item count, fetch time and staleness.

Who can call it: API key or signed-in user.

Example request

bash
curl https://gp.useyona.com/i/v1/invoices/resources \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The lists.

Errors: 401, 403, 422, 429, 500, 503


Get a reference code list

GET /i/v1/invoices/resources/{type}

reference.read; free. One code list’s items; a type the jurisdiction does not serve is 404. Four lists have a fixed item shape: countries {code, name} (ISO 3166-1 alpha-2); services-codes {code, description, category}; states {code, name} (Nigeria: NG-LA Lagos); lgas {code, name, stateCode} (Nigeria: NG-LA-IKE Ikeja, stateCode NG-LA) — filter lgas by stateCode for a State → LGA picker. Every other list’s items are the tax authority’s own.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
typepathstringYes

Example request

bash
curl https://gp.useyona.com/i/v1/invoices/resources/tax-categories \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The list and its items.

Errors: 400, 401, 403, 404, 422, 429, 500, 503


Look up a tax id

GET /i/v1/invoices/lookup/tax-id/{value}

tax_id.lookup; charged per lookup before the provider is asked, refunded when it could not answer (503, never “not registered”). An Idempotency-Key retry is not charged twice; the lookup is made again.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
valuepathstringYesAt most 64 characters.
typequerystringNoOne of tin | rn | foreign. Default: tin.
Idempotency-KeyheaderstringNo8–128 of [A-Za-z0-9_-].

Example request

bash
curl https://gp.useyona.com/i/v1/invoices/lookup/tax-id/33875194-0001 \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The lookup’s answer.

Errors: 400, 401, 402, 403, 409, 422, 429, 500, 503