How to get invoices for a given supplier
Video: PromoStandards webinar
“Invoice Service Demo with Jon Norris”, PromoStandards, May 2023. It explains the PromoStandards SOAP service. The PSRESTful requests are below.
Function getInvoices
In order to get all invoices for a given supplier we need to use Invoice Service(INVC). Our API allows easy access by a GET request to our invoices endpoint.
Query Types
| query_type | Short Name | PSRESTful | Description |
|---|---|---|---|
| 1 | PO Number Search | PO_NUMBER | Search for invoices by purchase order number. |
| 2 | Invoice Number Search | INVOICE_NUMBER | Search for invoice by invoice number. |
| 3 | Date Search | DATE | Search for invoices with an invoice date specified by requested_date. |
| 4 | Available Date Time Search | AVAILABLE_DATE_TIME | Search for invoices that were made available by a date time greater than the value specified by available_timestamp. |
HTTP VERB: GET
URL: https://api.psrestful.com/v1.0.0/suppliers/{SUPPLIER_CODE}/invoices
Example Request
curl -X GET "https://api.psrestful.com/v1.0.0/suppliers/PCNA/invoices?query_type=DATE&requested_date=2024-01-15" \
-H "X-API-Key: your-api-key"Example Response:
This is the response from calling with:
SUPPLIER_CODE = PCNA
COMPLETE URL:
https://api.psrestful.com/v1.0.0/suppliers/PCNA/invoicesExample of error message
{
"InvoiceArray": null,
"ServiceMessageArray": {
"ServiceMessage": [
{
"code": 999,
"description": "Max 14 days of invoices or invalid date search",
"severity": "Error"
}
]
}
}