# Cancel Return Order POST https://api.shipbob.com/2025-07/return/{id}:cancel Reference: https://developer.shipbob.com/api/returns/cancel-return-order ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: api-2025-07 version: 1.0.0 paths: /2025-07/return/{id}:cancel: post: operationId: cancel-return-order summary: | Cancel Return Order tags: - subpackage_returns parameters: - name: id in: path description: | Id of the return order required: true schema: type: string format: int32 - name: Authorization in: header description: Authentication using Personal Access Token (PAT) token required: true schema: type: string - name: shipbob_channel_id in: header description: | Channel Id for Operation required: true schema: type: string format: int32 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Returns.ReturnOrderViewModel' '401': description: Authorization missing or invalid content: application/json: schema: description: Any type '403': description: The provided credentials are not authorized to access this resource content: application/json: schema: description: Any type '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Returns.ValidationProblemDetails' '422': description: Client Error content: application/json: schema: $ref: '#/components/schemas/Returns.ValidationProblemDetails' servers: - url: https://api.shipbob.com - url: https://sandbox-api.shipbob.com components: schemas: Returns.ChannelInfoViewModel: type: object properties: id: type: integer description: Unique id of the channel name: type: - string - 'null' description: Name of the channel description: Created by channel metadata title: Returns.ChannelInfoViewModel Returns.FulfillmentCenterViewModel: type: object properties: id: type: integer description: Unique identifier of the fulfillment center name: type: - string - 'null' description: Name of the fulfillment center required: - id description: Information about a fulfillment center title: Returns.FulfillmentCenterViewModel Returns.ReturnAction: type: string enum: - '0' - '1' - '2' - '3' title: Returns.ReturnAction Returns.ReturnActionSource: type: string enum: - InventoryDefault - Override description: |- InventoryDefault Override title: Returns.ReturnActionSource Returns.ReturnActionRequestedViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_type: $ref: '#/components/schemas/Returns.ReturnActionSource' instructions: type: - string - 'null' title: Returns.ReturnActionRequestedViewModel Returns.ReturnActionTakenViewModel: type: object properties: action: $ref: '#/components/schemas/Returns.ReturnAction' action_reason: type: - string - 'null' quantity_processed: type: integer title: Returns.ReturnActionTakenViewModel Returns.InventoryItemViewModel: type: object properties: action_requested: $ref: '#/components/schemas/Returns.ReturnActionRequestedViewModel' action_taken: type: - array - 'null' items: $ref: '#/components/schemas/Returns.ReturnActionTakenViewModel' id: type: integer name: type: - string - 'null' quantity: type: integer title: Returns.InventoryItemViewModel Returns.ReturnType: type: string enum: - Regular - ReturnToSender description: |- Regular ReturnToSender title: Returns.ReturnType Returns.ReturnStatus: type: string enum: - AwaitingArrival - Arrived - Processing - Completed - Cancelled description: |- AwaitingArrival Arrived Processing Completed Cancelled title: Returns.ReturnStatus Returns.TransactionLogSource: type: string enum: - ReturnLabelInvoice - ReturnProcessingFee - ReturnToSenderFee description: |- ReturnLabelInvoice ReturnProcessingFee ReturnToSenderFee title: Returns.TransactionLogSource Returns.TransactionViewModel: type: object properties: amount: type: number format: double transaction_type: $ref: '#/components/schemas/Returns.TransactionLogSource' title: Returns.TransactionViewModel Returns.ReturnOrderViewModel: type: object properties: channel: $ref: '#/components/schemas/Returns.ChannelInfoViewModel' completed_date: type: - string - 'null' format: date-time description: Completed date for a return order. customer_name: type: - string - 'null' description: Customer name from the related shipment. fulfillment_center: $ref: '#/components/schemas/Returns.FulfillmentCenterViewModel' id: type: integer description: Unique id of the Return Order insert_date: type: string format: date-time description: Date this return order was created inventory: type: - array - 'null' items: $ref: '#/components/schemas/Returns.InventoryItemViewModel' description: List of inventory included in the return order invoice_amount: type: - number - 'null' format: double description: Invoiced amount of return order (sum of transaction amounts) original_shipment_id: type: - integer - 'null' description: Id of the corresponding shipment that is the souce of the return reference_id: type: - string - 'null' description: Client-defined external unique id of the return order return_type: $ref: '#/components/schemas/Returns.ReturnType' status: $ref: '#/components/schemas/Returns.ReturnStatus' store_order_id: type: - string - 'null' description: Store order for the related shipment. tracking_number: type: - string - 'null' description: Tracking number of the return shipment transactions: type: - array - 'null' items: $ref: '#/components/schemas/Returns.TransactionViewModel' description: Array of transactions affiliated with the return order title: Returns.ReturnOrderViewModel ReturnsValidationProblemDetailsExtensions: type: object properties: {} title: ReturnsValidationProblemDetailsExtensions Returns.ValidationProblemDetails: type: object properties: detail: type: - string - 'null' errors: type: - object - 'null' additionalProperties: type: array items: type: string extensions: type: - object - 'null' additionalProperties: $ref: '#/components/schemas/ReturnsValidationProblemDetailsExtensions' instance: type: - string - 'null' status: type: - integer - 'null' title: type: - string - 'null' type: type: - string - 'null' title: Returns.ValidationProblemDetails securitySchemes: PAT: type: http scheme: bearer description: Authentication using Personal Access Token (PAT) token OAuth2: type: http scheme: bearer description: OAuth2 authentication using JWT tokens ``` ## SDK Code Examples ```python Returns_cancelReturnOrder_example import requests url = "https://api.shipbob.com/2025-07/return/id:cancel" headers = { "shipbob_channel_id": "shipbob_channel_id", "Authorization": "Bearer " } response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Returns_cancelReturnOrder_example const url = 'https://api.shipbob.com/2025-07/return/id:cancel'; const options = { method: 'POST', headers: {shipbob_channel_id: 'shipbob_channel_id', Authorization: 'Bearer '} }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Returns_cancelReturnOrder_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.shipbob.com/2025-07/return/id:cancel" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("shipbob_channel_id", "shipbob_channel_id") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Returns_cancelReturnOrder_example require 'uri' require 'net/http' url = URI("https://api.shipbob.com/2025-07/return/id:cancel") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["shipbob_channel_id"] = 'shipbob_channel_id' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Returns_cancelReturnOrder_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.shipbob.com/2025-07/return/id:cancel") .header("shipbob_channel_id", "shipbob_channel_id") .header("Authorization", "Bearer ") .asString(); ``` ```php Returns_cancelReturnOrder_example request('POST', 'https://api.shipbob.com/2025-07/return/id:cancel', [ 'headers' => [ 'Authorization' => 'Bearer ', 'shipbob_channel_id' => 'shipbob_channel_id', ], ]); echo $response->getBody(); ``` ```csharp Returns_cancelReturnOrder_example using RestSharp; var client = new RestClient("https://api.shipbob.com/2025-07/return/id:cancel"); var request = new RestRequest(Method.POST); request.AddHeader("shipbob_channel_id", "shipbob_channel_id"); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Returns_cancelReturnOrder_example import Foundation let headers = [ "shipbob_channel_id": "shipbob_channel_id", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/2025-07/return/id:cancel")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```