Andersen E-Invoicing Platform

API Documentation

NRS E-Invoicing System Integrator APIs

The Andersen Nigeria System Integrator E-Invoicing API is the external integration gateway that enables client Enterprise Resource Planning (ERP) systems — such as SAP, Oracle, Microsoft Dynamics, or bespoke enterprise platforms — to:

  • Generate Invoice Reference Numbers (IRN)
  • Retrieve QR Codes for NRS compliance
  • Validate Invoice Schema against NRS standards

This APIs forms the backbone of the Merchant Buyer Solution (MBS) integration layer. All invoice data exchanged via these APIs is validated in real-time and transmitted to the NRS via a licensed Access Point Provider (APP), ensuring full regulatory compliance.

Base Configuration

Base URLhttps://{domain}/erp/api
AuthenticationOAuth 2.0 Bearer token (client_credentials grant)
Content-Typeapplication/json
Auth HeaderAuthorization: Bearer <access_token>
POST /erp/oauth/token

Authentication

The API uses the OAuth 2.0 Client Credentials flow, appropriate for ERP systems that must authenticate autonomously and make API calls on behalf of a tenant organisation. Your client_id and client_secret are provisioned within the Andersen e-Invoicing portal by your organisation's administrator.

Request Body

ParameterTypeRequiredDescription
grant_typestringRequired Specifies the OAuth 2.0 grant type. Must always be set to "client_credentials" for ERP integrations. Any other value results in a 400 error.
Default: "client_credentials"
client_idstringRequired The client identifier issued to your ERP integration by the Andersen administrator. Each ERP integration receives a unique client_id bound to a specific tenant. Treat this value as sensitive configuration data.
client_secretstringRequired The secret passphrase paired with the client_id. Together, these credentials authenticate your ERP system to the platform. Contact Andersen admin to rotate this value immediately if you suspect it has been compromised.

Success Response — 200 OK

ParameterTypeDescription
access_tokenstringThe Bearer token for all subsequent requests: Authorization: Bearer <access_token>
token_typestringAlways returns "Bearer".
expires_inintegerToken lifetime in seconds. Currently 3600 (1 hour). Refresh proactively to avoid 401 errors mid-operation.

Example Request

JSON
{
  "grant_type": "client_credentials",
  "client_id": "your-client-id",
  "client_secret": "your-client-secret"
}

Example Response

JSON
{
  "access_token": "eyJhbGciOiJIUzI1...",
  "token_type": "Bearer",
  "expires_in": 3600
}
POST /erp/api/generate-irn

Generate IRN

Generates the Invoice Reference Number (IRN) using the ERP invoice number, NRS Service ID, and a timestamp. Your NRS Service ID is a unique 8-character identifier available on your NRS MBS dashboard.

Request Body

ParameterTypeRequiredDescription
invoiceNumberstringRequiredThe unique invoice identifier generated by the ERP system.

Example Request

JSON
{
  "invoiceNumber": "INV2340982938"
}

Example Response — 201 Created

JSON
{
  "code": "FinancialDocument.IRNGenerated",
  "message": "Invoice Reference Generated successfully.",
  "data": {
    "irn": "INV2340982938-1E5B443E-20250707"
  }
}
GET /erp/api/{irn}/get-qrcode

Get QR Code

Returns a Base64-encoded QR Code image containing the IRN, Cryptographic Stamp Identifier (CSID), and your digital certificate. Your public key and digital certificate must be available on your NRS dashboard before calling this endpoint.

Path Parameters

ParameterTypeRequiredDescription
irnstringRequiredThe unique IRN of the invoice for which you want to retrieve the QR Code.

Example Request

GET /erp/api/INV2340982938-1E5B443E-20250707/get-qrcode

Example Response — 200 OK

JSON
{
  "code": "FinancialDocument.Retrieved",
  "message": "Financial document retrieved successfully.",
  "data": {
    "qr_code": "data:image/png;base64,iBOZQw0KGgoAAAANSUhVWgAAAQAAAAEA..."
  }
}
POST /erp/api/validate-schema

Validate Invoice Schema

Validates mapped invoice data against the NRS schema and returns true or false.

Request Body

