0% found this document useful (0 votes)
497 views4 pages

E Invoicing API

The document provides an API specification for an invoice transmission API. It allows transmitting e-invoice data in a request payload with a maximum of 500 invoices. The payload has a header and invoice information part. A successful response returns a QR code and invoice reference number (IRN). It exposes an endpoint to transmit invoices with parameters like token, username, and EBS ID. Responses include status, IDs, and error/success messages.

Uploaded by

Vikas Khanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
497 views4 pages

E Invoicing API

The document provides an API specification for an invoice transmission API. It allows transmitting e-invoice data in a request payload with a maximum of 500 invoices. The payload has a header and invoice information part. A successful response returns a QR code and invoice reference number (IRN). It exposes an endpoint to transmit invoices with parameters like token, username, and EBS ID. Responses include status, IDs, and error/success messages.

Uploaded by

Vikas Khanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

12/12/23, 3:54 PM E-invoicing API

API Specification

Below are the list of APIs exposed by MRA to test the functionalities of MRA e-Invoicing System.

TOKEN GENERATION API RELEASE (1.0.0) 

INVOICE TRANSMISSION API RELEASE (1.0.0) 

The Invoice Transmission API is used to transmit EBS transaction data on the MRA e-Invoicing System.
The maximum number of invoices allowed is 500 per request.
The request payload consist of 2 parts, the header information part and the invoice information part.

Header Information Part


Header attributes. See InvoiceRequest payload schema below
Invoice Information Part
Invoice attribute is of string type. It consist of invoice data in encrypted form
Invoice data should be encrypted following steps described in our technical guide. Click here to access the guide.
After successful transmission of the transaction, the Transmission API will reply with a QR Code and an IRN.

The request endpoint to test invoice transmission


[Link]

Einvoicing - Invoice Transmission API Specification

Invoice Transmission Transmission of invoice

POST /invoice/transmit Invoice Processing

This endpoint is exposed to accept one or multiple invoices. The maximum number of invoices allowed is 500 per request.
The InvoiceRequest payload should be as per the schema specified below.

Parameters Cancel

Name Description

token
The token provided by authority.
* required
string
token
(header)

username
The username provided at time of registration.
* required
string
username
(header)

ebsMraId
The unique electronic billing system identification provided by authority at time of registration.
* required
string
ebsMraId
(header)

areaCode
areaCode
* required
string
(header)

[Link] Transmission/transmitInvoice 1/4


12/12/23, 3:54 PM E-invoicing API
required
Request body application/json

InvoiceRequest Payload

{
"requestId": "string",
"requestDateTime": "string",
"signedHash": "string",
"encryptedInvoice": "string"
}

Execute

Responses

Code Description Links

200 No links
success

Media type

application/json
Controls Accept header.

Example Value Schema

InvoiceResponse {
responseId string

A unique Response ID generated by authority.

responseDateTime string

A Response Date and Time returned by authority.

requestId string

The unique Request ID provided by client.

status string

Status of transaction.

environment string

Invoice Transmission environment returned by authority.


Values: LIVE or TEST.

infoMessages
[...]
errorMessages
[...]
fiscalisedInvoices
[...]
}

[Link] Transmission/transmitInvoice 2/4


12/12/23, 3:54 PM E-invoicing API

Code Description Links

400 No links
Invalid Request Object

Media type

application/json

Example Value Schema

{
"responseId": "LT16799339693773302050114",
"responseDateTime": "20230327 [Link]",
"requestId": "string",
"status": "ERROR",
"environment": "TEST",
"infoMessages": null,
"errorMessages": [
{
"code": "string",
"description": "string"
}
],
"fiscalisedInvoices": null
}

401 No links
Returned in case token is invalid

Media type

application/json

Example Value Schema

{
"responseId": "LT16799339693773302050115",
"responseDateTime": "20230327 [Link]",
"requestId": "string",
"status": "ERROR",
"environment": "TEST",
"infoMessages": null,
"errorMessages": [
{
"code": "ERR0050",
"description": "Token is not valid"
}
],
"fiscalisedInvoices": null
}

500 No links
Returned in case of internal errors

Media type

application/json

Example Value Schema

{
"status": "ERROR",
"errorMessages": [
{
"code": "ERR0023",
"description": "An internal server error has occurred"
}
]
}

Schemas

FiscalisedInvoice

InvoiceResponse

[Link] Transmission/transmitInvoice 3/4


12/12/23, 3:54 PM E-invoicing API

Message

InvoiceRequest

© 2023 Copyright Mauritius Revenue Authority.

[Link] Transmission/transmitInvoice 4/4

You might also like