Recover existing invoices
The GET /pic/link/purchase-invoices/find
endpoint allows you to retrieve purchase order invoices created by suppliers through AppliQloud. ππΌπ€
Authorizationβ
This endpoint requires authentication through Basic Auth
with the username and password of the backend that will consume it. To create and configure a backend, follow the backends tutorial
Request parametersβ
- π£ Path
- π Query
- πͺ Body
This request does not contain parameters of type Path
Name | Type | Default | Description |
---|---|---|---|
fromDate | string | null | null | From what date to recover invoices |
toDate | string | null | null | Until what date to recover the invoices |
The dates of these parameters must be in YYYY-MM-DD
format for the correct functioning of the query. Additionally, the date of toDate
cannot be before the date of fromDate
if both are specified.
This request does not contain parameters of type Body
Examplesβ
- π₯οΈ cURL
curl -G --location 'https://<identifier>.api.appliqloud.com/pic/link/purchase-invoices/find' \
--header 'Authorization: Basic <token>' \
-d 'fromDate=2024-05-05' \
-d 'toDate=2024-09-05'
Make sure to modify the <identifier>
and <token>
fields with your company identifier and authentication token respectively.
Responsesβ
- β 200
- β οΈ 400
- π 401
- π§ 500
The invoices were successfully recovered
[
{
"header": {
"invoiceId": "1",
"invoiceStatus": "PENDING_APPROVAL",
"accountingEntityId": "AE1",
"vendorBusinessPartnerId": "1245",
"purchaseOrderId": "450000001",
"invoiceVendorId": "14156",
"headerText": "Invoice",
"invoiceDate": "2024-08-11",
"fiscalYear": "2024",
"totalAmount": 12000.0,
"currencyId": "MXN",
"paidAmount": 0.0,
"plannedPaymentDate": null,
"lastPaymentDate": null,
"rejectionComments": null,
"invoiceFiles": [
{
"fileType": "PDF",
"key": "invoices/d3d3dd51-c701-42f2-b1ff-558f68c3caa9.pdf",
"url": "https://s3.us-west-2.amazonaws.com/prd-apq-tenant-bucket/invoices/d3d3dd51-c701-42f2-b1ff-558f68c3caa9.pdf"
}
]
},
"items": [
{
"itemId": "10",
"purchaseOrderItemId": "10",
"unitId": "EA",
"quantity": 2,
"netUnitPrice": 6000.0,
"netTotalPrice": 12000.0,
"taxesAmount": 0.0,
"extraChargesAmount": 0.0,
"totalPrice": 12000.0,
"itemText": null
}
]
}
]
There is an error in the request
{
"traceId": "243855edd96145b689fb3af86eadaaf9"
"cause": "InvalidDateRangeException",
"message": "From date 2024-06-01 must be before to date 2024-05-02"
}
Authorization required or credentials are not correct
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "UnauthorizedException",
"message": "Authorization required"
}
Internal application error (contact support@appliqloud.com or open a support ticket)
{
"traceId": "3095a0a77f80436ba104eb2fc24ba343"
"cause": "InternalServerError",
"message": "Internal Server Error"
}