GuidesInvoiceHow to get invoices for a given supplier

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_typeShort NamePSRESTfulDescription
1PO Number SearchPO_NUMBERSearch for invoices by purchase order number.
2Invoice Number SearchINVOICE_NUMBERSearch for invoice by invoice number.
3Date SearchDATESearch for invoices with an invoice date specified by requested_date.
4Available Date Time SearchAVAILABLE_DATE_TIMESearch 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/invoices

Example of error message

{
    "InvoiceArray": null,
    "ServiceMessageArray": {
        "ServiceMessage": [
            {
                "code": 999,
                "description": "Max 14 days of invoices or invalid date search",
                "severity": "Error"
            }
        ]
    }
}