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.

# Update Shipment Address


PUT https://gateway-dev.shipbob.dev/2026-01/shipment/{shipmentId}:updateAddress
Content-Type: application/json

Updates the shipping address for a specific shipment.


Reference: https://developer-dev.shipbob.dev/api/orders/update-shipment-address

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2026-01
  version: 1.0.0
paths:
  /2026-01/shipment/{shipmentId}:updateAddress:
    put:
      operationId: update-shipment-address
      summary: |
        Update Shipment Address
      description: |
        Updates the shipping address for a specific shipment.
      tags:
        - subpackage_orders
      parameters:
        - name: shipmentId
          in: path
          description: Unique identifier of the shipment
          required: true
          schema:
            type: integer
        - 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.ShipmentApiResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Orders.ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Orders.UpdateAddressRequest'
servers:
  - url: https://gateway-dev.shipbob.dev
components:
  schemas:
    Orders.UpdateAddressRequest:
      type: object
      properties:
        city:
          type: string
          description: City of customer address
        company_name:
          type:
            - string
            - 'null'
          description: Company name (optional)
        country_code:
          type:
            - string
            - 'null'
          description: Country code of customer address
        email:
          type:
            - string
            - 'null'
          description: Customer's email address
        phone_number:
          type:
            - string
            - 'null'
          description: Phone number of Recipient address
        recipient_name:
          type:
            - string
            - 'null'
          description: Name of customer
        state:
          type:
            - string
            - 'null'
          description: State of customer address
        street_address1:
          type: string
          description: Street Address 1
        street_address2:
          type:
            - string
            - 'null'
          description: Street Address 2
        zip_code:
          type:
            - string
            - 'null'
          description: Zipcode of customer address
      required:
        - city
        - street_address1
      title: Orders.UpdateAddressRequest
    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.ShipmentApiResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Orders.ErrorResponse'
          description: Error details if the update was not successful
        id:
          type: integer
          format: int64
          description: Unique identifier of the shipment
        is_success:
          type: boolean
          description: Indicates whether the update was successful
      title: Orders.ShipmentApiResponse
  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_updateShipmentAddress_example
import requests

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

payload = {
    "city": "Chicago",
    "street_address1": "100 Belmont Ave",
    "company_name": "Acme Corp",
    "country_code": "US",
    "email": "john@example.com",
    "phone_number": "555-867-5309",
    "recipient_name": "John Doe",
    "state": "IL",
    "street_address2": "",
    "zip_code": "60657"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Orders_updateShipmentAddress_example
const url = 'https://gateway-dev.shipbob.dev/2026-01/shipment/1:updateAddress';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"city":"Chicago","street_address1":"100 Belmont Ave","company_name":"Acme Corp","country_code":"US","email":"john@example.com","phone_number":"555-867-5309","recipient_name":"John Doe","state":"IL","street_address2":"","zip_code":"60657"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Orders_updateShipmentAddress_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"city\": \"Chicago\",\n  \"street_address1\": \"100 Belmont Ave\",\n  \"company_name\": \"Acme Corp\",\n  \"country_code\": \"US\",\n  \"email\": \"john@example.com\",\n  \"phone_number\": \"555-867-5309\",\n  \"recipient_name\": \"John Doe\",\n  \"state\": \"IL\",\n  \"street_address2\": \"\",\n  \"zip_code\": \"60657\"\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_updateShipmentAddress_example
require 'uri'
require 'net/http'

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

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  \"city\": \"Chicago\",\n  \"street_address1\": \"100 Belmont Ave\",\n  \"company_name\": \"Acme Corp\",\n  \"country_code\": \"US\",\n  \"email\": \"john@example.com\",\n  \"phone_number\": \"555-867-5309\",\n  \"recipient_name\": \"John Doe\",\n  \"state\": \"IL\",\n  \"street_address2\": \"\",\n  \"zip_code\": \"60657\"\n}"

response = http.request(request)
puts response.read_body
```

```java Orders_updateShipmentAddress_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/1:updateAddress")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"city\": \"Chicago\",\n  \"street_address1\": \"100 Belmont Ave\",\n  \"company_name\": \"Acme Corp\",\n  \"country_code\": \"US\",\n  \"email\": \"john@example.com\",\n  \"phone_number\": \"555-867-5309\",\n  \"recipient_name\": \"John Doe\",\n  \"state\": \"IL\",\n  \"street_address2\": \"\",\n  \"zip_code\": \"60657\"\n}")
  .asString();
```

```php Orders_updateShipmentAddress_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://gateway-dev.shipbob.dev/2026-01/shipment/1:updateAddress', [
  'body' => '{
  "city": "Chicago",
  "street_address1": "100 Belmont Ave",
  "company_name": "Acme Corp",
  "country_code": "US",
  "email": "john@example.com",
  "phone_number": "555-867-5309",
  "recipient_name": "John Doe",
  "state": "IL",
  "street_address2": "",
  "zip_code": "60657"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Orders_updateShipmentAddress_example
using RestSharp;

var client = new RestClient("https://gateway-dev.shipbob.dev/2026-01/shipment/1:updateAddress");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"city\": \"Chicago\",\n  \"street_address1\": \"100 Belmont Ave\",\n  \"company_name\": \"Acme Corp\",\n  \"country_code\": \"US\",\n  \"email\": \"john@example.com\",\n  \"phone_number\": \"555-867-5309\",\n  \"recipient_name\": \"John Doe\",\n  \"state\": \"IL\",\n  \"street_address2\": \"\",\n  \"zip_code\": \"60657\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Orders_updateShipmentAddress_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "city": "Chicago",
  "street_address1": "100 Belmont Ave",
  "company_name": "Acme Corp",
  "country_code": "US",
  "email": "john@example.com",
  "phone_number": "555-867-5309",
  "recipient_name": "John Doe",
  "state": "IL",
  "street_address2": "",
  "zip_code": "60657"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://gateway-dev.shipbob.dev/2026-01/shipment/1:updateAddress")! 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()
```