Group Boxes

A box is a group of items from some shop that could fit into one physical box.

Box resource fields

  • package_type [string] - Describe the physical container of the box, e.g. the size of the box, envelope or tube.
  • length [length††] - The length of this container. The length is normally the longest dimension of the container.
  • width [length††] - The width of this container.
  • height [length††] - The height of this container.
  • weight [weight‡‡] - The weight of this container. If not specified, the weight will be calculated as the total weight of the items in the box based on their unit weights.
  • ship_cost [money‡] - The shipping and handling of this box.
  • shipper_release [boolean] - Whether shipper release should be active for this box.
  • insured_value [money‡] - The value of this box for insurance purposes.
  • insurance_type [string] - Type of insurance.
  • declared_value [money‡] - The value of this box for customs purposes.
  • tracking_number [string] - The tracking number of the current box. The tracking number is an alphanumeric string assigned by the carrier.
  • confirmation_type [string] - Delivery confirmation type for this box. Choices are “none”, “no_signature_required”, “signature_required”, “adult_signature_required” and “indirect_signature_required”.
  • description [string] - A human readable description of this container type.
  • cod [string] - A Collect on Delivery specification for the box.
  • cod_value [money‡] - The amount to be collected on delivery for this package.
  • saturday_delivery [boolean] - Whether saturday delivery should be used for this box.
  • delivered_at [datetime]† - the time the box was delivered.
  • updated_at (read only) [datetime]† - the time the box was updated in ReadyCloud.
  • created_at (read only) [datetime]† - the time the box was created in ReadyCloud.
  • packaging - Package used for shipping this box, for more info refer to packaging documentation.
  • items - Items meant to go in the current box, for more info refer to item documentation.
  • custom_fields - A custom field is a name-value pair for storing additional data, for more info refer to box custom field documentation.
  • shipping_docs - Shipping documents is a printable files contains necessary documents for the shipping process, for more info refer to box shipping docs documentation.
  • tracking - Tracking info of specific box, provided by ReadyCloud for every shipped box.

- the expected format is an ISO-8601 formatted string, with timezone. If timezone is missing, UTC is assumed. Microseconds are parsed and saved if provided, but not required. Sample: 2019-11-22T09:51:06.120606+00:00.

- the expected format is a string with decimal value and ISO-4127 currency code is expected. Sample: 123.43 USD.

†† - the expected format is a string with decimal value and a unit of measure of the following (mm, cm, in, ft, m) is expected. Sample: 68.43 cm.

‡‡ - the expected format is a string with decimal value and a unit of measure of the following (lbs, g, kg, mg, oz) is expected. Sample: 454.34 g.

Boxes collection

GET

Retrieve list of boxes of specific order

GET /orgs/{org_pk}/orders/{order_pk}/boxes/

Example request:

curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "cod": "cash",
            "cod_value": "95.00 USD",
            "confirmation_type": "signature_required",
            "created_at": "2014-10-10T06:49:50.288000Z",
            "custom_fields": {
                "Check": {
                    "value": "21"
                },
                "Export": {
                    "value": "22"
                }
            },
            "declared_value": "88.00 USD",
            "delivered_at": "2014-10-10T06:49:50Z",
            "description": "Green widget",
            "height": "10.0000 m",
            "insurance_type": null,
            "insured_value": "104.00 USD",
            "items": [
                {
                    "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
                }
            ],
            "length": "10.0000 m",
            "package_type": null,
            "packaging": null,
            "saturday_delivery": true,
            "ship_cost": "124.00 USD",
            "shipper_release": true,
            "shipping_docs": [],
            "tracking": [],
            "tracking_number": "EJ958088694US",
            "updated_at": "2015-08-13T09:33:07Z",
            "url": "/api/v2/orgs/1/orders/1/boxes/1/",
            "weight": "29.0000 g",
            "width": "10.0000 m"
        },
        {
            "cod": "cashiers_ck_or_mo",
            "cod_value": "69.00 USD",
            "confirmation_type": "signature_required",
            "created_at": "2014-10-10T06:49:50.291000Z",
            "custom_fields": {
                "Check": {
                    "value": "24"
                },
                "Gift": {
                    "value": "23"
                }
            },
            "declared_value": "72.00 USD",
            "delivered_at": "2014-10-10T06:49:50Z",
            "description": "Blue widget",
            "height": "10.0000 m",
            "insurance_type": null,
            "insured_value": "106.00 USD",
            "items": [
                {
                    "url": "/api/v2/orgs/1/orders/1/boxes/2/items/2/"
                }
            ],
            "length": "10.0000 m",
            "package_type": null,
            "packaging": null,
            "saturday_delivery": true,
            "ship_cost": "107.00 USD",
            "shipper_release": true,
            "shipping_docs": [],
            "tracking": [],
            "tracking_number": "1Z12345E0390515214",
            "updated_at": "2015-08-13T09:33:07Z",
            "url": "/api/v2/orgs/1/orders/1/boxes/2/",
            "weight": "100.0000 g",
            "width": "10.0000 m"
        }
    ]
}

POST

Create new box for specific order

POST /orgs/{org_pk}/orders/{order_pk}/boxes/

  • Attributes:
  • cod: “none” (string) - none, cash, cashiers_check_money_order, personal_check_cashier_check_money_order
  • confirmation_type: “none” (string) - none, no_signature_required, signature_required, adult_signature_required

Example request:

