Accounts-accountId:GET

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 97)
(Parameters)
Line 32: Line 32:
 
   "accountNumber": "{accountId}",
 
   "accountNumber": "{accountId}",
 
   "createdDate": "{createdDate}",
 
   "createdDate": "{createdDate}",
 +
  "currency": "{currency}",
 
   "status": "open",
 
   "status": "open",
 
   "paymentInfo": [
 
   "paymentInfo": [
Line 75: Line 76:
 
; createdDate - ''date''
 
; createdDate - ''date''
 
: The date account was created in format Y-m-d
 
: The date account was created in format Y-m-d
 +
 +
; currency - ''string''
 +
: An ISO-4217[http://www.iso.org/iso/home/standards/currency_codes.htm] currency code assigned to the account.
  
 
; status - ''string''
 
; status - ''string''

Revision as of 07:13, 14 November 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}",
  "currency": "{currency}",
  "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
currency - string
An ISO-4217[2] currency code assigned to the account.
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


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox