Accounts-accountId-Contacts:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 90) |
|||
Line 19: | Line 19: | ||
=== Status Code === | === Status Code === | ||
− | ;200 OK | + | ; 200 OK |
: Success | : Success | ||
− | ;404 Not Found | + | ; 401 Unauthorized |
+ | : The request was sent without an ''Authorization'' header, or the user represented by the value of this header was not properly authenticated. | ||
+ | |||
+ | ; 403 Forbidden | ||
+ | : The user authenticated for this request is not allowed to access the resource. | ||
+ | |||
+ | ; 404 Not Found | ||
: The specified account Id does not exist or is purged. | : The specified account Id does not exist or is purged. | ||
Line 30: | Line 36: | ||
"regular": { | "regular": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "Widget Corp.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 47: | Line 54: | ||
"billing": { | "billing": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "Widget Corp.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 64: | Line 72: | ||
"administrator": { | "administrator": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "Widget Corp.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 81: | Line 90: | ||
"technical": { | "technical": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "Widget Corp.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 115: | Line 125: | ||
"regular": { | "regular": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "TestCo, Inc.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 132: | Line 143: | ||
"billing": { | "billing": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "TestCo, Inc.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 149: | Line 161: | ||
"administrator": { | "administrator": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "TestCo, Inc.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", | ||
Line 166: | Line 179: | ||
"technical": { | "technical": { | ||
"city": "Chicago", | "city": "Chicago", | ||
+ | "company": "TestCo, Inc.", | ||
"countryCode": "US", | "countryCode": "US", | ||
"email1": "test@test.com", | "email1": "test@test.com", |
Revision as of 14:12, 9 April 2014
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
- 401 Unauthorized
- The request was sent without an Authorization header, or the user represented by the value of this header was not properly authenticated.
- 403 Forbidden
- The user authenticated for this request is not allowed to access the resource.
- 404 Not Found
- The specified account Id does not exist or is purged.
Response Body
{ "regular": { "city": "Chicago", "company": "Widget Corp.", "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", "company": "Widget Corp.", "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", "company": "Widget Corp.", "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", "company": "Widget Corp.", "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", "company": "TestCo, Inc.", "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", "company": "TestCo, Inc.", "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", "company": "TestCo, Inc.", "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", "company": "TestCo, Inc.", "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