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": {
        "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”
  • “Customer not found”
  • “Location with this name already exists for the customer”