Skip to main content

Get All Invoices

GET /api/v1/Invoice/GetInvoiceDeatails

Description

This endpoint is used to get all invoices based on several filtering criteria like page size, page number, invoice status, counterparty, account name, recurring invoice, global search, due invoices, and counterparty ID. It returns a GetAllInvoicesResponseListPagedResponse object containing the list of invoices based on the specified filtering criteria.

Headers:

  • None

ApiKey:

  • No API key required

Content-Type:

  • text/plain

  • application/json

  • text/json

Path Parameters:

  • version: string, required

Query Parameters:

  • PageSize: integer, format: int32, specifies the maximum number of invoices to be returned per page.

  • PageNumber: integer, format: int32, specifies the page number of the invoices to be returned.

  • InvoiceStatus: enum, specifies the status of the invoices to be returned. It can be any of the predefined invoice status values (e.g., 'Draft', 'Approved', 'Paid', etc.).

  • Counterparty: string, specifies the name of the counterparty associated with the invoices to be returned.

  • AccountName: string, specifies the name of the account associated with the invoices to be returned.

  • RecuringInvoice: boolean, specifies whether to include recurring invoices or not.

  • GlobalSearch: string, specifies the global search criteria to filter invoices based on various fields like invoice number, account name, and counterparty.

  • DueInvoices: boolean, specifies whether to include due invoices or not.

  • CounterpartyId: string, format: uuid, specifies the unique identifier of the counterparty whose invoices are to be returned.

Request Body:

  • None

URL:

  • GET: {{baseUrl API url}}/api/v1/Invoice/getAll?PageSize=10&PageNumber=1&InvoiceStatus=Draft&Counterparty=ABC&AccountName=XYZ&RecuringInvoice=true&GlobalSearch=123&DueInvoices=true&CounterpartyId=1234

Response:

  • A GetAllInvoicesResponseListPagedResponse object containing the list of invoices based on the specified filtering criteria.

Error Codes:

  • 400: Bad Request

  • 404: Resource not found

  • 500: Internal server error

Example:

Request:

GET /api/v1/Invoice/getAll?PageSize=10&PageNumber=1&InvoiceStatus=Draft&Counterparty=ABC&AccountName=XYZ&RecuringInvoice=true&GlobalSearch=123&DueInvoices=true&CounterpartyId=1234

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" }, { "invoiceId": "2345678901", "counterpartyId": "1234567890", "amount": 2500.00, "currency": "USD", "status": "Draft", "createdDate": "2024-02-20T00:00:00.000Z", "dueDate": "2024-03-21T00:00:00.000Z" }]

Method: GET

/api/v1/Invoice/getAll?PageSize=<integer>&PageNumber=<integer>&InvoiceStatus=3&Counterparty=<string>&AccountName=<string>&RecuringInvoice=<boolean>&GlobalSearch=<string>&DueInvoices=<boolean>&CounterpartyId=<uuid>

Headers

Content-TypeValue
Accepttext/plain

Query Params

Paramvalue
PageSize<integer>
PageNumber<integer>
InvoiceStatus3
Counterparty<string>
AccountName<string>
RecuringInvoice<boolean>
GlobalSearch<string>
DueInvoices<boolean>
CounterpartyId<uuid>

Response: 200

{
"pageNumber": "<integer>",
"pageSize": "<integer>",
"total": "<integer>",
"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": 2,
"recuringInvoice": "<boolean>",
"paymentOption": 8,
"userId": "<uuid>",
"amount": "<double>",
"notifications": "<string>",
"paidAmount": "<double>",
"created": "<dateTime>",
"invoiceStatus": 4,
"beforeDueDate": 4,
"afterDueDate": 7,
"onDueDate": "<boolean>"
},
{
"id": "<uuid>",
"invoiceId": "<string>",
"counterPartyName": "<string>",
"accountName": "<string>",
"dueDate": "<dateTime>",
"currency": 2,
"discountType": 1,
"description": "<string>",
"billingCycle": 2,
"recuringInvoice": "<boolean>",
"paymentOption": 7,
"userId": "<uuid>",
"amount": "<double>",
"notifications": "<string>",
"paidAmount": "<double>",
"created": "<dateTime>",
"invoiceStatus": 4,
"beforeDueDate": 6,
"afterDueDate": 5,
"onDueDate": "<boolean>"
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


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

RESPONSE


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