Skip to content

Customer Master

GET    /api/customer-master
GET    /api/customer-master/{id}
POST   /api/customer-master
PUT    /api/customer-master/{id}
DELETE /api/customer-master/{id}

Required privilege: Customer Master / View (read) ยท Customer Master / Edit (write)

The Customer Master contains all customer records. Each customer may have one or more Ship To locations (see Ship To Master).


Customer Object

{
  "id": 4,
  "Customer Number": "CUST-004",
  "Customer Name": "Beta Distributors",
  "Customer Email": "orders@betadist.com",
  "Customer Phone": "+1 555 300 0000",
  "Customer Status": "Active",
  "Customer Servicenow Id": null,
  "Ship To Locations": [
    { "id": 9, "Ship To Number": "ST-09", "Ship To Name": "Beta East Warehouse" }
  ]
}
Field Type Description
id integer Internal customer identifier
Customer Number string Unique customer reference code
Customer Name string Display name
Customer Email string | null Contact email
Customer Status string Active or Inactive
Customer Servicenow Id string | null External ServiceNow reference

POST - Create Customer

POST /api/customer-master HTTP/1.1
Content-Type: application/json
X-XSRF-TOKEN: <csrf>

{
  "Customer Number": "CUST-NEW",
  "Customer Name": "Gamma Corp",
  "Customer Status": "Active"
}

DELETE - Delete Customer

Cascade deletes all associated Ship To locations.

Error: Returns CustomerMaster.StillInUse if the customer is referenced by sales orders.


Errors

Status Code Description
400 CustomerMaster.NotFound No customer with this ID
400 CustomerMaster.AlreadyExists Customer Number already in use
400 CustomerMaster.StillInUse Customer referenced by orders
403 User.NotPrivileged Insufficient privilege