Get Customer Details

Description

Returns the details for a given customer. Users can view detailed information for any customers to which they have access. In general, account users can view all customers within their account. However, users in an account group can view the customers associated with every account in the group, while users in a customer group can view only the customers in the group.

Resource URL

GET rws/api/v{apiVersion}/customers/{customerId}

Request Parameters

Request Parameter and Description
Parameter Description
apiVersion

The version number for this API. The current version for all functions is 1.

customerId The identification number of the customer.

Response Parameters

Return Values and Descriptions
Return Value Description
name The name of the customer.
accountName

The name of the account to which the customer belongs.

securityQuestion The security question.
securityAnswer The answer to the security question.
shipToBillAddress If true, the customer's billing address is the same as the shipping address.
contacts An array of contacts. See the Contacts table below.
billingAddress See the Address table below.
shippingAddress See the Address table below.
customerId The identification number of the customer.

Contacts Parameters

The function returns an array of up to four contacts.

Return Values and Descriptions
Return Value Description
name

The name of the customer contact.

title The title of the customer contact.
phone The phone number of the customer contact.
mobile The mobile phone number of the customer contact.
email The email address of the customer contact.

Address Parameters

The shipping and billing address use the same response parameters.

Return Values and Descriptions
Return Value Description
addressLine1 The first line of the address.
addressLine2 The second line of the address.
city The city.
state The region, for example, state or province.
country The country.
postalCode Postal code.

Request Example

Make sure to use your own user credentials. See Authentication for information about creating an authorization header.

markup
Copycurl -X GET --header "Accept: application/json" --header "Authorization: Basic <YOUR-ENCRYPTED-CREDENTIALS>" "https://rws-jpotest.jasper.com/rws/api/v1/customers/10008314"

Response Example

markup
Copy{
   "name": "Acme Corporation",
   "accountName": "QASPAWT_Act003",
   "securityQuestion": null,
   "securityAnswer": null,
   "shipToBillAddress": true,
   "contacts": [
      {
      "name": "Jules Bron",
      "title": "Director",
      "phone": "323-948-2312",
      "mobile": "408-796-9432",
      "email": "julesbron@acme.com"
      }
   ],
   "billingAddress": {
      "addressLine1": "123 Main Street",
      "addressLine2": null,
      "city": "Buckley",
      "state": "Tennessee",
      "country": "United States",
      "postalCode": "42308"
      },
   "shippingAddress": {
      "addressLine1": "123 Main Street",
      "addressLine2": null,
      "city": "Buckley",
      "state": "Tennessee",
      "country": "United States",
      "postalCode": "42308"
   },
   "customerId": 100021774
 }

Errors

Error Codes, HTTP Codes, and Descriptions
Error Code HTTP Code Error Message
10000024 400 Invalid apiVersion.
10000603 400 Invalid account. Account erasure request is in progress for the account.
10000604 400 Invalid Customer Id.
10000605 404 Customer not found with given Id.