For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
      • GETGet Order
      • GETGet Shipment Logs
      • POSTMark Tracking Uploaded
      • GETGet All Shipments for Order
      • GETGet Order Store Data
      • POSTEstimate Fulfillment Cost For Order
      • GETGet Orders
      • POSTCreate Order
      • POSTCancel Shipment
      • POSTCancel Shipment by Order ID and Shipment ID
      • GETGet Shipping Methods
      • POSTCancel Order
      • GETGet Shipment Logs by Order ID and Shipment ID
      • GETGet Shipment Status Timeline by Order ID and Shipment ID
      • GETGet Shipment Timeline
      • GETGet Shipment
      • POSTBatch Cancel Shipments
      • GETGet Shipment by Order ID and Shipment ID
      • PUTBulk Update Shipping Service
      • POSTUpdate Shipment Line Items
      • PUTUpdate Shipment Address
      • GETGet Shipment Line Items
      • GETGet Completely Cancelled Orders
LogoLogo
API ReferenceOrders

Cancel Order

||View as Markdown|
POST
https://sandbox-api.shipbob.com/2026-01/order/:orderId:cancel
POST
/2026-01/order/:orderId:cancel
$curl -X POST https://sandbox-api.shipbob.com/2026-01/order/1:cancel \
> -H "shipbob_channel_id: 1" \
> -H "Authorization: Bearer <token>"
1{
2 "canceled_shipment_results": [
3 {
4 "action": "Cancel",
5 "is_success": true,
6 "reason": "string",
7 "shipment_id": 0
8 }
9 ],
10 "order": {
11 "channel": {
12 "id": 0,
13 "name": "ShipBobs-Shopify-Store"
14 },
15 "created_date": "2019-08-24T14:15:22+00:00",
16 "financials": {
17 "total_price": 0.1
18 },
19 "gift_message": "string",
20 "id": 0,
21 "order_number": "string",
22 "products": [
23 {
24 "external_line_id": 0,
25 "gtin": "string",
26 "id": 0,
27 "quantity": 0,
28 "quantity_unit_of_measure_code": "string",
29 "reference_id": "TShirtBlueM",
30 "sku": "TShirtBlueM",
31 "unit_price": 0.1,
32 "upc": "string"
33 }
34 ],
35 "purchase_date": "2019-08-24T14:15:22+00:00",
36 "recipient": {
37 "address": null,
38 "name": "John Doe",
39 "email": "john@example.com",
40 "phone_number": "555-555-5555"
41 },
42 "reference_id": "string",
43 "retailer_program_data": {
44 "addresses": [
45 {
46 "address1": "100 Nowhere Blvd",
47 "city": "Gotham City",
48 "country": "US",
49 "type": "MarkFor",
50 "address2": "Suite 100",
51 "company_name": "Wayne Enterprises",
52 "state": "NJ",
53 "zip_code": "07093"
54 }
55 ],
56 "customer_ticket_number": "string",
57 "delivery_date": "2019-08-24T14:15:22+00:00",
58 "department": "string",
59 "doNotShipBeforeDate": "2019-08-24T14:15:22+00:00",
60 "mark_for_store": "string",
61 "purchase_order_number": "string",
62 "retailer_program_type": "string",
63 "shipByDate": "2019-08-24T14:15:22+00:00"
64 },
65 "shipments": [
66 {
67 "actual_fulfillment_date": "2019-08-24T14:15:22+00:00",
68 "created_date": "2019-08-24T14:15:22+00:00",
69 "delivery_date": "2019-08-24T14:15:22+00:00",
70 "estimated_fulfillment_date": "2019-08-24T14:15:22+00:00",
71 "estimated_fulfillment_date_status": "AwaitingInventoryAllocation",
72 "gift_message": "string",
73 "id": 0,
74 "insurance_value": 0,
75 "invoice_amount": 0,
76 "invoice_currency_code": "string",
77 "is_tracking_uploaded": true,
78 "last_tracking_update_at": "2019-08-24T14:15:22+00:00",
79 "last_update_at": "2019-08-24T14:15:22+00:00",
80 "location": {
81 "id": 0,
82 "name": "Cicero (IL)"
83 },
84 "measurements": {
85 "depth_in": 0,
86 "length_in": 0,
87 "total_weight_oz": 0,
88 "width_in": 0
89 },
90 "order_id": 0,
91 "package_material_type": "Unknown",
92 "parent_cartons": [
93 {
94 "barcode": "string",
95 "cartons": [
96 {
97 "barcode": "string",
98 "carton_details": [
99 {
100 "products": [
101 {
102 "id": 0,
103 "inventory_items": [
104 {
105 "expiration_date": "2019-08-24T14:15:22+00:00",
106 "id": 0,
107 "is_dangerous_goods": true,
108 "lot": "22222",
109 "name": "Medium Blue T-Shirt",
110 "quantity": 0,
111 "quantity_committed": 0,
112 "serial_numbers": [
113 "string"
114 ]
115 }
116 ],
117 "name": "Medium Blue T-Shirt",
118 "reference_id": "TShirtBlueM",
119 "sku": "TShirtBlueM"
120 }
121 ]
122 }
123 ],
124 "id": 0,
125 "measurements": {
126 "depth_in": 0.1,
127 "length_in": 0.1,
128 "total_weight_oz": 0.1,
129 "width_in": 0.1
130 },
131 "type": "Box or pallet"
132 }
133 ],
134 "measurements": {
135 "depth_in": 0.1,
136 "length_in": 0.1,
137 "total_weight_oz": 0.1,
138 "width_in": 0.1
139 },
140 "type": "Box or pallet"
141 }
142 ],
143 "products": [
144 {
145 "id": 0,
146 "inventory_items": [
147 {
148 "expiration_date": "2019-08-24T14:15:22+00:00",
149 "id": 0,
150 "is_dangerous_goods": true,
151 "lot": "22222",
152 "name": "Medium Blue T-Shirt",
153 "quantity": 0,
154 "quantity_committed": 0,
155 "serial_numbers": [
156 "string"
157 ]
158 }
159 ],
160 "name": "Medium Blue T-Shirt",
161 "reference_id": "TShirtBlueM",
162 "sku": "TShirtBlueM"
163 }
164 ],
165 "recipient": {
166 "address": null,
167 "email": "john@example.com",
168 "full_name": "John Doe",
169 "name": "John Doe",
170 "phone_number": "555-555-5555"
171 },
172 "reference_id": "string",
173 "require_signature": true,
174 "ship_option": "Standard",
175 "status": "None",
176 "status_details": [
177 {
178 "description": "string",
179 "exception_fulfillment_center_id": 0,
180 "extra_information": {
181 "validation_messages": [
182 "string"
183 ]
184 },
185 "id": 0,
186 "inventory_id": 0,
187 "name": "string"
188 }
189 ],
190 "tracking": {
191 "bol": "string",
192 "carrier": "USPS",
193 "carrier_service": "Priority",
194 "pro_number": "string",
195 "scac": "string",
196 "shipping_date": "2019-08-24T14:15:22+00:00",
197 "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC",
198 "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC"
199 }
200 }
201 ],
202 "shipping_method": "Free 2-day Shipping",
203 "shipping_terms": {
204 "carrier_type": "Parcel",
205 "payment_term": "Collect"
206 },
207 "status": "Processing",
208 "tags": [
209 {
210 "name": "Handling instructions",
211 "value": "Fragile"
212 }
213 ],
214 "type": "DTC"
215 },
216 "order_id": 0,
217 "status": "Success"
218}
Cancels an order and all associated shipments. The order must be in a cancellable state to proceed with the cancellation.
Was this page helpful?
Previous

Get Shipping Methods

Next

Get Shipment Logs by Order ID and Shipment ID

Built with

Authentication

AuthorizationBearer

Authentication using Personal Access Token (PAT) token

OR
AuthorizationBearer
OAuth2 authentication using JWT tokens

Path parameters

orderIdintegerRequired
The order ID to cancel

Headers

shipbob_channel_idintegerRequired
Channel ID for Operation

Response

Success
canceled_shipment_resultslist of objects
Results of canceling the shipments associated with the order
orderobject
order_idinteger
The ID of the canceled order
statusenum
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error