Order
Order
Order
is the entity that handles purchasing of our service plans.
Endpoints Summary
ENDPOINT (CLICK TO READ FULL SPECIFICATION) | METHOD | DESCRIPTION |
---|---|---|
| places an order. | |
| add a cart item. returns the cart item id. Carts items can be added to orders to place | |
| deletes the specified cart item | |
| Places a Change order, which is for adding add ons to existing subscriptions. | |
| Calcuates the change order total before placing the change order. Also check if the change order can be placed. This api call does not actually place a change order. |
Create Order
Request: POST /order
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| (requiried) account id referred to in format of XX-11111111 |
|
| currency of order. only required if account has no currency set . The currency is set when there is a first order placed in your account and cannot be changed. If the account currency is already set, this field is ignored. |
|
| label of cloud server |
|
| array of cart items id, obtained from POST /order/add-to-cart api |
|
| currently, only credit cart payment is accepted, therefore the value of this parameter is |
Create Cart Item
Request: POST /order/add-to-cart
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| (requiried) 1: monthly, 3: quarterly, 12: annually |
|
| plan id. Refer to here for available IDs. |
|
| currrently only |
|
| the quantity of this item to add to cart |
|
| optional "addons":[0: {id: 6, additional_value: 1}] . Refer to here for available IDs. |
|
| password of Cloud Server if the |
|
| os template id for cloud servers. this field is not required for other plan types. Refer to this link for os template ids. |
|
| base64 encoded string of ssh key. Only default linux templates supports custom_ssh_key. Windows and custom templates do not support ssh keys. |
|
| base64 encoded string of custom script to run at provisioning time. Only default linux templates supports custom scripts. Windows and custom templates do not support custom scripts. |
Sample Response:
Delete Cart Item
Request: DELETE /order/cartItems/delete/{cart_item_id}
where cart_item_id
is the cart item id (obtained from POST /order/add-to-cart api) to be deleted.
Change Order
Request: POST /order/changeorder
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| subscription id |
|
| Key-value array {resource_name: resource->name, delta_value: value} format. Available resources are |
Sample Payload:
Change Order Total
Request: PUT /order/changeorder/total
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| subscription id |
|
| Key-value array {resource_name: resource->name, delta_value: value} format. Available resources are |
The payload is the same as Change Order API above.
Sample Response:
Switch Order
Request: PUT /order/switch/{subscription_id}
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| target plan's id. this plan need to have the same type as current plan |
Sample Response:
Switch Order Total
Request: PUT /order/switch/total
NAME | TYPE | DESCRIPTION |
---|---|---|
|
| subscription id |
|
| target plan's id. this plan need to have the same type as current plan |
Sample Response:
Last updated