> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer-stage.shipbob.dev/experimental/api/kitting/create-work-order/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server. # Create Work Order POST https://sandbox-api.shipbob.com/Experimental/kitting:create Content-Type: application/json Creates a kitting work order. Currently only Kitting is supported as a work order type. Reference: https://developer-stage.shipbob.dev/experimental/api/kitting/create-work-order ## 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 Kitting.PublicCreateWorkOrderRequest. - `actions` (list of Kitting.PublicWorkOrderActionRequest, required) — The actions (steps) to be performed for the kitting work order. - `end_kitted_inventory_id` (integer, required) — The inventory identifier for the end kitted product. - `fulfillment_center_id` (integer, required) — The fulfillment center identifier where the work order will be processed. - `line_items` (list of Kitting.PublicOrderLineItemRequest, required) — The component inventory line items for the kitting work order. Each line item's quantity represents the amount of that inventory required to produce a single kit. - `quantity` (integer, required) — The number of kits to produce. - `workorder_type` (enum, required) - Allowed values: `Kitting` - `lot_date` (datetime, optional, nullable) — Optional lot date for the kitting work order. - `lot_number` (string, optional, nullable) — Optional lot number for the kitting work order. ## Response ### 201 Success - `shipment_id` (integer, optional) — The shipment identifier associated with the created work order. ## Errors ### 500 Internal Server Error Server Error - `details` (any, optional, nullable) - `errors` (list of string, optional) - `message` (string, optional) - `stackTrace` (string, optional, nullable) ## Types ### Kitting.PublicWorkOrderActionRequest Represents an action (step) in a kitting work order. - `order` (integer, required) — The sort order of this action within the work order. - `work_order_action_type_id` (integer, required) — The action type identifier that defines the kind of action to perform. - `attachments` (list of Kitting.PublicWorkOrderActionAttachmentRequest, optional, nullable) — Attachments associated with this action step. - `data` (any, optional, nullable) — The action-specific data payload (e.g. packaging or inventory identifiers). - `instructions` (string, optional, nullable) — Optional instructions for this action step. - `sub_actions` (list of Kitting.PublicWorkOrderActionRequest, optional, nullable) — Optional sub-actions nested under this action. ### Kitting.PublicOrderLineItemRequest Represents an inventory line item in a kitting work order. - `inventory_id` (integer, required) — The inventory identifier for this line item. - `quantity` (integer, required) — The quantity of this inventory item required to produce a single kit. - `lot_date` (datetime, optional, nullable) — Optional lot date restricting picking of this component to a specific lot. Only the date is used — any time component is discarded, so lot matching is by calendar date rather than by instant. - `lot_number` (string, optional, nullable) — Optional lot number restricting picking of this component to a specific lot. ### Kitting.PublicWorkOrderActionAttachmentRequest Represents an attachment reference for a work order action. - `id` (string, required) — The unique identifier (GUID) of the previously uploaded attachment. - `name` (string, required) — The file name of the attachment including extension. ## Examples **Request** ```json { "actions": [ { "order": 1, "work_order_action_type_id": 1, "attachments": [], "data": null, "instructions": "Scan the barcode on the product before kitting", "sub_actions": [] }, { "order": 2, "work_order_action_type_id": 2, "attachments": [], "data": null, "instructions": "Package items according to kit specifications", "sub_actions": [ { "order": 1, "work_order_action_type_id": 3, "attachments": [ { "id": "photo-001", "name": "completed-kit-photo" } ], "data": null, "instructions": "Take a photo of the completed kit" } ] } ], "end_kitted_inventory_id": 42, "fulfillment_center_id": 1, "line_items": [ { "inventory_id": 101, "quantity": 10 } ], "quantity": 10, "workorder_type": "Kitting", "lot_date": "2024-01-15T09:00:00+00:00", "lot_number": "LOT-2024-001" } ``` **Response** ```json { "shipment_id": 0 } ``` **SDK Code** ```python default import requests url = "https://sandbox-api.shipbob.com/Experimental/kitting:create" payload = { "actions": [ { "order": 1, "work_order_action_type_id": 1, "attachments": [], "data": None, "instructions": "Scan the barcode on the product before kitting", "sub_actions": [] }, { "order": 2, "work_order_action_type_id": 2, "attachments": [], "data": None, "instructions": "Package items according to kit specifications", "sub_actions": [ { "order": 1, "work_order_action_type_id": 3, "attachments": [ { "id": "photo-001", "name": "completed-kit-photo" } ], "data": None, "instructions": "Take a photo of the completed kit" } ] } ], "end_kitted_inventory_id": 42, "fulfillment_center_id": 1, "line_items": [ { "inventory_id": 101, "quantity": 10 } ], "quantity": 10, "workorder_type": "Kitting", "lot_date": "2024-01-15T09:00:00+00:00", "lot_number": "LOT-2024-001" } 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/Experimental/kitting:create'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"actions":[{"order":1,"work_order_action_type_id":1,"attachments":[],"data":null,"instructions":"Scan the barcode on the product before kitting","sub_actions":[]},{"order":2,"work_order_action_type_id":2,"attachments":[],"data":null,"instructions":"Package items according to kit specifications","sub_actions":[{"order":1,"work_order_action_type_id":3,"attachments":[{"id":"photo-001","name":"completed-kit-photo"}],"data":null,"instructions":"Take a photo of the completed kit"}]}],"end_kitted_inventory_id":42,"fulfillment_center_id":1,"line_items":[{"inventory_id":101,"quantity":10}],"quantity":10,"workorder_type":"Kitting","lot_date":"2024-01-15T09:00:00+00:00","lot_number":"LOT-2024-001"}' }; 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/Experimental/kitting:create" payload := strings.NewReader("{\n \"actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 1,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Scan the barcode on the product before kitting\",\n \"sub_actions\": []\n },\n {\n \"order\": 2,\n \"work_order_action_type_id\": 2,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Package items according to kit specifications\",\n \"sub_actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 3,\n \"attachments\": [\n {\n \"id\": \"photo-001\",\n \"name\": \"completed-kit-photo\"\n }\n ],\n \"data\": null,\n \"instructions\": \"Take a photo of the completed kit\"\n }\n ]\n }\n ],\n \"end_kitted_inventory_id\": 42,\n \"fulfillment_center_id\": 1,\n \"line_items\": [\n {\n \"inventory_id\": 101,\n \"quantity\": 10\n }\n ],\n \"quantity\": 10,\n \"workorder_type\": \"Kitting\",\n \"lot_date\": \"2024-01-15T09:00:00+00:00\",\n \"lot_number\": \"LOT-2024-001\"\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/Experimental/kitting:create") 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 \"actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 1,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Scan the barcode on the product before kitting\",\n \"sub_actions\": []\n },\n {\n \"order\": 2,\n \"work_order_action_type_id\": 2,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Package items according to kit specifications\",\n \"sub_actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 3,\n \"attachments\": [\n {\n \"id\": \"photo-001\",\n \"name\": \"completed-kit-photo\"\n }\n ],\n \"data\": null,\n \"instructions\": \"Take a photo of the completed kit\"\n }\n ]\n }\n ],\n \"end_kitted_inventory_id\": 42,\n \"fulfillment_center_id\": 1,\n \"line_items\": [\n {\n \"inventory_id\": 101,\n \"quantity\": 10\n }\n ],\n \"quantity\": 10,\n \"workorder_type\": \"Kitting\",\n \"lot_date\": \"2024-01-15T09:00:00+00:00\",\n \"lot_number\": \"LOT-2024-001\"\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/Experimental/kitting:create") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 1,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Scan the barcode on the product before kitting\",\n \"sub_actions\": []\n },\n {\n \"order\": 2,\n \"work_order_action_type_id\": 2,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Package items according to kit specifications\",\n \"sub_actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 3,\n \"attachments\": [\n {\n \"id\": \"photo-001\",\n \"name\": \"completed-kit-photo\"\n }\n ],\n \"data\": null,\n \"instructions\": \"Take a photo of the completed kit\"\n }\n ]\n }\n ],\n \"end_kitted_inventory_id\": 42,\n \"fulfillment_center_id\": 1,\n \"line_items\": [\n {\n \"inventory_id\": 101,\n \"quantity\": 10\n }\n ],\n \"quantity\": 10,\n \"workorder_type\": \"Kitting\",\n \"lot_date\": \"2024-01-15T09:00:00+00:00\",\n \"lot_number\": \"LOT-2024-001\"\n}") .asString(); ``` ```php default request('POST', 'https://sandbox-api.shipbob.com/Experimental/kitting:create', [ 'body' => '{ "actions": [ { "order": 1, "work_order_action_type_id": 1, "attachments": [], "data": null, "instructions": "Scan the barcode on the product before kitting", "sub_actions": [] }, { "order": 2, "work_order_action_type_id": 2, "attachments": [], "data": null, "instructions": "Package items according to kit specifications", "sub_actions": [ { "order": 1, "work_order_action_type_id": 3, "attachments": [ { "id": "photo-001", "name": "completed-kit-photo" } ], "data": null, "instructions": "Take a photo of the completed kit" } ] } ], "end_kitted_inventory_id": 42, "fulfillment_center_id": 1, "line_items": [ { "inventory_id": 101, "quantity": 10 } ], "quantity": 10, "workorder_type": "Kitting", "lot_date": "2024-01-15T09:00:00+00:00", "lot_number": "LOT-2024-001" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp default using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/Experimental/kitting:create"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 1,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Scan the barcode on the product before kitting\",\n \"sub_actions\": []\n },\n {\n \"order\": 2,\n \"work_order_action_type_id\": 2,\n \"attachments\": [],\n \"data\": null,\n \"instructions\": \"Package items according to kit specifications\",\n \"sub_actions\": [\n {\n \"order\": 1,\n \"work_order_action_type_id\": 3,\n \"attachments\": [\n {\n \"id\": \"photo-001\",\n \"name\": \"completed-kit-photo\"\n }\n ],\n \"data\": null,\n \"instructions\": \"Take a photo of the completed kit\"\n }\n ]\n }\n ],\n \"end_kitted_inventory_id\": 42,\n \"fulfillment_center_id\": 1,\n \"line_items\": [\n {\n \"inventory_id\": 101,\n \"quantity\": 10\n }\n ],\n \"quantity\": 10,\n \"workorder_type\": \"Kitting\",\n \"lot_date\": \"2024-01-15T09:00:00+00:00\",\n \"lot_number\": \"LOT-2024-001\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift default import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "actions": [ [ "order": 1, "work_order_action_type_id": 1, "attachments": [], "data": , "instructions": "Scan the barcode on the product before kitting", "sub_actions": [] ], [ "order": 2, "work_order_action_type_id": 2, "attachments": [], "data": , "instructions": "Package items according to kit specifications", "sub_actions": [ [ "order": 1, "work_order_action_type_id": 3, "attachments": [ [ "id": "photo-001", "name": "completed-kit-photo" ] ], "data": , "instructions": "Take a photo of the completed kit" ] ] ] ], "end_kitted_inventory_id": 42, "fulfillment_center_id": 1, "line_items": [ [ "inventory_id": 101, "quantity": 10 ] ], "quantity": 10, "workorder_type": "Kitting", "lot_date": "2024-01-15T09:00:00+00:00", "lot_number": "LOT-2024-001" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/Experimental/kitting:create")! 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() ```