CustomerAdd

CustomerAdd(
    object Customer
)

Add a Customer.

  • The customer name is required and must be unique.
  • All other fields are optional, except a contact name which is required.
  • On Error, no data will be saved.

Request

Request Data:

  • The customer object contains all the information.
    • (string) Name (required and unique) – Set the Customer Name.
    • (object) PrimaryContact (required)
      • (string) FirstName (required)
      • (string) LastName (required)
{
    "Key": <string>,
    "Customer": {
        "Address": <string>,
        "AliasAdd": <string>,
        "City": <string>,
        "Country": <string>,
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            }, <more fields>
        ],
        "Name": <string>,
        "PrimaryContact": {
            "Email": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "PhoneBusiness": {
                "Number": <string>
            },
            "PhoneFax": {
                "Number": <string>
            },
            "PhoneHome": {
                "Number": <string>
            },
            "PhoneOther": {
                "Number": <string>
            },
            "Salutation": <string>,
            "Title": <string>
        },
        "StateProvince": <string>,
        "Website": <string>,
        "ZipPostalCode": <string>
    }
}

Response

Same structure as api/Customer

Errors

  • “A customer name is required”
  • “A unique customer name is required”
%d bloggers like this: