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": {
        "Location": {
            "IsPrimary": <bool>,
            "LocationID": <int>,
            "Name": <string>,
            "Address": <string>,
            "City": <string>,
            "StateProvince": <string>,
            "Country": <string>,
            "ZipPostalCode": <string>,
            "Fields": [ // Since RPM 29 (29.0.2405)
                {
                "Field": <string>,
                "Uid": <string>,
                "Format": <int>,
                "Value": ""
                } // ... More custom fields
            ]
        }
    }
}

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”