Create E-Invoice

Create E-Invoice

Create a new e-invoice with supplier data, optional payee/tax representative data, payment details, line items (with per-item taxes), and optional discount. If save_and_validate is true, the invoice is also validated against the NRS system after creation.

API Endpoint

POST /api/v1/e-invoicing/invoices

Authorization

Request Body

{
  "save_and_validate": true,
  "invoice_number": "string",
  "source_reference": "string",
  "invoice_type": "string",
  "issue_date": "string",
  "document_currency": "string",
  "tax_currency": "string",
  "customer_id": "string|null",
  "supplier_data": { /* supplier object */ },
  "payee_data": { /* payee object or null */ },
  "tax_representative_data": { /* tax_rep object or null */ },
  "payment_details": { /* payment object or null */ },
  "items": [ { /* item object */ } ],
  "discount": { /* discount object or null */ },
  "notes": "string|null",
  "payment_terms": "string|null"
}

Sample cURL Request

curl -X POST "https://atlas.tryduplo.com/api/v1/e-invoicing/invoices" \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
       "invoice_number": "INV-2026-001",
       "source_reference": "SRC-2026-001",
       "invoice_type": "388",
       "issue_date": "2026-04-09",
       "document_currency": "NGN",
       "tax_currency": "NGN",
       "supplier_data": {
         "name": "Acme Corp Ltd",
         "email": "billing@acme.com",
         "phone_number": "+2348012345678",
         "tin": "12345678-0001",
         "country": "NG",
         "city": "Lagos",
         "address": "123 Business Ave",
         "postal_zone": "100001"
       },
       "items": [
         {
           "description": "Software License",
           "quantity": 2,
           "unit_price": 50000
         }
       ]
     }'

Response Bodies

201 Created

{
  "requestId": "3a6538fd-03f0-4b05-ba41-5d44769dd014",
  "requestTimestamp": "2026-04-09 12:00:00",
  "message": "Invoice created successfully.",
  "statusCode": 201,
  "data": {
    "id": "019a1639-ce25-70b7-ab20-16fcb2bac023",
    "invoiceReferenceNumber": "REF-2026-001",
    "sourceReference": "SRC-2026-001",
    "invoiceNumber": "INV-2026-001",
    "systemInvoiceNumber": "SYS-INV-001",
    "status": "VALIDATED",
    "businessId": "019a1639-ce25-70b7-ab20-16fcb2bac023",
    "businessState": "LIVE",
    "invoiceType": "388",
    "issueDate": "2026-04-09",
    "documentCurrency": "NGN",
    "taxCurrency": "NGN",
    "paymentStatus": "PENDING",
    "subtotalAmount": 100000,
    "taxTotal": 7500,
    "totalAmount": 107500,
    "amountDue": 107500,
    "supplierData": {
      "name": "Acme Corp Ltd",
      "email": "billing@acme.com",
      "phoneNumber": "+2348012345678",
      "tin": "12345678-0001",
      "country": "NG",
      "state": "Lagos",
      "city": "Lagos",
      "address": "123 Business Ave"
    },
    "payeeData": {
      "name": "Customer Inc",
      "email": "accounts@customer.com",
      "phoneNumber": "+2348098765432",
      "tin": "87654321-0001",
      "country": "NG",
      "state": "Abuja",
      "city": "Abuja",
      "address": "456 Client Street"
    },
    "taxRepresentativeData": {
      "name": "Tax Rep Ltd",
      "email": "rep@taxrep.com",
      "phoneNumber": "+2348011111111",
      "tin": "11111111-0001",
      "country": "NG",
      "state": "Lagos",
      "city": "Lagos",
      "address": "789 Tax Street"
    },
    "invoiceLineItems": [
      {
        "lineNumber": 1,
        "description": "Software License",
        "unit": "EA",
        "quantity": 2,
        "unitPrice": 50000,
        "itemAmount": 100000,
        "taxes": [
          {
            "name": "VAT",
            "rate": 0.075,
            "amount": 7500
          }
        ],
        "taxAmount": 7500,
        "lineTotalExcludingTax": 100000,
        "lineTotalIncludingTax": 107500
      }
    ],
    "discountData": {},
    "notes": "Payment due within 30 days",
    "paymentTerms": "Net 30",
    "daysDue": 30,
    "firsStatus": "SIGNED",
    "firsApprovalDate": "2026-04-09 14:30:00",
    "firsRejectionReason": null,
    "digitalStamp": "abc123def456...",
    "branding": {
      "logo_url": "https://example.com/logo.png",
      "primary_color": "#1A73E8",
      "secondary_color": "#FF5722"
    },
    "paymentDetails": {
      "bankName": "Access Bank",
      "accountName": "Acme Corp Ltd",
      "accountNumber": "0123456789"
    },
    "createdAt": "2026-04-09 12:00:00",
    "updatedAt": "2026-04-09 14:30:00"
  }
}

401 Unauthorized

{
  "requestId": "f006ad7b-096c-4254-8c7e-2d23a55b0b0e",
  "requestTimestamp": "2026-04-09 12:00:00",
  "message": "Unauthenticated.",
  "statusCode": 401
}

422 Unprocessable Entity

{
  "requestId": "f006ad7b-096c-4254-8c7e-2d23a55b0b0e",
  "requestTimestamp": "2026-04-09 12:00:00",
  "message": "The invoice number field is required.",
  "statusCode": 422,
  "errors": {}
}

500 Internal Server Error

{
  "requestId": "f006ad7b-096c-4254-8c7e-2d23a55b0b0e",
  "requestTimestamp": "2026-04-09 12:00:00",
  "message": "An error occurred while processing your request.",
  "statusCode": 500
}

Last updated on 5/27/2026

Feedback

How is this guide? Good / Bad