Skip to content

Orders

Account Scope Required, please include X-Auth-Account header with your Account ID.

List all orders for an account

GET /api/orders

Returned Params
  • orders: Array
    • id: String
    • status: String
    • created_at: DateTime
    • updated_at: DateTime
    • variant: String
    • product: String
    • location: String
    • account: Object
      • id: String
      • name: String

View an Order

GET /api/orders/:id

Returned Params
  • order: Object
    • id: String
    • status: String
    • created_at: DateTime
    • updated_at :DateTime
    • variant: String
    • product: String
    • location: String
    • payment_ur: String | If there is an active Checkout session, this will be the url where the user can continue to pay.
  • tasks: Array
    • id: Integer
    • status: String
  • site: Object | will be omitted if there is no site linked to this order
    • id: String
    • name: String
  • account: Object | See accounts#show
  • user: Object | See users#show

Order a new Site

POST /api/orders

If you intend to have users place an order for a site in your application, but rely on our billing system, you will want to include a return_url in your request, and setup a callback. The callback will return the task information, which you will then use to call the task api endpoint to get the site information.

Location and plan names can be found by querying the /api/about endpoint.

Params
  • site: Object
    • name: String (required)
    • variant: string (required) | vanilla,extendify,migration
    • location: String
    • plan: String
    • return_url: String | If a payment is required, this is where the user will be returned to after a payment is completed or failed. Defaults to CloudPress order status page.
  • callback: Object | optional webhook to call after event is finished
    • authorization: String | Right side of authorization header. Example: Bearer 12345 or Token 12345
    • url: String | fully qualified URL
Returned Params
  • order: Object
    • id: String | uuid
    • status: String
  • task:
    • id: Integer
    • status: String
  • payment_url: String | If a payment is required, please red
  • site: Object | Will be omitted if payment_url is present.
    • id: String
    • name: String
    • domain: String
    • ssh_data: Object
      • ipaddr: String
      • username: String
      • password: String
      • port: String

Cancel an Order

Only works if the order is in progress, such as waiting for a payment.

DELETE /api/orders/:id