> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beachdepository.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate Outbound Shipment

> Move a sandbox outbound shipment to its next status

Moves the shipment one step along the [outbound journey](https://docs.beachdepository.com/guides/webhooks/journeys.md#outbound-shipment). A status that is not the next step returns `409` with `details.currentStatus` and `details.allowedStatuses`.

## Authorizations

**Authorization** `string` *required*

Send `Bearer <token>` with a `pv_sandbox_` key. The key needs `outbound_shipments:update`.

## Path Parameters

**id** `string` *required*

The `id` returned by [Create Outbound Shipment](https://docs.beachdepository.com/api-reference/outbound-shipments/create.md).

## Body

**status** `string` *required*

One of `processing`, `shipped`, `delivered`, `rejected`, or `cancelled`.

> [!NOTE]
>
> This endpoint supports the [`Idempotency-Key`](https://docs.beachdepository.com/getting-started/idempotency) header.

```bash cURL theme={null}
curl --request POST \
  --url https://sandbox.api.beachdepository.com/v1/sandbox/outbound-shipments/jd7abc123xyz/simulate \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <token>' \
  --data '{ "status": "shipped" }'
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://sandbox.api.beachdepository.com/v1/sandbox/outbound-shipments/jd7abc123xyz/simulate",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer <token>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ status: "shipped" }),
  }
)

const data = await response.json()
```

```python Python theme={null}
import requests

response = requests.post(
    "https://sandbox.api.beachdepository.com/v1/sandbox/outbound-shipments/jd7abc123xyz/simulate",
    headers={
        "Authorization": "Bearer <token>",
    },
    json={"status": "shipped"},
)
```

```go Go theme={null}
package main

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

func main() {
  url := "https://sandbox.api.beachdepository.com/v1/sandbox/outbound-shipments/jd7abc123xyz/simulate"
  req, _ := http.NewRequest("POST", url, strings.NewReader(`{"status":"shipped"}`))
  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(string(body))
}
```

```json 200 theme={null}
{
  "data": {
    "id": "jd7abc123xyz",
    "fboAccountId": "m97fbo456",
    "organizationId": "k57orgxyz",
    "status": "shipped",
    "totalItems": 1,
    "packages": [
      {
        "carrier": "FedEx",
        "trackingNumber": "794658123456",
        "trackingUrl": "https://www.fedex.com/fedextrack/?trknbr=794658123456",
        "shippedAt": "2025-06-15T10:00:00.000Z"
      }
    ],
    "items": [
      {
        "id": "j970item123",
        "outboundShipmentId": "jd7abc123xyz",
        "productId": "jh7prod123",
        "inventoryItemId": "jk7inv456",
        "createdAt": "2025-06-15T09:00:00Z"
      }
    ],
    "createdAt": "2025-06-15T09:00:00Z"
  }
}
```

```json 409 theme={null}
{
  "error": {
    "code": "CONFLICT",
    "message": "That status is not the next step for this shipment",
    "details": {
      "currentStatus": "created",
      "allowedStatuses": ["processing", "rejected", "cancelled"]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.