Group Boxes

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

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.000 m",
            "insurance_type": null,
            "insured_value": "104.00 USD",
            "items": [
                {
                    "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
                }
            ],
            "length": "10.000 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.000 g",
            "width": "10.000 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.000 m",
            "insurance_type": null,
            "insured_value": "106.00 USD",
            "items": [
                {
                    "url": "/api/v2/orgs/1/orders/1/boxes/2/items/2/"
                }
            ],
            "length": "10.000 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.000 g",
            "width": "10.000 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.000 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/3/items/3/"
        }
    ],
    "length": "10.000 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.000 g",
    "width": "10.000 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.000 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
        }
    ],
    "length": "10.000 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.000 g",
    "width": "10.000 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.719 m",
    "insurance_type": null,
    "insured_value": "104.00 USD",
    "items": [
        {
            "url": "/api/v2/orgs/1/orders/1/boxes/1/items/1/"
        }
    ],
    "length": "10.000 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.699 g",
    "width": "3.170 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
}