Accounts-accountId-action:POST
From Hostway API Documentation
Revision as of 13:33, 30 May 2016 by Corinne.chui (Talk | contribs)
POST /accounts/{accountId}/action
Initiate an action on an account
Contents |
Request
POST /accounts/{accountId}/action
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.
Request Body
{ "action": "{action}", "actionData": {actionData} }
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.
Response
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.
Response Body
None
Examples
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
See also