All Invoices API
POST /allInvoices
Description
This endpoint retrieves a list of all invoices with detailed information.
Request
Endpoint: /allInvoices
Method: POST
Body:
query allInvoices {
allInvoices {
id
firstName
lastName
clientCompanyName
address
taxId
email
phoneNumber
groupId
amountForGroup
multiLogin
amountForMultiLogin
totalAmount
paymentMethod
paymentDate
invoiceDate
updateDate
}
}
GraphQL Variables:
{}
Example Request
cURL:
curl --location 'YOUR_API_ENDPOINT' \
--header 'Content-Type: application/json' \
--data '{"query":"query allInvoices {\n allInvoices {\n id\n firstName\n lastName\n clientCompanyName\n address\n taxId\n email\n phoneNumber\n groupId\n amountForGroup\n multiLogin\n amountForMultiLogin\n totalAmount\n paymentMethod\n paymentDate\n invoiceDate\n updateDate\n }\n}","variables":{}}'
Response
The response will include:
id
: Unique identifier of the invoice.firstName
: First name of the client.lastName
: Last name of the client.clientCompanyName
: Company name of the client.address
: Address of the client.taxId
: Tax identification number of the client.email
: Email address of the client.phoneNumber
: Phone number of the client.groupId
: Group ID associated with the invoice.amountForGroup
: Amount billed for the group.multiLogin
: Number of multi-logins billed.amountForMultiLogin
: Amount billed for multi-logins.totalAmount
: Total amount of the invoice.paymentMethod
: Method used for payment.paymentDate
: Date when the payment was made.invoiceDate
: Date when the invoice was issued.updateDate
: Date when the invoice was last updated.
Notes
- The response may include sensitive client information. Ensure proper access controls and permissions are in place.
- This query retrieves all invoices. If the dataset is large, consider implementing pagination or filtering to manage the response size.
- Ensure that all invoice fields are properly formatted and validated.
Errors
- 500 Internal Server Error: Server error while processing the request.