> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer-stage.shipbob.dev/2026-07/api/orders/bulk-update-shipping-service/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server. # Bulk Update Shipping Service PUT https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService Content-Type: application/json Updates the shipping service for multiple shipments in a single request. The `requested_shipping_service_id` corresponds to the `service_level.id` value returned by the [Get Shipping Methods](/api/orders/get-shipping-methods) endpoint. Reference: https://developer-stage.shipbob.dev/api/orders/bulk-update-shipping-service ## Authentication - `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token - `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens ## Request ### Body (application/json) This endpoint expects an Orders.BulkUpdateShippingServiceRequest. - `reason` (string, required) — Reason for updating the shipping service - `requested_shipping_service_id` (integer, required) — The `service_level.id` value from an `orders-get-shipping-method` result (the nested `service_level` object's `id`, for example 2 for Expedited). Do not pass the shipping method's top-level `id`. - `shipment_ids` (list of long, required) — List of shipment IDs to update the shipping service for ## Response ### 200 OK - `summary` (Orders.SummaryResponse, required) — Summary of the bulk operation results - `results` (list of Orders.IApiDetailResponse, optional, nullable) — Per-shipment results of the bulk operation ## Errors ### 400 Bad Request Error Bad Request - `code` (enum, optional) — Error code identifying the type of error - Allowed values: `INVALID_PARAMETER`, `VALIDATION_ERROR`, `DATABASE_UPDATE_ERROR`, `REPROCESSING_ERROR`, `DEALLOCATE_ERROR`, `NOT_FOUND`, `CONFLICT` - `message` (string, optional, nullable) — Human-readable description of the error ## Types ### Orders.SummaryResponse - `failed` (integer, optional) — Number of shipments that failed to update - `successful` (integer, optional) — Number of shipments that were updated successfully - `total` (integer, optional) — Total number of shipments included in the bulk operation ### Orders.IApiDetailResponse - `error` (Orders.ErrorResponse, optional, nullable) — Error details if the operation was not successful - `id` (long, optional) — Unique identifier of the shipment - `is_success` (boolean, optional) — Indicates whether the operation was successful for this shipment ### Orders.ErrorResponse - `code` (enum, optional) — Error code identifying the type of error - Allowed values: `INVALID_PARAMETER`, `VALIDATION_ERROR`, `DATABASE_UPDATE_ERROR`, `REPROCESSING_ERROR`, `DEALLOCATE_ERROR`, `NOT_FOUND`, `CONFLICT` - `message` (string, optional, nullable) — Human-readable description of the error ## Examples **Request** ```json { "reason": "Merchant request", "requested_shipping_service_id": 5, "shipment_ids": [ 123456, 789012 ] } ``` **Response** ```json { "summary": { "failed": 0, "successful": 2, "total": 2 }, "results": [ { "error": {}, "id": 123456, "is_success": true } ] } ``` **SDK Code** ```python default import requests url = "https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService" payload = { "reason": "Merchant request", "requested_shipping_service_id": 5, "shipment_ids": [123456, 789012] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript default const url = 'https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"reason":"Merchant request","requested_shipping_service_id":5,"shipment_ids":[123456,789012]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go default package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService" payload := strings.NewReader("{\n \"reason\": \"Merchant request\",\n \"requested_shipping_service_id\": 5,\n \"shipment_ids\": [\n 123456,\n 789012\n ]\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby default require 'uri' require 'net/http' url = URI("https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"reason\": \"Merchant request\",\n \"requested_shipping_service_id\": 5,\n \"shipment_ids\": [\n 123456,\n 789012\n ]\n}" response = http.request(request) puts response.read_body ``` ```java default import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"reason\": \"Merchant request\",\n \"requested_shipping_service_id\": 5,\n \"shipment_ids\": [\n 123456,\n 789012\n ]\n}") .asString(); ``` ```php default request('PUT', 'https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService', [ 'body' => '{ "reason": "Merchant request", "requested_shipping_service_id": 5, "shipment_ids": [ 123456, 789012 ] }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp default using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"reason\": \"Merchant request\",\n \"requested_shipping_service_id\": 5,\n \"shipment_ids\": [\n 123456,\n 789012\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift default import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "reason": "Merchant request", "requested_shipping_service_id": 5, "shipment_ids": [123456, 789012] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-07/shipment:bulkUpdateShippingService")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```