> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer-stage.shipbob.dev/2026-07/api/simulations/simulates-shipment/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server. # Simulates Shipment POST https://sandbox-api.shipbob.com/2026-07/simulate/shipment Content-Type: application/json Simulation of shipment action endpoint. Reference: https://developer-stage.shipbob.dev/api/simulations/simulates-shipment ## Authentication - `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token - `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens ## Request ### Body (application/json) This endpoint expects a Simulation.orderSimulationRequestModel. - `shipment_id` (string, required) — The ShipBob shipment id the simulation should target. - `simulation` (Simulation.simulationModel, required) — The simulation action definition, optionally chained with subsequent actions. ## Response ### 200 Existing registration - `message` (string, optional, nullable) — Optional message about the submitted simulation. - `simulation_id` (string, optional, nullable) — The unique identifier of the simulation run. ### 202 Successful registration - `message` (string, optional, nullable) — Optional message about the submitted simulation. - `simulation_id` (string, optional, nullable) — The unique identifier of the simulation run. ## Types ### Simulation.simulationModel Defines a simulation action to run, with an optional delay and an optional next action to allow chaining. - `action` (enum, required) — The simulation action to perform. - Allowed values: `ShipOrder`, `DeliverOrder` - `delay` (integer, optional, nullable) — Optional delay before executing this action, in minutes. - `next` (Simulation.simulationModel, optional) — The next action in the sequence, if actions are chained. ## Examples ### default **Request** ```json { "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } } ``` **Response** ```json { "message": "string", "simulation_id": "string" } ``` **SDK Code** ```python default import requests url = "https://sandbox-api.shipbob.com/2026-07/simulate/shipment" payload = { "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript default const url = 'https://sandbox-api.shipbob.com/2026-07/simulate/shipment'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"shipment_id":"string","simulation":{"action":"ShipOrder","delay":0,"next":{}}}' }; 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://sandbox-api.shipbob.com/2026-07/simulate/shipment" payload := strings.NewReader("{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}") req, _ := http.NewRequest("POST", 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 default require 'uri' require 'net/http' url = URI("https://sandbox-api.shipbob.com/2026-07/simulate/shipment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}" response = http.request(request) puts response.read_body ``` ```java default import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://sandbox-api.shipbob.com/2026-07/simulate/shipment") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}") .asString(); ``` ```php default request('POST', 'https://sandbox-api.shipbob.com/2026-07/simulate/shipment', [ 'body' => '{ "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp default using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/2026-07/simulate/shipment"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift default import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "shipment_id": "string", "simulation": [ "action": "ShipOrder", "delay": 0, "next": [] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-07/simulate/shipment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ``` ### default **Request** ```json { "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } } ``` **Response** ```json { "message": "string", "simulation_id": "string" } ``` **SDK Code** ```python default import requests url = "https://sandbox-api.shipbob.com/2026-07/simulate/shipment" payload = { "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript default const url = 'https://sandbox-api.shipbob.com/2026-07/simulate/shipment'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"shipment_id":"string","simulation":{"action":"ShipOrder","delay":0,"next":{}}}' }; 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://sandbox-api.shipbob.com/2026-07/simulate/shipment" payload := strings.NewReader("{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}") req, _ := http.NewRequest("POST", 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 default require 'uri' require 'net/http' url = URI("https://sandbox-api.shipbob.com/2026-07/simulate/shipment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}" response = http.request(request) puts response.read_body ``` ```java default import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://sandbox-api.shipbob.com/2026-07/simulate/shipment") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}") .asString(); ``` ```php default request('POST', 'https://sandbox-api.shipbob.com/2026-07/simulate/shipment', [ 'body' => '{ "shipment_id": "string", "simulation": { "action": "ShipOrder", "delay": 0, "next": {} } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp default using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/2026-07/simulate/shipment"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"shipment_id\": \"string\",\n \"simulation\": {\n \"action\": \"ShipOrder\",\n \"delay\": 0,\n \"next\": {}\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift default import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "shipment_id": "string", "simulation": [ "action": "ShipOrder", "delay": 0, "next": [] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-07/simulate/shipment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```