- Update an order cancellation
Updates an order cancellation with a specified ID. Use this operation to update a cancellation reason and description.
Patch cancellation resource.
ID of the canceled order.
Reason for the cancellation.
Specifies if the customer gets a pro-rata credit for the time remaining between churnTime and order next renewal time.
Date and time when the order is deactivated. If this field and churnTimePolicy are omitted, this value defaults to the current time.
Specifies when the order is to be deactivated. The churnTimePolicy takes precedence over the churnTime in request.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/order-cancellations/{id}
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/order-cancellations/{id}
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/order-cancellations/{id}
- SecretApiKey
- JWT
curl -i -X PATCH \
'https://www.rebilly.com/_mock/catalog/all/order-cancellations/{id}' \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"orderId": "sub_01HRF27SATGE4Z6PBJE6PD8328",
"canceledBy": "merchant",
"reason": "did-not-use",
"description": "string",
"prorated": false,
"status": "draft",
"churnTime": "2019-08-24T14:15:22Z",
"churnTimePolicy": null,
"lineItems": [
{
"type": "debit",
"description": "string",
"unitPriceAmount": 49.95,
"unitPriceCurrency": "USD",
"quantity": 1,
"periodStartTime": "2019-08-24T14:15:22Z",
"periodEndTime": "2019-08-24T14:15:22Z"
}
]
}'Cancellation updated.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
ID of the cancellation.
ID of the canceled order.
ID of the invoice on which the cancellation proration is calculated.
ID of the invoice on which the cancellation fees or credits are applied.
Specifies who initiated the cancellation.
Reason for the cancellation.
Specifies if the customer gets a pro-rata credit for the time remaining between churnTime and order next renewal time.
Status of the order cancellation.
| Enum Value | Description |
|---|---|
| draft | Creates a draft cancellation so that the cancellation and charge can be previewed. |
| confirmed | Confirms an order cancellation. Sets the order to cancel when the |
| completed | Marks an order cancellation as completed. This is a read-only status that is set when the |
| revoked | Revokes an order cancellation. |
Date and time when an order is canceled. By default, this occurs when status is confirmed, unless draft is specified.
Date and time when the resource is created. This value is set automatically when the resource is created.
Date and time when the resource is updated. This value is set automatically when the resource is updated.
Date and time when the order is deactivated. If this field and churnTimePolicy are omitted, this value defaults to the current time.
Specifies when the order is to be deactivated. The churnTimePolicy takes precedence over the churnTime in request.
Items to be added to the new invoice. Proration item is generated and added automatically.
{ "id": "sub_cnl_0YVJ5XVQM9CDP8248ZQX0RDMKV", "orderId": "sub_01HRF27SATGE4Z6PBJE6PD8328", "proratedInvoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "appliedInvoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "canceledBy": "merchant", "reason": "did-not-use", "description": "string", "prorated": false, "status": "draft", "canceledTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "churnTime": "2019-08-24T14:15:22Z", "churnTimePolicy": null, "lineItems": [ { … } ], "lineItemSubtotal": { "amount": 49.95, "currency": "USD" }, "_links": [ { … } ] }