OS1 Services
...
Container
Integrate with Containers
How to: Create a Container
3min
for information about prerequisites, see integrate with containers docid\ v8jhivhg c9txkmpqsbxu to create a container, you call the create a container docid\ xfgfuj5wxiamplvvrsfhe endpoint and pass a container type as a path parameter in the endpoint call create container does not have any required parameters in the request body, meaning that you can create a container and update its attributes later by calling the update container endpoint for the purpose of this how to and containerization example, we show how to create a pallet that a is non leaf container, which can contain other containers, and a leaf container that can be containerized to create the non leaf pallet container, call the create container endpoint and pass a container type as a path parameter for this example, we used the container id shown in the how to create a container type topic, container 9b83fc9f decd 4a8d a6d1 2b496df0a1a5 your request body should be similar to the following { "trackingdetails" \[ { "operator" "worldlogistics", "trackingid" "132121232423200", "isprimary" false } ] } the response will look similar to the following and returns the container id as id in the data object { "data" { "id" "pallet\ de962de0 c0dd 531f 8d9b 7919f0d8c27b" }, "request" { "uri" "/core/api/v2/containers/pallet", "method" "post", "querystring" "{}", "body" { "trackingdetails" \[ { "operator" "world logistics", "trackingid" "432121232423200", "isprimary" true } ], "ishazmat" false, "iscontainerizable" true, "isreusable" false } } } leaf containers can be containerized or noncontainerizable to create containerizable containers, you must specify the iscontainerizable attribute in the response body and set it to true to create the leaf box container, call the create container endpoint and pass a container type as a path parameter for this example, we used the container id shown in the how to create a container type topic, container 582d435d 5af1 4442 a095 e9b729ff4020 your request body should look similar to the following { "trackingdetails" \[ { "operator" "worldlogistics", "trackingid" "432121232423232" } ], "items" \[ { "name" "pant/shirt", "code" "ps0001", "cost" { "unit" { "amount" 10 00, "currency" "us" }, "total" { "amount" 100 00, "currency" "us" } } } ], "iscontainerizable" true } the response will look similar to the following and returns the container id as id in the data object { "data" { "id" "pallet1 11dafb08 f309 5b1d 8d31 7761a75c99ee" }, "request" { "uri" "/core/api/v2/containers/boxtwo", "method" "post", "querystring" "{}", "body" { "trackingdetails" \[ { "operator" "worldlogistics", "trackingid" "432121232423232", "isprimary" true } ], "items" \[ { "name" "pant/shirt", "code" "ps0001", "cost" { "unit" { "amount" 10, "currency" "us" }, "total" { "amount" 100, "currency" "us" } } } ], "iscontainerizable" true, "ishazmat" false, "isreusable" false } } }