Skip to main content

Get Invoice by ID

GET /api/v1/Invoice/getbyId

Description

This endpoint is used to get a single invoice by its unique identifier (InvoiceId). It returns a GetInvoiceResponseResponse object containing details of the specified invoice.

Headers:

  • None

ApiKey:

  • No API key required

Content-Type:

  • text/plain

  • application/json

  • text/json

Path Parameters:

  • version: string, required

Query Parameters:

  • InvoiceId: string, format: uuid, specifies the unique identifier of the invoice to be retrieved.

Request Body:

  • None

URL:

  • GET: {{baseUrl API url}}/api/v1/Invoice/getbyId?InvoiceId=1234567890

Response:

  • A GetInvoiceResponseResponse object containing the details of the specified invoice.

Error Codes:

  • 400: Bad Request

  • 404: Resource not found

  • 500: Internal server error

Example:

Request:

GET /api/v1/Invoice/getbyId?InvoiceId=1234567890

Response:

HTTP/1.1 200 OK
{
"invoiceId": "1234567890",
"counterpartyId": "0987654321",
"amount": 1500.00,
"currency": "USD",
"status": "Draft",
"createdDate": "2024-02-19T00:00:00.000Z",
"dueDate": "2024-03-20T00:00:00.000Z"
}

Method: GET

/api/v1/Invoice/getbyId?InvoiceId=<uuid>

Headers

Content-TypeValue
Accepttext/plain

Query Params

Paramvalue
InvoiceId<uuid>

Response: 200

{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"id": "<uuid>",
"invoiceId": "<string>",
"counterPartyName": "<string>",
"accountName": "<string>",
"dueDate": "<dateTime>",
"currency": 1,
"discountType": 2,
"description": "<string>",
"billingCycle": 7,
"recuringInvoice": "<boolean>",
"paymentOption": 6,
"userId": "<uuid>",
"amount": "<double>",
"notifications": "<string>",
"paidAmount": "<double>",
"created": "<dateTime>",
"invoiceStatus": 4,
"beforeDueDate": 6,
"afterDueDate": 1,
"onDueDate": "<boolean>"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/Invoice/getbyId \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!