Packaging¶
A packaging definition is a reusable template for the size, shape and weight of packaging used when shipping.
For further information, please read the Packaging How-to.
Packaging collection¶
GET¶
Retrieve a list of packagings.
GET /orgs/{org_pk}/packaging/
Example request:
curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/packaging/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
Response 200 (application/json):
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"created_at": "2016-01-29T03:52:06Z",
"description": "Generic small packaging",
"height": "0.1500 m",
"length": "0.2000 m",
"name": "10x20x15",
"package_type": "Cardboard Thick",
"updated_at": "2016-01-29T03:52:06Z",
"url": "/api/v2/orgs/1/packaging/1/",
"weight": "140.0000 g",
"width": "0.1000 m"
},
{
"created_at": "2016-11-13T04:44:43Z",
"description": "",
"height": "0.3000 m",
"length": "0.3000 m",
"name": "30x30x30",
"package_type": "",
"updated_at": "2016-11-13T04:44:43Z",
"url": "/api/v2/orgs/1/packaging/2/",
"weight": "300.0000 g",
"width": "0.3000 m"
},
{
"created_at": "2016-11-13T04:44:43Z",
"description": "",
"height": "0.1000 m",
"length": "0.2000 m",
"name": "10x10x10",
"package_type": "",
"updated_at": "2016-11-13T04:44:43Z",
"url": "/api/v2/orgs/1/packaging/3/",
"weight": "100.0000 g",
"width": "0.1000 m"
}
]
}
POST¶
Create new packaging
POST /orgs/{org_pk}/packaging/
- Attributes:
- name: (string, required) - packaging name
- description: (string, optional) - packaging description
- height: (length measure, optional) - packaging height
- length: (length measure, optional) - packaging length
- weight: (weight measure, optional) - packaging weight
- width: (length measure, optional) - packaging width
- packaging_type: (string, optional) - packaging type
Example request:
curl -iL --request POST -H "Content-Type: application/json" --upload-file data.json "https://www.readycloud.com/api/v2/orgs/1/packaging/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
data.json:
{
"description": "Small packaging for fragile objects",
"height": "0.150 m",
"length": "0.200 m",
"name": "10x20x15",
"package_type": "Cardboard Thick",
"weight": "135.000 g",
"width": "0.1000 m"
}
Response 201 (application/json):
{
"created_at": "2016-01-29T03:52:06Z",
"description": "Small packaging for fragile objects",
"height": "0.1500 m",
"length": "0.2000 m",
"name": "10x20x15",
"package_type": "Cardboard Thick",
"updated_at": "2016-01-29T03:52:06Z",
"url": "/api/v2/orgs/1/packaging/2/",
"weight": "135.0000 g",
"width": "0.1000 m"
}
Packaging¶
GET¶
Retrieve details of specific packaging
GET /orgs/{org_pk}/packaging/{packaging_pk}/
Example request:
curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/packaging/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
Response 200 (application/json):
{
"created_at": "2016-01-29T03:52:06Z",
"description": "Generic small packaging",
"height": "0.1500 m",
"length": "0.2000 m",
"name": "10x20x15",
"package_type": "Cardboard Thick",
"updated_at": "2016-01-29T03:52:06Z",
"url": "/api/v2/orgs/1/packaging/1/",
"weight": "140.0000 g",
"width": "0.1000 m"
}
PATCH¶
Update specific packaging
PATCH /orgs/{org_pk}/packaging/{packaging_pk}/
Example request:
curl -iL --request PATCH -H "Content-Type: application/json" --upload-file data.json "https://www.readycloud.com/api/v2/orgs/1/orders/1/packaging/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
data.json:
{
"description": "Generic small packaging",
"weight": "140.000 g"
}
Response 200 (application/json):
{
"created_at": "2016-01-29T03:52:06Z",
"description": "Generic small packaging",
"height": "0.1500 m",
"length": "0.2000 m",
"name": "10x20x15",
"package_type": "Cardboard Thick",
"updated_at": "2016-01-29T03:52:06Z",
"url": "/api/v2/orgs/1/packaging/1/",
"weight": "140.0000 g",
"width": "0.1000 m"
}
DELETE¶
Delete specific packaging
DELETE /orgs/{org_pk}/packaging/{packaging_pk}/
Response 204 (application/json)