ParameterTypeRequiredDescription
documentDatestring (date)RequiredInvoice date in ISO 8601 format (YYYY-MM-DD). Used by NRS for period reporting.
Default: "2026-02-18"
dueDatestring (date)RequiredThe date by which the buyer must settle the invoice. Used for ageing analysis.
Default: "2026-03-18"
currencystringRequiredISO 4217 three-letter currency code. Use GET /reference-data/currencies for supported values.
Default: "NGN"
buyerNamestringRequiredFull legal registered name of the buyer as it appears on their CAC certificate. Embedded in the NRS-cleared invoice XML.
buyerTaxIdstringRequiredBuyer's TIN as issued by the Nigeria Revenue Service. Primary key for upserting the buyer's Party record. Mandatory for all B2B and B2G invoices.
lineItemsarrayRequiredArray of line item objects. Each element must conform to the Line Item Object schema.
paymentMeansCodestringRequiredNRS-standardised payment method code. Use GET /reference-data/payment-means.
Default: "30"
paymentDueDatestring (date)RequiredPayment due date as recorded on NRS systems.
Default: "2026-03-18"
invoiceRefNumberstringRequiredIRN returned by POST /erp/api/generate-irn.
invoiceKindstringRequiredInvoice classification. Accepted values: B2B, B2G, B2C.
invoiceTypeCodestringRequiredNRS invoice type code. Use GET /reference-data/invoice-types.
Default: "388"
invoiceTypeNamestringRequiredHuman-readable label for the invoice type.
Default: "Standard Invoice"
referencestringOptionalERP internal reference or Purchase Order number. Searchable via GET /financial-documents.
notesstringOptionalFree-text notes or special instructions printed on the invoice.
paymentTermsstringOptionalPlain-language payment terms agreed with the buyer.
Default: "Net 30 days"
buyerRegistrationNumberstringOptionalBuyer's CAC company registration number.
buyerEmailstringOptionalBuyer contact email address.
buyerPhonestringOptionalBuyer contact phone number.
buyerAddressLine1stringOptionalFirst line of the buyer's registered street address.
buyerAddressLine2stringOptionalSecond line of buyer's address (suite, floor, building name).
buyerCitystringOptionalBuyer city.
buyerStatestringOptionalBuyer Nigerian state. Use GET /reference-data/states for NRS-recognised names.
buyerPostalCodestringOptionalBuyer postal code.
buyerCountrystringOptionalISO 3166-1 alpha-2 country code.
Default: "NG"
documentReferencesarrayOptionalRelated NRS document references. Each element must conform to the Document Reference Object schema.

Line Item Object — lineItems[]

ParameterTypeRequiredDescription
descriptionstringRequiredClear description of the goods or services. Appears verbatim on the cleared invoice and in NRS records.
quantitydecimalRequiredQuantity supplied. Must be a positive decimal.
unitOfMeasurestringRequiredUN/ECE Recommendation 20 unit code. Common values: EA (each), KG (kilogram), HR (hour), MTR (metre).
Default: "EA"
unitPricedecimalRequiredPrice per unit excluding tax.
taxRatePercentdecimalRequiredApplicable VAT or tax rate as a percentage. Standard Nigerian VAT is 7.5.
Default: 7.5
taxCodestringOptionalNRS tax category code. Use GET /reference-data/tax-categories. Values: VAT, ZERO, EXMT.
Default: "VAT"
productCategorystringOptionalProduct or service category. Auto-created if it does not exist.
Default: "Goods"
discountFeeAmountdecimalOptionalDiscount amount for this line.
Default: 0
discountFeeTypestringOptional"Percent" or "FixedAmount".
Default: "Percent"
additionalFeeAmountdecimalOptionalAdditional charge for this line.
Default: 0
additionalFeeTypestringOptional"Percent" or "FixedAmount".
Default: "Percent"
itemCodestringOptionalERP item code. Used to upsert the item in the tenant catalogue.
itemNamestringOptionalItem name used when creating a new catalogue record.
itemCurrencystringOptionalISO 4217 currency for the item's unit price record.
categoryNamestringOptionalCategory to assign to the item. Auto-created if missing.

Document Reference Object — documentReferences[]

ParameterTypeRequiredDescription
typestringRequiredReference type. Examples: "PreviousInvoice", "Contract", "Billing".
irnstringRequiredIRN of the referenced document as issued by NRS.
issueDatestring (date)OptionalIssue date of the referenced document in ISO 8601 format (YYYY-MM-DD).

Example Request

JSON
{
  "documentDate": "2026-03-04",
  "dueDate": "2026-08-18",
  "currency": "NGN",
  "buyerName": "Test Buyer",
  "buyerTaxId": "12345678-0001",
  "paymentMeansCode": "10",
  "paymentDueDate": "2026-04-04",
  "paymentTerms": "Net 30",
  "invoiceTypeCode": "388",
  "invoiceTypeName": "Standard Invoice",
  "invoiceKind": "B2B",
  "invoiceRefNumber": "INV2340982938-1E5B443E-20250707",
  "lineItems": [
    {
      "classificationCode": "9609",
      "description": "IT Consulting Services (Revised)",
      "quantity": 25,
      "unitOfMeasure": "HR",
      "unitPrice": 15000.00,
      "taxCode": "STANSARD_VAT",
      "taxRatePercent": 7.5,
      "productCategory": "Services",
      "discountFeeAmount": 0,
      "discountFeeType": "Percent",
      "additionalFeeAmount": 0,
      "additionalFeeType": "Percent",
      "itemCode": "ITEM00001",
      "itemName": "Test Item",
      "itemCurrency": "NGN",
      "categoryName": "Test Category"
    }
  ],
  "buyerEmail": "buyer@email.ng",
  "buyerPhone": "+2347034567890",
  "buyerAddressLine1": "20 Idimu road",
  "buyerAddressLine2": "Abule-Egba",
  "buyerCity": "Alimosho",
  "buyerState": "NG-LG",
  "buyerlga": "NG-SO-YAB",
  "buyerPostalCode": "19029399",
  "buyerCountry": "NG",
  "documentReferences": [
    {
      "type": "Billing",
      "irn": "INV2340982938-1E5B443E-20250707",
      "issueDate": "2024-02-23"
    }
  ]
}

Success Response — 200 OK

JSON
{
  "code": "FinancialDocument.Validated",
  "message": "Invoice data validated successfully."
}