Group Shipping Documents

Shipping documents is a printable files contains necessary documents for the shipping process. You can upload document to ReadyCloud via multipart request.

Shipping documents collection

GET

Retrieve list of shipping documents of specific box

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

Example request:

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

Response 200 (application/json):

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "document": "/api/v2/orgs/1/documents/IB2FQBn7mJfCWD-s.jpg",
            "kind": "image",
            "purpose": "delivery report",
            "url": "/api/v2/orgs/1/orders/1/boxes/1/docs/1/"
        }
    ]
}

POST

Create new shipping document for specific box with multipart/form-data request

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

  • Request fields:
    • document - file with necessary document
    • kind - kind of a document
    • purpose - document purpose

Example request:

curl -iL -F "kind=label" -F "purpose=package label" -F document=@/path/to/file.jpg "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/1/docs/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
{
    "document": "<binary file data>",
    "kind": "label",
    "purpose": "package label"
}

Response 201 (application/json):

{
    "document": "/api/v2/orgs/1/documents/MJGczbn93Ax4Qh4g.jpg",
    "kind": "label",
    "purpose": "package label",
    "url": "/api/v2/orgs/1/orders/1/boxes/1/docs/2/"
}

Shipping document

GET

Retrieve details of specific shipping document

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

Example request:

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

Response 200 (application/json):

{
    "document": "/api/v2/orgs/1/documents/IB2FQBn7mJfCWD-s.jpg",
    "kind": "image",
    "purpose": "delivery report",
    "url": "/api/v2/orgs/1/orders/1/boxes/1/docs/1/"
}

PATCH

Update specific shipping document with multipart/form-data request

PATCH /orgs/{org_pk}/orders/{order_pk}/boxes/{box_pk}/docs/{doc_pk}/

  • Request fields:
    • document - file with necessary document
    • kind - kind of a document
    • purpose - document purpose

Example request:

curl -iL -F "purpose=for return shipping" -F document=@/path/to/new_file.jpg "https://www.readycloud.com/api/v2/orgs/1/orders/1/boxes/1/docs/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"
{
    "kind": "label",
    "purpose": "Important box label"
}

Response 200 (application/json):

{
    "document": "/api/v2/orgs/1/documents/IB2FQBn7mJfCWD-s.jpg",
    "kind": "label",
    "purpose": "Important box label",
    "url": "/api/v2/orgs/1/orders/1/boxes/1/docs/1/"
}

DELETE

Delete specific shipping document

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

Response 204 (application/json)