Accounts-accountId-products-productId-services-serviceId-action:GET
From Hostway API Documentation
POST /accounts/{accountId}/products/{productId}/services/{serviceId}/action
Upgrades/downgrades existing service.
Contents |
Request
POST /accounts/{accountId}/products/{productId}/services/{serviceId}/action
Parameters
- accountId - string
- The Id of the account.
- productId - string
- The Id of the product.
- serviceId - string
- The Id of the service.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Request Body
{ "action": "change", "actionData": { "targetServiceSpecification": "https://api.hostway.com/serviceSpecifications/{serviceSpecificationId}" } }
Parameters
- action - string
- The type of the requested action. Currently supported actions:
- cost - show the available fees for PTC change
- validate - validate if the service specification change is allowed
- change - change the service specification (upgrade/downgrade).
- actionData - dictionary
- Contains action-specific data.
- validate action:
- targetServiceSpecification - the URI of the new service specification.
- change action:
- targetServiceSpecification - the URI of the new service specification.
- validate action:
Response
- Response for getting the fees
{ "links": [{ "href": "http://api.hostway.com/accounts/{accountId}/products/{productId}/services/{serviceId}/action/", "rel": "self" }], "oneTimeFee": { "currency": "USD", "amount": "9.95" }, "taxes": { "amount": "0" }, "total": { "currency": "USD", "amount": "19.90" }, "subTotal": { "currency": "USD", "amount": "19.90" } }
- Response for the validation
{ "links": [{ "href": "http://api.hostway.com/accounts/{accountId}/products/{productId}/services/{serviceId}/action/", "rel": "self" }], "allowed": 1 }
Status Code
- 200 No Content
- The service update was successfully validated.
- 204 No Content
- The service update was successfully submitted.
- 400 Bad Request
- Request body is invalid.
- 401 Unauthorized
- The authorization credentials were not supplied or are invalid.
- 404 Not Found
- The account, product Id or service Id not found.
Response Body
None.
See also