Retrieve a list of customers

OData

P4W utilizes OData when querying database through API calls. Following example retrieves first 20 customers, including assigned clients if applicable.

GET https://{tenant_name}.p4warehouse.com/odata/Customer

Query Parameters

NameTypeDescription

$expand

String

Client base

$orderby

String

CustomerCode

$top

Integer

Number of customers to retrieve

$count

Boolean

Whether to displays total number of customers available

Headers

NameTypeDescription

ApiKey*

Stirng

System API key

{
    "@odata.context": "https://doc1.p4warehouse.com/odata/$metadata#Customer(Client(Id,Name),CartonizationProfile(Id,Name))",
    "@odata.count": 3,
    "value": [
        {
            "CustomerCode": "ABC",
            "ClientId": "ce54af79-2587-4053-8c65-b13734f4bf39",
            "CompanyName": "ABCgroup",
            "ContactPerson": "John Smith",
            "Email": "smith.j@abcgroup.com",
            "Phone": "2123542411",
            "TaxId": null,
            "BillToName": "ABC icn.",
            "BillToPhone": "2123542413",
            "BillToAddress1": "1608 Queensway",
            "BillToAddress2": "12",
            "BillToCity": "Toronto",
            "BillToStateProvince": "ON",
            "BillToZipPostal": "M8Y 1V2",
            "BillToCountry": "Canada",
            "DefaultCountOnShip": null,
            "DefaultSignOnShip": null,
            "DefaultCountOnDelivery": null,
            "DefaultSignOnDelivery": null,
            "TruckLoadConsolidationGroup": null,
            "Description": "DemoCustomer01",
            "Logo": null,
            "PackslipDisclaimer": null,
            "ProformaInvoiceDisclaimer": null,
            "ReturnsDisclaimer": null,
            "IsGeneratePickTicketBackOrder": null,
            "IsPrintPackslipOnShip": null,
            "IsPrintTruckLoadOnSign": null,
            "OutboundProductExpiryAllowance": null,
            "InboundProductExpiryAllowance": null,
            "CartonizationProfileId": "86b1c2df-d5fb-4b87-b57e-0c3bdf69c5e9",
            "Info1": null,
            "Info2": null,
            "Info3": null,
            "Info4": null,
            "Info5": null,
            "Info6": null,
            "Info7": null,
            "Info8": null,
            "Info9": null,
            "Info10": null,
            "Id": "6ad17124-709c-4c10-8dbe-bbc283c56510",
            "DateCreated": "2022-06-10T15:37:39.2468021Z",
            "Client": {
                "Id": "ce54af79-2587-4053-8c65-b13734f4bf39",
                "Name": "01"
            },
            "CartonizationProfile": {
                "Id": "86b1c2df-d5fb-4b87-b57e-0c3bdf69c5e9",
                "Name": "General"
            }
        },
        {
            "CustomerCode": "ECOM",
            "ClientId": "91c64445-04d0-41da-a9ce-f05c0db7d4d4",
            "CompanyName": "e-comm",
            "ContactPerson": null

Use OData syntax (https://www.odata.org/documentation/) to personalize queries through API calls.

Example of OData query

https://{tenant_name}.p4warehouse.com/odata/Customer
?$expand=Client($select=Id,Name),CartonizationProfile($select=Id,Name)
&$orderby=CustomerCode&$top=20&$count=true