CustomerLocationAdd

CustomerLocationAdd(
	array Location,
	int CustomerID
)

Add Location information for a Customer.

Request

Request Data:

  • (object) Location (required) – the location data to add
    • (string) Name (required) – name to identify the location.
  • (int) CustomerID (required) – identify the customer.
{
    "Location": {
        "IsPrimary": <int>,
        "Name": <string>,
        "Address": <string>,
        "City": <string>,
        "StateProvince": <string>,
        "Country": <string>,
        "ZipPostalCode": <string>
    },
    "CustomerID": <int>
}

Response

{
    "Result": {
        "CustomerLocationID": <int>
    }
}

// Note, starting in RPM20 the response changed:
{
  "Result": {
    "Location": {
      "IsPrimary": <bool>,
      "LocationID": <int>,
      "Name": <string>,
      "Address": <string>,
      "City": <string>,
      "StateProvince": <string>,
      "Country": <string>,
      "ZipPostalCode": <string>
    }
  }
}

Errors

  • “A location requires a name”
  • “Customer not found”
  • “Location with this name already exists for the customer”
%d bloggers like this: