Skip to main content

Get Invoice

The GET endpoint retrieves details of a specific invoice by its ID.

Endpoint

  • URL: /invoices/{id}
  • Method: GET

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Path Parameters

ParameterTypeDescription
idstringThe unique identifier of the invoice.

Request Headers

HeaderTypeDescription
accessTokenstringAccess token for authentication. (required)

Request Body

  • None

Response

  • Status Code: 200 OK

Success Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful.
dataobjectThe invoice object.

Invoice Object Fields

FieldTypeDescription
_idstringUnique identifier of the invoice.
orderstringReference to the associated order ID.
entityIdstringUnique entity identifier for the invoice.
lineItemsarrayArray of line items included in the invoice.
totalnumberTotal amount of the invoice.
mailsSentarrayArray of mail objects tracking sent notifications.
createdByobjectInformation about who created the invoice.
metaFieldsarrayArray of custom metadata fields.
createdAtstringTimestamp when the invoice was created.
updatedAtstringTimestamp when the invoice was last updated.

Line Item Object

FieldTypeDescription
lineItemIdstringReference to the order line item ID.
quantitynumberQuantity of the item in the invoice.

Mails Sent Object

FieldTypeDescription
sentTostringEmail address where the invoice was sent.
sentAtstringTimestamp when the email was sent.

Created By Object

FieldTypeDescription
idstringID of the creator.
namestringName of the creator.
typestringType of creator ("api" or "admin").

Sample Response Body

{
"success": true,
"data": {
"order": "6932f96b8cd64c28a4fb5873",
"entityId": "1",
"lineItems": [
{
"lineItemId": "6932f96b8cd64c28a4fb5876",
"quantity": 30,
"id": "693738682fa9114d9af87d2a"
},
{
"lineItemId": "6932f96b8cd64c28a4fb5877",
"quantity": 20,
"id": "693738682fa9114d9af87d2b"
},
{
"lineItemId": "6932f96b8cd64c28a4fb5878",
"quantity": 10,
"id": "693738682fa9114d9af87d2c"
},
{
"lineItemId": "6932f96b8cd64c28a4fb5879",
"quantity": 5,
"id": "693738682fa9114d9af87d2d"
},
{
"lineItemId": "6932f96b8cd64c28a4fb587a",
"quantity": 2,
"id": "693738682fa9114d9af87d2e"
}
],
"total": 3684.78,
"createdBy": {
"id": "6852dc137d290c8e310f258e",
"name": "Sam Nabahani",
"type": "admin"
},
"metaFields": [],
"createdAt": "2025-12-08T20:43:20.608Z",
"updatedAt": "2025-12-08T20:43:20.608Z",
"id": "693738682fa9114d9af87d29"
}
}

Example Request

curl --location --request GET '<BASE-URL>/invoices/693738682fa9114d9af87d29' \
--header 'accessToken: <ACCESS-TOKEN>'

Error Responses

404 Not Found

{
"success": false,
"message": "Invoice not found"
}

401 Unauthorized

{
"success": false,
"message": "Invalid or missing access token"
}

500 Internal Server Error

{
"success": false,
"message": "An error occurred while fetching the invoice"
}