Accounts-accountId-action:POST

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "= POST /accounts/''{accountId}''/action = Initiate an action on an account __TOC__ == Request == <code>POST /accounts/''{accountId}''/action</code> ==== Parameters ==== ; acc...")
 
m (1 revision)
 

Latest revision as of 14:33, 30 May 2016

[edit] POST /accounts/{accountId}/action

Initiate an action on an account

Contents

[edit] Request

POST /accounts/{accountId}/action

[edit] Parameters

accountId - string
The Id of the account.

[edit] URI Parameters

None.

[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

[edit] Request Body

{
  "action": "{action}",
  "actionData": {actionData}
}
 

[edit] Parameters

action - string
The action that should be performed. Allowed values are:
interFranchiseMigration - Submits a request to migrate this account to another franchise.
actionData - dictionary
Optional. Reserved for data specific for the requested action.

[edit] Response

[edit] Status Code

202 Accepted
The request has been successfully initiated. Check the action status for future updates.
400 Bad Request
The request body is not formatted correctly, is missing a required field, or contains an invalid value.
403 Forbidden
Forbidden access to users that are not authorized for such access.
404 Not Found
The account Id was not found.
409 Conflict
An action has already been submitted for this account and is in progress.

[edit] Response Body

None

[edit] Examples

[edit] Migrate an account to franchise "franchise-2" and set the new partner account Id to "partner1"

Request

POST {{APIBaseURL}}/accounts/account123/action
Content-Type:application/json; Charset=UTF-8

{
  action: "interFranchiseMigration",
  actionData: {
    franchise: "franchise-2",
    partnerAccountId: "partner1"
  }
}
 

Response

HTTP/1.1 202 Accepted
 


[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox