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.
| Field | Type | Description |
|---|---|---|
| organizationReference * | path | Organization segment in every path: /api/v1/organizations/{organizationReference}/invoices/pos. |
| Authorization * | header | Bearer <access_token> (JWT) obtained from POST /api/v1/organizations/pos/authenticate. |
| X-Client-Id * | header | The organization's client identifier. Required on every invoice endpoint. |
Response envelope
Every response, success or error, is wrapped in the same object.
| Field | Type | Description |
|---|---|---|
| statusCode | integer | HTTP status mirrored in the body. |
| message | string | Human-readable result. |
| timestamp | string | Server time of the response. |
| data | object | The payload, for example an InvoiceResponse. |
| successful | boolean | True when the call succeeded. |
Endpoint directory
Paths are relative to /api/v1/organizations/{organizationReference}. Linked rows have their own page.
| Method | Path | Purpose |
|---|---|---|
| GET | /invoices/pos | Get all POS invoices (paginated, filter by status, search, date range) |
| POST | /invoices/pos | Create 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
| Field | Type | Description |
|---|---|---|
| 400 | Bad Request | Malformed or invalid request. |
| 401 | Unauthorized | Missing or invalid bearer token. |
| 403 | Forbidden | Caller is not permitted to perform this action. |
| 404 | Not Found | Organization or invoice does not exist. |
| 409 | Conflict | Request conflicts with the current state. |
| 500 | Server Error | Unexpected 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.