Accounts-accountId:GET
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 91) |
Mike.robski (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 31: | Line 31: | ||
{ | { | ||
"accountNumber": "{accountId}", | "accountNumber": "{accountId}", | ||
− | " | + | "createdDate": "{createdDate}", |
"status": "open", | "status": "open", | ||
+ | "paymentInfo": [ | ||
+ | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/paymentInfo", "rel": "related"} | ||
+ | ], | ||
"products": [ | "products": [ | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/products", "rel": "related"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/products", "rel": "related"} | ||
Line 57: | Line 60: | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/flexcloud", "rel": "related"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/flexcloud", "rel": "related"} | ||
], | ], | ||
− | " | + | "users": [ |
− | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/ | + | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{account-number}/users", "rel": "related"} |
], | ], | ||
"links": [ | "links": [ | ||
Line 75: | Line 78: | ||
; status - ''string'' | ; status - ''string'' | ||
: status of the account. Valid values are '''open''', '''closed''' or '''suspended'''. Accounts with certain status may not be accessible by regular users. | : status of the account. Valid values are '''open''', '''closed''' or '''suspended'''. Accounts with certain status may not be accessible by regular users. | ||
+ | |||
+ | ; paymentInfo - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource of the payment instruments associated with the account. | ||
+ | |||
+ | ; users - ''list'' | ||
+ | : ''(OPTIONAL)'' | ||
+ | : [[Hypermedia]] to a resource of the users associated with the account. | ||
; products - ''list'' | ; products - ''list'' |
Revision as of 22:29, 13 August 2014
GET /accounts/{accountId}
Get details about an account.
Contents |
Request
GET /accounts/{accountId}
Parameters
- accountId - string
- The Id of the account.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success.
- 403 Forbidden
- Forbidden access to closed and suspended accounts by a user not authorized for such access.
- 404 Not Found
- The account Id was not found.
Response Body
{ "accountNumber": "{accountId}", "createdDate": "{createdDate}", "status": "open", "paymentInfo": [ {"href": "https://api.hostway.com/accounts/{account-number}/paymentInfo", "rel": "related"} ], "products": [ {"href": "https://api.hostway.com/accounts/{account-number}/products", "rel": "related"} ], "exchange": [ {"href": "https://api.hostway.com/accounts/{account-number}/exchange", "rel": "related"} ], "dedicatedServers": [ {"href": "https://api.hostway.com/accounts/{account-number}/dedicatedServers", "rel": "related"} ], "contacts": [ {"href": "https://api.hostway.com/accounts/{account-number}/contacts", "rel": "related"} ], "email": [ {"href": "https://api.hostway.com/accounts/{account-number}/email", "rel": "related"} ], "domains": [ {"href": "https://api.hostway.com/accounts/{account-number}/domains", "rel": "related"} ], "attributes": [ {"href": "https://api.hostway.com/accounts/{account-number}/attributes", "rel": "related"} ], "flexcloud": [ {"href": "https://api.hostway.com/accounts/{account-number}/flexcloud", "rel": "related"} ], "users": [ {"href": "https://api.hostway.com/accounts/{account-number}/users", "rel": "related"} ], "links": [ {"href": "https://api.hostway.com/accounts/{account-number}/", "rel": "self"} ] }
Parameters
- accountNumber - string
- The Id of the account
- createdDate - date
- The date account was created in format Y-m-d
- status - string
- status of the account. Valid values are open, closed or suspended. Accounts with certain status may not be accessible by regular users.
- paymentInfo - list
- (OPTIONAL)
- Hypermedia to a resource of the payment instruments associated with the account.
- users - list
- (OPTIONAL)
- Hypermedia to a resource of the users associated with the account.
- products - list
- (OPTIONAL)
- Hypermedia to a resource containing all the products of the account. This value will appear depending on the user's access rights.
- dedicatedServers - list
- (OPTIONAL)
- Hypermedia to a resource containing all the dedicated server products of the account.
- exchange - list
- (OPTIONAL)
- Hypermedia to a resource containing all the Exchange domains of the account.
- contacts - list
- (OPTIONAL)
- Hypermedia to a resource handling the contact details of the account.
- email - list
- (OPTIONAL)
- Hypermedia to a resource containing all the email domains of the account.
- domains - list
- (OPTIONAL)
- Hypermedia linking to the domain name management of the account.
- attributes - list
- (OPTIONAL)
- Hypermedia to a partner attributes of the account.
- flexcloud - list
- (OPTIONAL)
- Hypermedia to the Flexcloud management of the account.
- links - list
- Hypermedia for this resource. Links to self.
Conditional Hypermedia
Hypermedia fields marked as optional will appear on the basis of the accessing user's permissions.
Alternative with partner Id
As an alternative to using the account Id the client can use a partner-specific Id set via the account attribute partner_account_id. The response to this request is the same as the response to a request using the account Id.
GET /partnerAccounts/{partnerAccountId}
Parameters
- partnerAccountId - string
- Partner account Id set via the partner_account_id attribute.
See also