> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.shipbob.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.shipbob.com/_mcp/server.

# Update box tracking for a Warehouse Receiving Order


PATCH https://api.shipbob.com/Experimental/receiving/{id}/tracking
Content-Type: application/json

Updates tracking numbers on the listed boxes and stamps the carrier onto them; boxes not listed are left unchanged. Tracking numbers must be unique across all boxes of the order. Not available when ShipBob shipping labels were purchased for the order — the purchased labels determine the tracking numbers.


Reference: https://developer.shipbob.com/experimental/api/receiving/update-box-tracking-for-a-warehouse-receiving-order

## Authentication

- `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token
- `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens

## Servers

- `https://api.shipbob.com` (https://api.shipbob.com, default)
- `https://sandbox-api.shipbob.com` (https://sandbox-api.shipbob.com)

## Request

### Path parameters

- `id` (integer, required) — Id of the receiving order

### Body (application/json)

This endpoint expects an object.

- `boxes` (list of object, required) — Boxes to update, addressed by box number.
  - `box_number` (integer, required) — The box's number on the receiving order (1-based).
  - `tracking_number` (string, required) — New tracking number for the box; must be unique across all boxes of the order.
- `vendor_carrier_name` (string, required) — Carrier delivering the listed boxes, from the ShipBob vendor-carrier list, or the literal "Other" with the carrier name supplied in other_carrier_name.
- `other_carrier_name` (string, optional, nullable) — Free-text carrier name (max 50 characters); required when vendor_carrier_name is "Other", not valid otherwise.

## Response

### 200

Success

- `boxes` (list of object, optional) — Tracking state of every box on the order
  - `box_id` (integer, optional) — Id of the box
  - `box_number` (integer, optional) — The box's number on the receiving order (1-based)
  - `other_carrier_name` (string, optional, nullable) — Free-text carrier name when vendor_carrier_name is "Other"
  - `tracking_number` (string, optional, nullable) — Tracking number of the box shipment
  - `vendor_carrier_name` (string, optional, nullable) — Carrier delivering the box, or "Other"
- `id` (integer, optional) — Id of the receiving order

## Errors

### 401 Unauthorized Error

Authorization missing or invalid

- `any`

### 403 Forbidden Error

The provided credentials are not authorized to access this resource

- `any`

### 404 Not Found Error

Not Found

- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

### 422 Unprocessable Entity Error

Unprocessable Content. Validation errors are returned keyed by field; business-rule errors that are not tied to a specific field are returned under an empty key. Rejected here when the order has ShipBob-purchased or already-generated shipping labels (the labels determine tracking), when a box number is not on the order, or when tracking numbers are duplicated across the listed boxes.

- `map from string to list of string`

## Examples

### default

**Request**

```json
{
  "boxes": [
    {
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    }
  ],
  "vendor_carrier_name": "FedEx",
  "other_carrier_name": null
}
```

**Response**

```json
{
  "boxes": [
    {
      "box_id": 7890123,
      "box_number": 1,
      "other_carrier_name": null,
      "tracking_number": "1Z999AA10123456784",
      "vendor_carrier_name": "FedEx"
    }
  ],
  "id": 123456
}
```

**SDK Code**

```python default
import requests

url = "https://api.shipbob.com/Experimental/receiving/1/tracking"

payload = {
    "boxes": [
        {
            "box_number": 1,
            "tracking_number": "1Z999AA10123456784"
        }
    ],
    "vendor_carrier_name": "FedEx",
    "other_carrier_name": None
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript default
const url = 'https://api.shipbob.com/Experimental/receiving/1/tracking';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"boxes":[{"box_number":1,"tracking_number":"1Z999AA10123456784"}],"vendor_carrier_name":"FedEx","other_carrier_name":null}'
};

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://api.shipbob.com/Experimental/receiving/1/tracking"

	payload := strings.NewReader("{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    }\n  ],\n  \"vendor_carrier_name\": \"FedEx\",\n  \"other_carrier_name\": null\n}")

	req, _ := http.NewRequest("PATCH", 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 default
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/Experimental/receiving/1/tracking")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    }\n  ],\n  \"vendor_carrier_name\": \"FedEx\",\n  \"other_carrier_name\": null\n}"

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

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.shipbob.com/Experimental/receiving/1/tracking")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    }\n  ],\n  \"vendor_carrier_name\": \"FedEx\",\n  \"other_carrier_name\": null\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.shipbob.com/Experimental/receiving/1/tracking', [
  'body' => '{
  "boxes": [
    {
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    }
  ],
  "vendor_carrier_name": "FedEx",
  "other_carrier_name": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp default
using RestSharp;

var client = new RestClient("https://api.shipbob.com/Experimental/receiving/1/tracking");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    }\n  ],\n  \"vendor_carrier_name\": \"FedEx\",\n  \"other_carrier_name\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "boxes": [
    [
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    ]
  ],
  "vendor_carrier_name": "FedEx",
  "other_carrier_name": 
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/Experimental/receiving/1/tracking")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### other_carrier

**Request**

```json
{
  "boxes": [
    {
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    },
    {
      "box_number": 2,
      "tracking_number": "1Z999AA10123456785"
    }
  ],
  "vendor_carrier_name": "Other",
  "other_carrier_name": "Regional Courier LLC"
}
```

**Response**

```json
{
  "boxes": [
    {
      "box_id": 7890123,
      "box_number": 1,
      "other_carrier_name": null,
      "tracking_number": "1Z999AA10123456784",
      "vendor_carrier_name": "FedEx"
    }
  ],
  "id": 123456
}
```

**SDK Code**

```python other_carrier
import requests

url = "https://api.shipbob.com/Experimental/receiving/1/tracking"

payload = {
    "boxes": [
        {
            "box_number": 1,
            "tracking_number": "1Z999AA10123456784"
        },
        {
            "box_number": 2,
            "tracking_number": "1Z999AA10123456785"
        }
    ],
    "vendor_carrier_name": "Other",
    "other_carrier_name": "Regional Courier LLC"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript other_carrier
const url = 'https://api.shipbob.com/Experimental/receiving/1/tracking';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"boxes":[{"box_number":1,"tracking_number":"1Z999AA10123456784"},{"box_number":2,"tracking_number":"1Z999AA10123456785"}],"vendor_carrier_name":"Other","other_carrier_name":"Regional Courier LLC"}'
};

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

```go other_carrier
package main

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

func main() {

	url := "https://api.shipbob.com/Experimental/receiving/1/tracking"

	payload := strings.NewReader("{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    },\n    {\n      \"box_number\": 2,\n      \"tracking_number\": \"1Z999AA10123456785\"\n    }\n  ],\n  \"vendor_carrier_name\": \"Other\",\n  \"other_carrier_name\": \"Regional Courier LLC\"\n}")

	req, _ := http.NewRequest("PATCH", 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 other_carrier
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/Experimental/receiving/1/tracking")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    },\n    {\n      \"box_number\": 2,\n      \"tracking_number\": \"1Z999AA10123456785\"\n    }\n  ],\n  \"vendor_carrier_name\": \"Other\",\n  \"other_carrier_name\": \"Regional Courier LLC\"\n}"

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

```java other_carrier
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.shipbob.com/Experimental/receiving/1/tracking")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    },\n    {\n      \"box_number\": 2,\n      \"tracking_number\": \"1Z999AA10123456785\"\n    }\n  ],\n  \"vendor_carrier_name\": \"Other\",\n  \"other_carrier_name\": \"Regional Courier LLC\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.shipbob.com/Experimental/receiving/1/tracking', [
  'body' => '{
  "boxes": [
    {
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    },
    {
      "box_number": 2,
      "tracking_number": "1Z999AA10123456785"
    }
  ],
  "vendor_carrier_name": "Other",
  "other_carrier_name": "Regional Courier LLC"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp other_carrier
using RestSharp;

var client = new RestClient("https://api.shipbob.com/Experimental/receiving/1/tracking");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"boxes\": [\n    {\n      \"box_number\": 1,\n      \"tracking_number\": \"1Z999AA10123456784\"\n    },\n    {\n      \"box_number\": 2,\n      \"tracking_number\": \"1Z999AA10123456785\"\n    }\n  ],\n  \"vendor_carrier_name\": \"Other\",\n  \"other_carrier_name\": \"Regional Courier LLC\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift other_carrier
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "boxes": [
    [
      "box_number": 1,
      "tracking_number": "1Z999AA10123456784"
    ],
    [
      "box_number": 2,
      "tracking_number": "1Z999AA10123456785"
    ]
  ],
  "vendor_carrier_name": "Other",
  "other_carrier_name": "Regional Courier LLC"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/Experimental/receiving/1/tracking")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```