DeluxHostAPI Reference
Orders & renewals

Request a service cancellation

POST
/v1/orders/{id}/cancel

Requires confirm: true. Inspect the resource before retrying an uncertain outcome. Requires Idempotency-Key. Use the same key and payload to replay a completed response. A 409 for a pending or failed attempt requires checking the resource; a new key could duplicate a charge or purchase.

Authorization

apiToken orders:cancel
headerAuthorizationBearer <token>

A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.

Scope: orders:cancel

Path Parameters

id*number

Header Parameters

Idempotency-Key*string

Unique per account and operation. Reuse only for an identical request. Completed requests replay the encrypted stored response; pending or failed attempts return 409 and are never automatically rerun.

Length1 <= length <= 128

Request Body

application/json
  1. body
type*string|string
reason?string
confirm*boolean

Response Body

Operation completed or accepted; asynchronous actions may still be running.

application/json
  1. response
id*number
orderNumber*number
productId*number
productSlug?string
productName?string
productType?string
projectId?null|string
label?null|string
cycle*string
status*string
priceCents*number
setupFeeCents*number
nextDueAt*string
Formatdate-time
provisioningStatus*string
provisioningModule?string
rebuildRequired?boolean
vfServerId?number
suspendReason?null|string
suspendedAt?null|string
autoCharge*boolean
cancelType?null|string
cancelRequestedAt?null|string
pendingCycle?null|string
pendingCyclePriceCents?null|number
extraIpv4Count*number
extraIpv4MonthlyCents*null|number
renewalPromotionEligible?boolean
renewalPromotionEndsAt?string
renewalPromotionTotalCents?number
renewalPromotionOriginalCents?number
prepayEnabled?boolean
prepayEligible?boolean
prepayNextDueAt?string
Formatdate-time
createdAt*string
Formatdate-time
curl -X POST 'https://api.deluxhost.net/v1/orders/0/cancel' \  -H "Authorization: Bearer $DELUXHOST_TOKEN" \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "type": "immediate",  "confirm": true}'
Example Response
{  "id": 0,  "orderNumber": 0,  "productId": 0,  "productSlug": "string",  "productName": "string",  "productType": "string",  "projectId": null,  "label": null,  "cycle": "string",  "status": "string",  "priceCents": 0,  "setupFeeCents": 0,  "nextDueAt": "2019-08-24T14:15:22Z",  "provisioningStatus": "string",  "provisioningModule": "string",  "rebuildRequired": true,  "vfServerId": 0,  "suspendReason": null,  "suspendedAt": null,  "autoCharge": true,  "cancelType": null,  "cancelRequestedAt": null,  "pendingCycle": null,  "pendingCyclePriceCents": null,  "extraIpv4Count": 0,  "extraIpv4MonthlyCents": null,  "renewalPromotionEligible": true,  "renewalPromotionEndsAt": "string",  "renewalPromotionTotalCents": 0,  "renewalPromotionOriginalCents": 0,  "prepayEnabled": true,  "prepayEligible": true,  "prepayNextDueAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z"}