Customer

Customer(
	string Customer,
	int CustomerID,
	bool IncludeLocations = true // Since RPM31
)

Get customer information.

Request

Request Data:

  • (string) Customer (optional)
  • (int) CustomerID (optional) – if provided, Customer will be ignored.
  • (bool) IncludeLocations (optional, default: true) – if false, the Locations list will not be returned at all. Available as a performance improvement.
{
    "Customer": <string>,
    "CustomerID": <int>
}

Response

{
    "Result": {
        "Accounts": [
            {
                "Account": <string>,
                "AccountID": <int>,
                "Supplier": <string>,
                "SupplierID": <int>
            },
            <more accounts>
        ],
        "Added": <Date>,
        "Aliases": [],
        "Contacts": [
            {
                "Contact": {
                    "ContactID": <int>,
                    "Email": <string>,
                    "FirstName": <string>,
                    "LastName": <string>,
                    "PhoneNumbers": [
                        {
                            "Number": <string>,
                            "PhoneNumberID": <int>,
                            "Type": <Type>
                        },
                        <more Phone Numbers>
                    ],
                    "Salutation": <string>,
                    "Title": <string>
                },
                "IsPrimary": <bool>
            }
        ],
        "CustomerID": <int>,
        "DefaultRepID": <int>, // Since RPM28
        "DefaultRep": <string>, // Since RPM28
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            },
            <more custom fields>
        ],
        "Locations": [ // Suppressed if IncludeLocations  is false (Since RPM31)
            {
                "Address": <Date>,
                "City": <string>,
                "Country": <string>,
                "IsPrimary": <bool>,
                "LocationID": <int>,
                "Name": <string>,
                "StateProvince": <string>,
                "ZipPostalCode": <string>,
                "Added": <datetime>,
                "Modified": <datetime>,
                "Fields": [ // Since RPM28
                    {
                        "Field": <string>,
                        "Value": <string>
                    },
                    <more basic fields>
                ]
            }
        ],
        "Modified": <string>,
        "Name": <string>,
        "Notes": [],
        "NotesForStaff": [],
        "Website": <string>
    }
}

Errors

  • “Customer not found”