Orders-orderId-account-contactInfo-contactType:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 98) |
Revision as of 08:51, 15 September 2014
GET /orders/{orderId}/account/contactInfo/{contactType}
Get specific contact type details for an account in a given order.
Contents |
Request
GET /orders/{orderId}/account/contactInfo/{contactType}
Request Parameters
- orderId - string
- The unique order Id. The URI of the order is returned by the POST /orders call.
- contact_type - string
- Contact Type (regular, billing, administrative or technical)
URI Parameters
None.
Request Headers
- Cookie
- A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.
Response
Status Code
Status Code | Error Message | Description |
---|---|---|
200 OK | - | The operation was successfully completed. |
404 Not Found | Resource not found | The specified order does not exist. |
An account was not set for the order. | ||
The order does not have contact info of this type. | ||
502 Bad Gateway | - | Unexpected backend response. Cannot retrieve contact info. |
Response Body
{ "contactInfo": { "name": { "salutation": "{salutation}", "firstName": "{firstname}", "middleName": "{middleName}", "lastName": "{lastName}", "company": "{company}" }, "address": { "street1": "{street1}", "street2": "{street2}", "city": "{city}", "stateOrProvince": "{stateOrProvince}", "postalCode": "{postalCode}", "countryCode": "{countryCode}" }, "contactMedia": { "phone1": "{phone1}", "phone2": "{phone2}", "fax": "{fax}", "email1": "{email1}", "email1Format": "{html|text}", "email2": "{email2}", "email2Format": "{html|text}" } }, "links": [ {"href": "https://api.hostway.com/orders/{orderId}/account/contactInfo/{contactType}/", "rel": "self"}]} ] }
Parameters
- salutation
- Contact's salutation
- firstName
- Contact's first name.
- middleName
- Contact's middle name (optional).
- lastName
- Contact's last name.
- company
- Contact's company name (optional).
- street1
- Contact's street address.
- street2
- Contact's street address second line (optional).
- city
- Contact's city.
- stateOrProvince
- Contact's state or province.
- postalCode
- Contact's postal or ZIP code.
- country
- Contact's country code per ISO 3166-1 alpha-2[1].
- phone1
- Contact's primary phone number in ITU-T E.164[2] format.
- phone2
- Contact's secondary phone number in ITU-T E.164[3] format (optional).
- fax
- Contact's fax number in ITU-T E.164[4] format (optional).
- email1
- Contact's primary e-mail address.
- email1Format
- Primary e-mail delivery format: html or text.
- email2
- Contact's secondary e-mail address (optional).
- email2Format
- Secondary e-mail delivery format: html or text (optional).
- links - list
- Hypermedia for this resource.
Example
Get contact info of unset contact type
Request
GET /orders/{orderId}/account/contactInfo/billing Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "3f8d5d31-3986-4075-8a13-5fe3e20a2be4", "message": "Resource not found", "code": 404, "details": "" } }
Accout has not been set
Request
GET /orders/{orderId}/account/contactInfo/billing Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "3f8d5d31-3986-4075-8a13-5fe3e20a2be4", "message": "Resource not found", "code": 404, "details": "" } }
Order does not exist
Request
GET /orders/{non-existent_orderId}/account/contactInfo/billing Cookie: OwnerId={owner_id}; Path=/
Response
404 Not Found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "80d5e49e-0795-4209-a929-1ee051e0f252", "message": "Resource not found", "code": 404, "details": "" } }
See also