curl -iL --request POST -H "Content-Type: application/json" --upload-file data.json "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "cod": "cash",
    "cod_value": "95.00 USD",
    "custom_fields": {
        "Check": {
            "value": "21"
        },
        "Customer special description": {
            "type": "text/html",
            "value": "<p>Do not try this at home</p>"
        },
        "Gift": {
            "value": "An ice cream"
        }
    },
    "declared_value": "88.00 USD",
    "delivered_at": "2014-10-10T06:49:50Z",
    "description": "Green widget",
    "height": "10.000 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "code": "ES-4335-64667-7565",
            "commodity_code": "C-1",
            "created_at": "2015-05-14T09:59:44.290553Z",
            "description": "Window cleaner refill.",
            "export_type_code": "SIM",
            "image_link": "http://www.test.com/logo.png",
            "kind": "goods",
            "link": "http://www.test.com/item",
            "origin_country_code": "US",
            "part_number": "PN-3",
            "pick_location": "Some location",
            "preference_criteria_code": "Criteria-5",
            "producer_info_code": "No[2]",
            "quantity": 3,
            "scheduleb_commodity_code": "SCC-5",
            "unit_price": "88.00 USD",
            "unit_weight": "29.00 g"
        }
    ],
    "length": "10.000 m",
    "package_type": "Large 2.1x",
    "saturday_delivery": true,
    "ship_cost": "124.00 USD",
    "shipper_release": true,
    "tracking_number": "EJ958088694US",
    "weight": "29.00 g",
    "width": "10.000 m"
}

Response 201 (application/json):

{
    "cod": "cash",
    "cod_value": "95.00 USD",
    "confirmation_type": null,
    "created_at": "2015-08-13T09:33:07Z",
    "custom_fields": {
        "Check": {
            "value": "21"
        },
        "Customer special description": {
            "type": "text/html",
            "value": "<p>Do not try this at home</p>"
        },
        "Gift": {
            "value": "An ice cream"
        }
    },
    "declared_value": "88.00 USD",
    "delivered_at": "2014-10-10T06:49:50Z",
    "description": "Green widget",
    "height": "10.0000 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/3/items/3/"
        }
    ],
    "length": "10.0000 m",
    "package_type": "Large 2.1x",
    "packaging": null,
    "saturday_delivery": true,
    "ship_cost": "124.00 USD",
    "shipper_release": true,
    "shipping_docs": [],
    "tracking": [],
    "tracking_number": "EJ958088694US",
    "updated_at": "2015-08-13T09:33:07Z",
    "url": "/api/v2/orgs/1/orders/1/boxes/3/",
    "weight": "29.0000 g",
    "width": "10.0000 m"
}

Box

GET

Retrieve details of specific box

GET /orgs/{org_pk}/orders/{order_pk}/boxes/{box_pk}/

Example request:

curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "cod": "cash",
    "cod_value": "95.00 USD",
    "confirmation_type": "signature_required",
    "created_at": "2014-10-10T06:49:50.288000Z",
    "custom_fields": {
        "Check": {
            "value": "21"
        },
        "Export": {
            "value": "22"
        }
    },
    "declared_value": "88.00 USD",
    "delivered_at": "2014-10-10T06:49:50Z",
    "description": "Green widget",
    "height": "10.0000 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
        }
    ],
    "length": "10.0000 m",
    "package_type": null,
    "packaging": null,
    "saturday_delivery": true,
    "ship_cost": "124.00 USD",
    "shipper_release": true,
    "shipping_docs": [],
    "tracking": [],
    "tracking_number": "EJ958088694US",
    "updated_at": "2015-08-13T09:33:07Z",
    "url": "/api/v2/orgs/1/orders/1/boxes/1/",
    "weight": "29.0000 g",
    "width": "10.0000 m"
}

PATCH

Update specific box

PATCH /orgs/{org_pk}/orders/{order_pk}/boxes/{box_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/boxes/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "cod": "cashiers_check_money_order",
    "custom_fields": {
        "Box Color": {
            "value": "Pinky white"
        },
        "Check": {
            "value": "-"
        },
        "Customer icon": {
            "type": "image/png",
            "value": "Q3VzdG9tZXIgaWNvbg==",
            "encoding": "base64"
        },
        "Export": {
            "value": "To Africa"
        }
    },
    "height": "12.2 ft",
    "weight": "2.0 oz",
    "width": "10.4 ft"
}

Response 200 (application/json):

{
    "cod": "cashiers_ck_or_mo",
    "cod_value": "95.00 USD",
    "confirmation_type": "signature_required",
    "created_at": "2014-10-10T06:49:50.288000Z",
    "custom_fields": {
        "Box Color": {
            "value": "Pinky white"
        },
        "Check": {
            "value": "-"
        },
        "Customer icon": {
            "type": "image/png",
            "value": "Q3VzdG9tZXIgaWNvbg==",
            "encoding": "base64"
        },
        "Export": {
            "value": "To Africa"
        }
    },
    "declared_value": "88.00 USD",
    "delivered_at": "2014-10-10T06:49:50Z",
    "description": "Green widget",
    "height": "3.7186 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
        }
    ],
    "length": "10.0000 m",
    "package_type": null,
    "packaging": null,
    "saturday_delivery": true,
    "ship_cost": "124.00 USD",
    "shipper_release": true,
    "shipping_docs": [],
    "tracking": [],
    "tracking_number": "EJ958088694US",
    "updated_at": "2015-08-13T09:33:07Z",
    "url": "/api/v2/orgs/1/orders/1/boxes/1/",
    "weight": "56.6990 g",
    "width": "3.1699 m"
}

DELETE

Delete specific box

DELETE /orgs/{org_pk}/orders/{order_pk}/boxes/{box_pk}/

Response 204 (application/json)

Box custom fields

GET

Retrieve full custom fields data

GET /orgs/{org_pk}/orders/{order_pk}/boxes/{box_pk}/custom-fields/{field_name}/

Example request:

curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/1/custom-fields/ENDICIA_LABEL/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "name": "ENDICIA_LABEL",
    "value": "there is some data",
    "type": "text/plain",
    "encoding": null
}