CustomerLocationEdit

CustomerLocationEdit(
	array Location,
	int CustomerID
)

Add Location information for a Customer.

Request

Request Data:

  • (object) Location (required) – the location data to add
    • (int) LocationID (required) – id of the location to modify.
    • (string) Name (required) – name to identify the location, can’t be empty.
    • The rest of the information is optional.
  • (int) CustomerID (required) – identify the customer.
{
    "Location": {
        "LocationID": <int>,
        "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”
  • “Location ID not passed into call”
  • “Customer not found”
  • “Location with this name already exists for the customer”
  • “Location not found”
%d bloggers like this: