For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer-dev.shipbob.dev/api/orders/llms.txt. For full documentation content, see https://developer-dev.shipbob.dev/api/orders/llms-full.txt.

# Bulk Update Shipping Service


PUT https://gateway-dev.shipbob.dev/2026-01/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-dev.shipbob.dev/api/orders/bulk-update-shipping-service

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2026-01
  version: 1.0.0
paths:
  /2026-01/shipment:bulkUpdateShippingService:
    put:
      operationId: bulk-update-shipping-service
      summary: |
        Bulk Update Shipping Service
      description: >
        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.
      tags:
        - subpackage_orders
      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/Orders.BulkActionApiResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Orders.ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Orders.BulkUpdateShippingServiceRequest'
servers:
  - url: https://gateway-dev.shipbob.dev
components:
  schemas:
    Orders.BulkUpdateShippingServiceRequest:
      type: object
      properties:
        reason:
          type: string
          description: Reason for updating the shipping service
        requested_shipping_service_id:
          type: integer
          description: ID of the shipping service to assign to the shipments
        shipment_ids:
          type: array
          items:
            type: integer
            format: int64
          description: List of shipment IDs to update the shipping service for
      required:
        - reason
        - requested_shipping_service_id
        - shipment_ids
      title: Orders.BulkUpdateShippingServiceRequest
    Orders.ErrorCode:
      type: string
      enum:
        - INVALID_PARAMETER
        - VALIDATION_ERROR
        - DATABASE_UPDATE_ERROR
        - REPROCESSING_ERROR
        - DEALLOCATE_ERROR
        - NOT_FOUND
        - CONFLICT
      title: Orders.ErrorCode
    Orders.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/Orders.ErrorCode'
          description: Error code identifying the type of error
        message:
          type:
            - string
            - 'null'
          description: Human-readable description of the error
      title: Orders.ErrorResponse
    Orders.IApiDetailResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Orders.ErrorResponse'
          description: Error details if the operation was not successful
        id:
          type: integer
          format: int64
          description: Unique identifier of the shipment
        is_success:
          type: boolean
          description: Indicates whether the operation was successful for this shipment
      title: Orders.IApiDetailResponse
    Orders.SummaryResponse:
      type: object
      properties:
        failed:
          type: integer
          description: Number of shipments that failed to update
        successful:
          type: integer
          description: Number of shipments that were updated successfully
        total:
          type: integer
          description: Total number of shipments included in the bulk operation
      title: Orders.SummaryResponse
    Orders.BulkActionApiResponse:
      type: object
      properties:
        results:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Orders.IApiDetailResponse'
          description: Per-shipment results of the bulk operation
        summary:
          $ref: '#/components/schemas/Orders.SummaryResponse'
          description: Summary of the bulk operation results
      required:
        - summary
      title: Orders.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 Orders_bulkUpdateShippingService_example
import requests

url = "https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService"

payload = {
    "reason": "Merchant request",
    "requested_shipping_service_id": 5,
    "shipment_ids": [123456, 789012]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Orders_bulkUpdateShippingService_example
const url = 'https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', '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 Orders_bulkUpdateShippingService_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://gateway-dev.shipbob.dev/2026-01/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 <token>")
	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 Orders_bulkUpdateShippingService_example
require 'uri'
require 'net/http'

url = URI("https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
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 Orders_bulkUpdateShippingService_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService")
  .header("Authorization", "Bearer <token>")
  .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 Orders_bulkUpdateShippingService_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService', [
  'body' => '{
  "reason": "Merchant request",
  "requested_shipping_service_id": 5,
  "shipment_ids": [
    123456,
    789012
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Orders_bulkUpdateShippingService_example
using RestSharp;

var client = new RestClient("https://gateway-dev.shipbob.dev/2026-01/shipment:bulkUpdateShippingService");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
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 Orders_bulkUpdateShippingService_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "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://gateway-dev.shipbob.dev/2026-01/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()
```