OS1 Services
Container
25 min
introduction to containers in the context of logistics, a container is a physical component with a unique id it is the smallest entity unit to represent a shipment in other words, a container is an identifier of one or more physical boxes (or /#what is an item ), including the containers themselves all physical items within a container are identified by their individual scannable ids externally but they all also share the container’s scannable id every container has its own /#lifecycle of a container and set of /#attributes of a container the process of grouping multiple containers together into one container is called /#containerization ; the opposite of this is de containerization in the event that a container is added to another container, the relationship becomes a parent child relationship in this case, the container which is housing the other container is the parent a container might or might not have children a container marked as a leaf container will only contain items in it moreover, a container can be automatically or manually disposed of if required before diving into the types of containers, let's understand what an item is what is an item? an item is an atomic (indivisible) physical object that does not contain any items or objects within an item might or might not have a tracking id an item can have the following properties name name of the item (example microfibre reversible quilt blanket) description a short description of the item (example microfibre reversible quilt blanket for a single bed (120 gsm) in walnut brown color) cost total money that you have to pay for the item amount (float with 2 precision points) & currency (string) quantity the total number of items (default value 1) measurement value a number quantifying measurement unit a unit of measurement (cm/m/l/ml) for a quick start guide on creating containers, see https //docs getos1 com/integrate with containers types of container containers are the structures that store various items that need to be moved from point a to point b using some of the container types are bag package pallet trolley box the platform tenant has the option to modify the custom attributes of the default container types and/or create additional container types in configurations, the tenant will need to define the size(s) that each container type can take and also if the particular container is reusable creating a container type to create a container type, call the https //docs getos1 com/reference/create a new container type endpoint and pass the following parameters in the request body true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 🚧 note note after a container type is created it cannot be deleted and its name and isleaf attributes are immutable request bodies are specified in json format the following examples show a request body for creating a container type and a request body for updating a container type create container type { "name" "bag", "isleaf" false, "allowedparent" { "oneof" \[ "trolley" ], "not" \[ "bag" ] }, { "ttl" "99d", "callback" { "url" "https //examplecallbackurl com", "meta" { "key1" "post ptp type"// optional meta object can not exceed 256 bytes } } } "entitycode" "e 0001" } update container type { "allowedparent" { "oneof" \[ "bag" ], "not" \[ "box" ] }, { "callback" { "url" "https //examplecallbackurl com", "meta" { "key1" "post ptp type"// optional meta object can not exceed 256 bytes } } } } attributes of a container attributes of a container can be divided into one of the following categories base these are the attributes mandated by the platform for the container some of these attributes are mandatory custom these are the attributes that the tenant defines for the containers, to enhance their usability tenants can define custom validations, and also specify for them to be indexed (if it is to be used in filtering apis) or non indexed in the case of a leaf container, custom will have a mandatory attribute named items and non leaf containers will not be allowed to have this attribute true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 📘 note note attributes such as the capacity of a container, or container temperature controlled, while essential to certain businesses, are not required to define a container, and hence they have not been listed under base attributes the attributes can be defined in the custom attributes section by the tenant if needed creating a container to create a container of a particular container type, call the https //docs getos1 com/reference/create a container endpoint and pass the following parameters in the request body true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type request bodies are specified in json format the following examples show a request body for creating a container and a request body for updating a container create container { "trackingdetails" \[ { "operator" "worldlogistics", "trackingid" "lm691328537cn", "isprimary"\ false } ], "items" \[ { "name" "shirt", "cost" { "unit" { "amount" 10, "currency" "usd" }, "total" { "amount" 100, "currency" "usd" }, "quantity" { "value" 10, "unit" "kg" } } } ], "attributes" { "color" "black" }, "isreusable"\ false, "ishazmat"\ false, { "callback" { "url" "https //examplecallbackurl com", "meta" { "key1" "post ptp type"// optional meta object can not exceed 256 bytes } } } } update container { "attributes" { "color" "red", "capacity weight max" 77 }, "trackingdetails" \[ { "operator" "nationallogistics", "trackingid" "pv691328537xd" } ], "isleaf"\ false } creating containers in a batch batch processing helps to create and update the containers in the batch batch processing supports two methods to supply the container data json csv file upload to create containers in batch, call the https //docs getos1 com/reference/create container in batches endpoint to update containers in batch, call the https //docs getos1 com/reference/perform update operation on container in batches endpoint attributes for batch request true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 📘 note note the items marked ( ) are mandatory attributes required while creating the containers via batch processing the request bodies are specified in json format the following examples show request bodies for creating and updating containers in batches create containers in batch { "payload" \[ { "refid" "123", "trackingdetails" \[ { "operator" "amazon", "trackingid" "132121232423232", "isprimary" false } ], "attributes" { "weight" 30 } }, { "refid" "456", "trackingdetails" \[ { "operator" "myntra", "trackingid" "99", "isprimary" false } ], "attributes" { "weight" 30 } } ] } update containers in batch { "payload" \[ { "containerid" "batch 3fe393b3 94d6 4fe6 b6e3 xxxxxxxxx", //use actual containerid "data" { "trackingdetails" \[ { "operator" "mumbai", "trackingid" "1321212324232327", "isprimary" false } ], "attributes" { }, "ishazmat" false, "iscontainerizable" true } } ] } 👍 container batch processing a container can be created and updated in batch using https //docs getos1 com/reference/create container in batches here are the https //github com/os1 logistics/bulk upload reference templates/tree/main/container files for batch creation & updation of containers creating custom attributes custom attributes can be created by specifying the following parameters to create custom attributes for a container, call the https //docs getos1 com/reference/update core attributes configurations for a container type and pass the following parameters in the request body custom attributes custom attributes learn about docid\ joymsnhaszoobkikup5ow true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type request bodies are specified in json format the following examples show a request body for creating a container and a request body for updating a container { "attributes" \[ { "name" "capacity", "datatype" "string", "description" "volume attribute", "tags" \[ "volume", "quantity" ], "indexed" true, "isreadpublic" false, "defaultvalue" "four", "validation" { "range" { "min" 3, "max" 100 }, "valueoneof" \[ "bag","box" ], "required" false }} ], { "callback" { "url" "https //examplecallbackurl com", "meta" { "key1" "post ptp type"// optional meta object can not exceed 256 bytes } } } } 📘 important note regarding custom attribute creation important note regarding custom attribute creation if the attribute is already defined for the container type, the validation rules are updated if the attribute is not defined for the container type, it is added as a new core attribute for the container type on successful execution of the call, all updates including changes in data type take effect immediately for the container type lifecycle of a container the lifecycle depicts the current status of a container a container typically can move between different states and substates, basis the workflows set in the application using it the platform will provide a default of four states for a container created specifies the creation of a container the system also generates a unique container id for the container at this time opened signifies readiness of container to begin containerization operations (i e addition or removal of other containers/packages/boxes/items) a child container cannot be “opened” if the parent container is “closed” closed signifies termination of the containerization process; at this point, no further containers/packages/boxes/items may be added to the container a parent container cannot be “closed” if a child container is “opened” completed end of the lifecycle of a container when a container is de containerized, the status of the container will automatically shift to this state 👍 info info https //docs getos1 com/state machine provides the tenant an option to introduce sub states under each of the states and the rules governing the corresponding state transitions containerization all physical items in a container can be identified by their individual tracking ids but also share the container’s tracking id the process of grouping together boxes (or items or containers) into a container is called containerization ; the opposite of this is de containerization in the event that a container is added to a container, the relationship will be a parent child relationship with the largest container containing all other containers (and their constituents) being the parent all operations performed on the parent container are automatically inherited by the child containers (e g all scan events on the parent container are automatically propagated to the child containers) conditions for containerization parent container state should be opened the child container state should be closed parent container should have isleaf property as false child container should have iscontainerizable as true tenant level configurability and extensibility the tenants have the following configurations available to them attributes tenants have full control over defining container types and the respective sizes for the containers for example, a bag can be 3x3 ft and 6x6 ft they can also specify if a particular container type is reusable tenants can define a set of custom indexed and non indexed attributes for every container type tenants can define the duration after which they would like to move inactive containers to the data warehouse (default 72 hours) the tenant can define whether the container is a leaf container (by using the isleaf base attribute) if the tenant defines a leaf container, further, he has to define the “items” attribute as a https //docs getos1 com/custom attributes ownership lifecycle tenants have the option to define a list of event names for transition tenants can define sub states (i e , custom lifecycle) for a particular container type for each state, tenants have the option to define a set of sub states and the corresponding rules for state transition as defined in the https //docs getos1 com/state machine bulk containerization/decontainerization grouping together containers into a container the container that goes inside another container is said to be containerized attributes for bulk containerization bulk containerization/decontaizerization can be done by specifying the below given attributes use the https //docs getos1 com/reference/zbfi containerizationdecontainerization of the container api endpoint true 0,0,197left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 📘 note note mandatory fields for bulk containerization/decontainerization if parantid is unavailable, then we create the parent instance and for the parent instance, these attributes are required else these are optional check how to implement docid\ wtyhmdfkzpvpwetxlcziu