Accounts-accountId-Contacts:GET
(Difference between revisions)
				
																
				
				
								
				| Mike.robski  (Talk | contribs) m (1 revision) | |||
| Line 40: | Line 40: | ||
|      "phone2": "", |      "phone2": "", | ||
|      "postalCode": "60001", |      "postalCode": "60001", | ||
| + |     "salutation": "Mr.", | ||
|      "stateOrProvince": "IL", |      "stateOrProvince": "IL", | ||
|      "street1": "100 Main St.", |      "street1": "100 Main St.", | ||
| Line 56: | Line 57: | ||
|      "phone2": "", |      "phone2": "", | ||
|      "postalCode": "60001", |      "postalCode": "60001", | ||
| + |     "salutation": "Mr.", | ||
|      "stateOrProvince": "IL", |      "stateOrProvince": "IL", | ||
|      "street1": "100 Main St.", |      "street1": "100 Main St.", | ||
| Line 72: | Line 74: | ||
|      "phone2": "", |      "phone2": "", | ||
|      "postalCode": "60001", |      "postalCode": "60001", | ||
| + |     "salutation": "Mr.", | ||
|      "stateOrProvince": "IL", |      "stateOrProvince": "IL", | ||
|      "street1": "100 Main St.", |      "street1": "100 Main St.", | ||
| Line 88: | Line 91: | ||
|      "phone2": "", |      "phone2": "", | ||
|      "postalCode": "60001", |      "postalCode": "60001", | ||
| + |     "salutation": "Mr.", | ||
|      "stateOrProvince": "IL", |      "stateOrProvince": "IL", | ||
|      "street1": "100 Main St.", |      "street1": "100 Main St.", | ||
| Line 108: | Line 112: | ||
| 200 OK | 200 OK | ||
| − | + | { | |
| − | + |   "regular": { | |
| − | + |     "city": "Chicago", | |
| − | + |     "countryCode": "US", | |
| − | + |     "email1": "test@test.com", | |
| − | + |     "email2": "", | |
| − | + |     "fax": "", | |
| − | + |     "firstName": "John", | |
| − | + |     "lastName": "Smith", | |
| − | + |     "middleName": "", | |
| − | + |     "phone1": "555-555-5501", | |
| − | + |     "phone2": "", | |
| − | + |     "postalCode": "60001", | |
| − | + |     "salutation": "Mr.", | |
| − | + |     "stateOrProvince": "IL", | |
| − | + |     "street1": "100 Main St.", | |
| − | + |     "street2": "" | |
| − | + |   }, | |
| − | + |   "billing": { | |
| − | + |     "city": "Chicago", | |
| − | + |     "countryCode": "US", | |
| − | + |     "email1": "test@test.com", | |
| − | + |     "email2": "", | |
| − | + |     "fax": "", | |
| − | + |     "firstName": "John", | |
| − | + |     "lastName": "Smith", | |
| − | + |     "middleName": "", | |
| − | + |     "phone1": "555-555-5501", | |
| − | + |     "phone2": "", | |
| − | + |     "postalCode": "60001", | |
| − | + |     "salutation": "Mr.", | |
| − | + |     "stateOrProvince": "IL", | |
| − | + |     "street1": "100 Main St.", | |
| − | + |     "street2": "" | |
| − | + |   }, | |
| − | + |   "administrator": { | |
| − | + |     "city": "Chicago", | |
| − | + |     "countryCode": "US", | |
| − | + |     "email1": "test@test.com", | |
| − | + |     "email2": "", | |
| − | + |     "fax": "", | |
| − | + |     "firstName": "John", | |
| − | + |     "lastName": "Smith", | |
| − | + |     "middleName": "", | |
| − | + |     "phone1": "555-555-5501", | |
| − | + |     "phone2": "", | |
| − | + |     "postalCode": "60001", | |
| − | + |     "salutation": "Mr.", | |
| − | + |     "stateOrProvince": "IL", | |
| − | + |     "street1": "100 Main St.", | |
| − | + |     "street2": "" | |
| − | + |   }, | |
| − | + |   "technical": { | |
| − | + |     "city": "Chicago", | |
| − | + |     "countryCode": "US", | |
| − | + |     "email1": "test@test.com", | |
| − | + |     "email2": "", | |
| − | + |     "fax": "", | |
| − | + |     "firstName": "John", | |
| − | + |     "lastName": "Smith", | |
| − | + |     "middleName": "", | |
| − | + |     "phone1": "555-555-5501", | |
| − | + |     "phone2": "", | |
| − | + |     "postalCode": "60001", | |
| − | + |     "salutation": "Mr.", | |
| − | + |     "stateOrProvince": "IL", | |
| − | + |     "street1": "100 Main St.", | |
| − | + |     "street2": "" | |
| − | + |   } | |
| − | + | } | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|   </nowiki> |   </nowiki> | ||
Revision as of 09:11, 4 December 2013
GET /accounts/{accountId}/contacts
Get contact details for an account.
| Contents | 
Request
GET /accounts/{accountId}/contacts
Request Parameters
- accountId - string
- The unique account Id.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success
- 404 Not Found
- The specified account Id does not exist or is purged.
Response Body
{
  "regular": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "billing": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "administrator": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "technical": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  }
}
 
Examples
Successful Request
Request
GET /accounts/{accountId}/contacts
Authorization: Basic {Base64-encoded username & password string}
 
Response
200 OK
{
  "regular": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "billing": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "administrator": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  },
  "technical": {
    "city": "Chicago",
    "countryCode": "US",
    "email1": "test@test.com",
    "email2": "",
    "fax": "",
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "",
    "phone1": "555-555-5501",
    "phone2": "",
    "postalCode": "60001",
    "salutation": "Mr.",
    "stateOrProvince": "IL",
    "street1": "100 Main St.",
    "street2": ""
  }
}
 
Request for non-existent account Id
Request
GET /accounts/{fake_account_number}/contacts
Authorization: Basic {Base64-encoded username & password string}
 
Response
404 Not Found
{
   "itemNotFound": {
      "message": "/accounts/fake-account-id/contacts", 
      "code": 404, 
      "details": ""
   }
}
 
See also
