Container Service
Container
containerization/decontainerization of the container
1min
PUT
Grouping together container into a container. The container that goes inside another container is said to be containerized.
- containerType - The container type of the parent container ID that needs to be add in parent container.
PARAMETER | DESCRIPTION | TYPE | VALIDATION |
---|---|---|---|
parentId * | Field to represent container ID of the parent container. During the containerization process, this value is assigned to represent which container contains this container. | string | Example- box:9c9b1138-7cdd-11eb-9439-0242ac130002 |
childcontainerType * | Container type defined using container type configuration APIs. | string | pattern: It should match a through z or A through Z, inclusive (range).minLength: 3 maxLength: 64Example: bag |
childIds | Field to represent list of child container id's/ Scannable Id's to containese or decontainerize. Mandatory for containerization, optional for decontainerization | array | Example- ["box:9c9b1138-7cdd-11eb-9439-0242ac130002", "box:9c9b1138-7cdd-11eb-9439-0242ac130011"] |
decontainerizeAll | Flag to decontainerize all containers. If passed along with childIds, it will override childIds. | ||
action * | field to represent action to be performed on the container.field to represent action to be performed on the container. | ||
subState | closed subState to which the parent container will be transitioned after containerisation. Required in case of CONTAINERIZATION. | string | Example: closed |
trackingDetails | Field to represent tracking ID (such as AWB) for a container which is usually pasted on the container and used for scanning it. There can be multiple tracking IDs for a container, owned by different operators and hence it will be stored as a list. | ||
ㅤ↳operator * | Field to specify the owner of the tracking ID. | string | minLength: 3 maxLength: 64Example: Delhivery |
ㅤ↳trackingId * | string | minLength: 1 maxLength: 128Example: 132121232423232 | |
ㅤ↳isPrimary | It defines whether it is a primary tracking ID or not. If not defined we assume first tracking ID as primary tracking ID. | boolean | Default: false |
attributes | A map to provide values for the attributes defined in Container-type configuration APIs. | ||
items | List of items can be added into a container only if the container-type is a leaf. | ||
ㅤ↳name * | Name of the item. | string | minLength: 3 maxLength: 128Example: pant/shirt |
ㅤ↳code | Code of the item. | string | minLength: 3 maxLength: 128 |
ㅤ↳cost * | Cost of the item. | ||
ㅤㅤ↳unit | Represents unit price of the item. | ||
ㅤㅤㅤ↳amount | The value of the amount; accurate to three decimal places. | number | |
ㅤㅤㅤ↳currency | Currency of the price of the item. | string | |
ㅤㅤ↳total * | Represents total price of the item. | ||
ㅤㅤㅤ↳amount | The value of the amount; accurate to three decimal places. | number | |
ㅤㅤㅤ↳currency | Currency of the price of the item. | string | |
ㅤ↳quantity | |||
ㅤㅤ↳value | A number quantifying measurement. | integer | |
ㅤㅤ↳unit | Unit for measurement. | string | Enum: [cm, m, l, ml, nos, g, kg, mm] |
isHazmat | Represents whether this container can contain hazardous materials or not. | boolean | Default: false |
isContainerizable | Defines whether container can be put into other containers or not. | boolean | Default: true |
callback | Represents callback URL, which can be to notify status(success/failed) of API. | string | A valid URL. |
*This is required. | |||
HTTP Status Code Summary |
Code | Description |
---|---|
202 - Accepted | |
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | No valid API key provided. |
404 - Not Found | The requested resource doesn't exist. |
503 - Server Error | Something went wrong.. (These are rare.) |
Path Parameters
containerTypeName
string
*
Header Parameters
X-COREOS-REQUEST-ID
string
*
X-COREOS-TID
string
*
X-COREOS-ACCESS
string
*
X-COREOS-USERINFO
string
X-COREOS-ORIGIN-TOKEN
string
X-COREOS-CALLBACK-SECRET
string
Body Parameters
body
BulkContaineriseRequest
*
name
string
*
code
string
cost
cost
*
quantity
quantity
Responses
202
Containerization or decontainerization
ChildContainerResponse
data
object
request
Request
400
Bad Request
ErrorResponse
error
Error
request
Request
401
Unauthorized
ErrorResponse
error
Error
request
Request
404
Not Found
ErrorResponse
error
Error
request
Request
503
Server Error
ErrorResponse
error
Error
request
Request
Curl
JS
Ruby
Python
1curl --location --globoff --request PUT 'https://{tenantSubdomain}.io/core/api/v2/containers/{containerTypeName}/containerise' \
2--header 'Accept: application/json' \
3--header 'Content-Type: application/json' \
4--data '{
5 "name": "",
6 "cost": {}
7}'
Responses
202
400
401
404
503
1// Containerization or decontainerization
2{
3 "data": {
4 "id": "",
5 "operation": ""
6 },
7 "request": {
8 "uri": "",
9 "method": "",
10 "queryString": "",
11 "body": {}
12 }
13}
Updated 24 Aug 2023
Did this page help you?