Skip to content

Invoices · Overview

Overview Invoices API

Create, list, retrieve, update, and delete invoices for NRS e-invoicing. All invoice endpoints are scoped to an organization and return camelCase JSON in a common response envelope.

Requests and authentication

Invoice endpoints live under $EINV_BASE_URL/api/v1/organizations/{organizationReference}/invoices/pos, where EINV_BASE_URL=https://api.uat.einvoicing.avetiumtechnologies.com/api/v1. Authenticate with the bearer token from POST /api/v1/organizations/pos/authenticate (see Access token) and send the X-Client-Id header.

FieldTypeDescription
organizationReference *pathOrganization segment in every path: /api/v1/organizations/{organizationReference}/invoices/pos.
Authorization *headerBearer <access_token> (JWT) obtained from POST /api/v1/organizations/pos/authenticate.
X-Client-Id *headerThe organization's client identifier. Required on every invoice endpoint.

Response envelope

Every response, success or error, is wrapped in the same object.

FieldTypeDescription
statusCodeintegerHTTP status mirrored in the body.
messagestringHuman-readable result.
timestampstringServer time of the response.
dataobjectThe payload, for example an InvoiceResponse.
successfulbooleanTrue when the call succeeded.

Endpoint directory

Paths are relative to /api/v1/organizations/{organizationReference}. Linked rows have their own page.

MethodPathPurpose
GET/invoices/posGet all POS invoices (paginated, filter by status, search, date range)
POST/invoices/posCreate invoice via POS (POS agent authentication)
GET/invoices/pos/{invoiceId}Get POS invoice with its related entities
PUT/invoices/pos/{invoiceId}Update POS invoice
PATCH/invoices/pos/{invoiceId}Update POS invoice
DELETE/invoices/pos/{invoiceId}Delete POS invoice and its related entities

Invoice status

The status filter and field use these values.

DRAFT

Draft invoice

INPUT_VALIDATED

Input validation passed

INPUT_REJECTED

Input validation failed

VALIDATED

Validated

SUBMITTED

Submitted

REJECTED

Rejected

NRS_VALIDATED

Validated by NRS

FAILED_NRS_VALIDATION

NRS validation failed

NRS_APPROVED

Approved by NRS

NRS_REJECTED

Rejected by NRS

Invoices created through the POS integration are automatically sent for validation and submission.

Update and delete

PUT and PATCH /invoices/pos/{invoiceId} both update a POS invoice and take an UpdateInvoiceRequest body. Its fields largely overlap the create body (for example invoiceDate, dueDate, customerName, lineItems), and the spec marks none of them as required. The spec does not define how PUT and PATCH differ, so it does not say whether omitted fields are kept or cleared.

DELETE /invoices/pos/{invoiceId} deletes the invoice and its related entities. Both return the standard envelope and the errors listed below.

Errors

FieldTypeDescription
400Bad RequestMalformed or invalid request.
401UnauthorizedMissing or invalid bearer token.
403ForbiddenCaller is not permitted to perform this action.
404Not FoundOrganization or invoice does not exist.
409ConflictRequest conflicts with the current state.
500Server ErrorUnexpected server error.

Error bodies use the same envelope with a string data. See Errors.

Coming soon Soon

Not available yet

A sandbox environment, API key scopes, and idempotency keys are planned. None of them exist in the API today, so do not rely on them.