# Bulk update shipping service PUT https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService Content-Type: application/json Updates the shipping service for multiple shipments in a single request. Reference: https://developer-stage.shipbob.dev/2025-07/api/shipments/bulk-update-shipping-service ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: api-2025-07 version: 1.0.0 paths: /2025-07/shipments:bulkUpdateShippingService: put: operationId: bulk-update-shipping-service summary: | Bulk update shipping service description: | Updates the shipping service for multiple shipments in a single request. tags: - subpackage_shipments parameters: - name: Authorization in: header description: Authentication using Personal Access Token (PAT) token required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Shipments.BulkActionApiResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/Shipments.BulkUpdateShippingServiceRequest' servers: - url: https://sandbox-api.shipbob.com components: schemas: Shipments.BulkUpdateShippingServiceRequest: type: object properties: reason: type: string requested_shipping_service_id: type: integer shipment_ids: type: array items: type: integer format: int64 required: - reason - requested_shipping_service_id - shipment_ids title: Shipments.BulkUpdateShippingServiceRequest Shipments.ErrorCode: type: string enum: - INVALID_PARAMETER - VALIDATION_ERROR - DATABASE_UPDATE_ERROR - REPROCESSING_ERROR - DEALLOCATE_ERROR - NOT_FOUND - CONFLICT title: Shipments.ErrorCode Shipments.ErrorResponse: type: object properties: code: $ref: '#/components/schemas/Shipments.ErrorCode' message: type: - string - 'null' title: Shipments.ErrorResponse Shipments.IApiDetailResponse: type: object properties: error: $ref: '#/components/schemas/Shipments.ErrorResponse' id: type: integer format: int64 is_success: type: boolean title: Shipments.IApiDetailResponse Shipments.SummaryResponse: type: object properties: failed: type: integer successful: type: integer total: type: integer title: Shipments.SummaryResponse Shipments.BulkActionApiResponse: type: object properties: results: type: - array - 'null' items: $ref: '#/components/schemas/Shipments.IApiDetailResponse' summary: $ref: '#/components/schemas/Shipments.SummaryResponse' required: - summary title: Shipments.BulkActionApiResponse 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 Shipments_bulkUpdateShippingService_example import requests url = "https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService" payload = { "reason": "string", "requested_shipping_service_id": 0, "shipment_ids": [0] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Shipments_bulkUpdateShippingService_example const url = 'https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"reason":"string","requested_shipping_service_id":0,"shipment_ids":[0]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Shipments_bulkUpdateShippingService_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService" payload := strings.NewReader("{\n \"reason\": \"string\",\n \"requested_shipping_service_id\": 0,\n \"shipment_ids\": [\n 0\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 Shipments_bulkUpdateShippingService_example require 'uri' require 'net/http' url = URI("https://sandbox-api.shipbob.com/2025-07/shipments: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\": \"string\",\n \"requested_shipping_service_id\": 0,\n \"shipment_ids\": [\n 0\n ]\n}" response = http.request(request) puts response.read_body ``` ```java Shipments_bulkUpdateShippingService_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"reason\": \"string\",\n \"requested_shipping_service_id\": 0,\n \"shipment_ids\": [\n 0\n ]\n}") .asString(); ``` ```php Shipments_bulkUpdateShippingService_example request('PUT', 'https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService', [ 'body' => '{ "reason": "string", "requested_shipping_service_id": 0, "shipment_ids": [ 0 ] }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Shipments_bulkUpdateShippingService_example using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/2025-07/shipments:bulkUpdateShippingService"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"reason\": \"string\",\n \"requested_shipping_service_id\": 0,\n \"shipment_ids\": [\n 0\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Shipments_bulkUpdateShippingService_example import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "reason": "string", "requested_shipping_service_id": 0, "shipment_ids": [0] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2025-07/shipments: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() ```