Create new customer

End Point

'CreateOrUpdate' API end point is used to create new customers.

POST https://{tenant_name}.p4warehouse.com/api/CustomerApi/CreateOrUpdate

Headers

NameTypeDescription

ApiKey*

String

System API key

Request Body

NameTypeDescription

"CustomerCode"*

String

Customer number assinged by the user

{
    "$id": "1",
    "CustomerCode": "123456",
    "ClientId": null,
    "Client": null,
    "CompanyName": "Demo",
    "ContactPerson": null,
    "Email": null,
    "Phone": null,
    "TaxId": null,
    "BillToName": null,
    "BillToPhone": null,
    "BillToAddress1": null,
    "BillToAddress2": null,
    "BillToCity": null,
    "BillToStateProvince": null,
    "BillToZipPostal": null,
    "BillToCountry": null,
    "DefaultCountOnShip": null,
    "DefaultSignOnShip": null,
    "DefaultCountOnDelivery": null,
    "DefaultSignOnDelivery": null,
    "TruckLoadConsolidationGroup": null,
    "Description": "API test",
    "Logo": null,
    "PackslipDisclaimer": null,
    "ProformaInvoiceDisclaimer": null,
    "ReturnsDisclaimer": null,
    "IsGeneratePickTicketBackOrder": null,
    "IsPrintPackslipOnShip": null,
    "IsPrintTruckLoadOnSign": null,
    "OutboundProductExpiryAllowance": null,
    "InboundProductExpiryAllowance": null,
    "Addresses": [],
    "PickTickets": [],
    "CustomerReturns": [],
    "CartonizationProfileId": null,
    "CartonizationProfile": null,
    "Info1": null,
    "Info2": null,
    "Info3": null,
    "Info4": null,
    "Info5": null,
    "Info6": null,
    "Info7": null,
    "Info8": null,
    "Info9": null,
    "Info10": null,
    "Id": "f9777821-1ae4-4953-a4cf-899572da1fbb",
    "DateCreated": "2023-08-16T19:34:27.0205882+00:00",
    "TypeName": "Pro4Soft.TenantData.Entities.Business.Fulfillment.Customer",
    "TypeNameShort": "Customer"
}

Newly created vendors are assigned with 'Id' number. Use this number to further update/edit selected vendors.

JSON Example

Here is an example of a JSON payload to create new customer with customer number, description, company name, billing address, and additional information.

{
   "CustomerCode":"1234",
   "CompanyName":"C&D",
   "Description":"API Demo",
   "Info1":"Test1",
   "Info2":"Test2",
   "BillToName": "ABC icn.",
   "BillToPhone":"2123542413",
   "BillToAddress1":"1608 Queensway",
   "BillToAddress2":"12",
   "BillToCity":"Toronto",
   "BillToStateProvince":"ON",
   "BillToZipPostal":"M8Y1V2",
   "BillToCountry":"Canada"
}