Cancels
A Cancellation (or 'cancels' for short) represents a request to cancel all or part of a purchase order. Cancellations may only be requested by retailers prior to the vendor acknowledging the order.
Operations
Click on an Operation to view requirements, options, & examples.
POST | /v1/retailers/{retailer_id}/cancels/ | Create a new cancel |
---|---|---|
GET | /v1/retailers/{retailer_id}/cancels/ | Get a list of cancels |
GET | /v1/retailers/{retailer_id}/cancels/{id}/ | Get a single cancel |
PUT | /v1/retailers/{retailer_id}/cancels/{id}/acknowledge/ | Acknowledge receipt |
Cancel Properties
Name | Description |
---|---|
id integer (11) |
A static id assigned by RevCascade. Can be used as the primary key in the url of other Cancel endpoints. |
order_id integer (11) |
The RevCascade Order ID to which the cancellation applies. |
reason string (256) |
The reason why all (or part) of the order is being canceled. Examples:
|
canceled_at ISO-8601 Datetime |
The date & time when the cancellation was received by RevCascade. |
acknowledged_at ISO-8601 Datetime |
The date & time when the cancellation was acknowledged by the retailer. |
cancel_lines array of objects |
An array or cancellation line items. "cancel_lines": [{ "id": "10000", "variant": { "id": "100084", "brand": { "id": "501", "name": "Marla Cielo", }, "name": "Contemporary Nightstand", "description": "Black" "identifier": "1234", "upc": "123456789456", "attributes": [{ // subset of attributes omitted for brevity }] }, "quantity": 1, }] id - RevCascade's static identifier for the Order Line. variant - The exact item that is being canceled. quantity - The number of items being canceled. |
Operation Details & Examples
POST | /v1/retailers/{retailer_id}/cancels/ | Create a new Cancel |
---|
Input Parameters - All fields required unless otherwise marked. | |
order_id integer (11) |
The RevCascade Order ID. |
reason_id integer (11) |
The id of the reason why all (or part) of the order is being canceled.
|
cancel_lines array of objects |
An array of objects representing the items that are in the cancellation request. Please send one Cancel Line per unique item. "cancel_lines": [{ "variant": { "id": 1000065, "identifier": "GBD34315", "upc": "123456789012", } "quantity": 1 }] variant - an object that identifies the exact item that sold.
quantity - The number of items to be canceled. Please note: Either an 'id', 'identifier', or a 'upc' is required in the variant object when creating a cancel line. However, if multiple are passed, the priority is: id > identifier > upc. |
GET | /v1/retailers/cancels/ | Get a list of Cancellations |
---|
Optional Query String Parameters | |
is_acknowledged boolean |
Boolean filter that returns orders based on whether or not they have been acknowleged.
1 - show only only cancellations that have been acknowledged. 0 - show cancellations that have not been acknowledged. |
canceled_at_{operator} timestamp |
Filter cancellations received by RevCascade before or after an epoch timestamp in UTC.
Please substitute {operator} with "lt" (less than),"lte" (less than or equal), "gt" (greater than), or "gte" (greater than or equal). |
limit integer (3) |
Customize the number of results return (max 250). Requests that return more records than the limit will be paginated. |
Get all new cancellations that have been not yet been acknowledged. GET https://api.revcascade.com/v1/retailers/500/cancels/?is_acknowledged=0 |
GET | /v1/retailers/{retailer_id}/cancels/{id}/ | Get a single Cancel |
---|
Get a single cancellation by its ID. GET https://api.revcascade.com/v1/retailers/500/cancels/123645/ |
PUT | /v1/retailers/{retailer_id}/cancels/{id}/acknowledge/ | Acknowledge receipt |
---|
Acknowledge receipt of a new cancel GET https://api.revcascade.com/v1/retailers/500/cancels/123645/acknowledge/ |