Zoey REST API reference ยท Interactive version: apidocs.zoey.com

Orders

Orders: Shipments

Comments

Add

POST https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/comment

Param Type Notes Required
shipmentIncrementId string The increment id of the Shipment. Yes
comment string The comment being added to the shipment. Yes
email boolean Notify the customer of the comment being added. No (default: false)
includeInEmail boolean Include the comment in the notification email. No (default: false)

Example request body:

{
    "shipmentIncrementId": "100000013",
    "comment": "This is my test comment.",
    "email": true,
    "includeInEmail": true
}

Tracking

Add

POST https://container-url.zoeysite.com/api/rest/sales2/orders/shipment_tracking

Example request body:

{
    "shipmentIncrementId": "100000020",
    "carrier": "ups",
    "title": "UPS",
    "trackNumber": "90210"
}

Example response (Add Tracking), HTTP 200:

"15"

Get Carriers

GET https://container-url.zoeysite.com/api/rest/sales2/orders/shipment_tracking_carriers

Get configured tracking shipment carriers.

Attachments

Add

POST https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/attachments

Example request body:

{
    "shipmentId": 344,
    "attachments": [
        {
            "file_name": "attachment_5.jpg",
            "file_mime_type": "image/png",
            "file_content": "iVBORw0KGgo..."
        }
    ]
}

Delete

DELETE https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/attachments

Example request body:

{
    "shipmentId": 345,
    "attachmentId": 10
}

Create

POST https://container-url.zoeysite.com/api/rest/sales2/orders/shipment

Creates a Shipment for the specified items.

** NOTE: ** All arguments need to be posted as they appear in the example. The arguments and the order they are in matter.

Param Notes
orderIncrementId The increment ID of the order to create the shipment for.
itemsQty Object key is itemId and the value is qty. (ex. { "311": "2", "312": "1" } Would ship 2 of order item 311 and 1 of order item 312) The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product. If an empty JSON object is posted then it will process ALL remaining items.
comment Message to send to create on shipment for customer to see. (Optional)
email Flag to send shipment email to customer on creation. Use value 1 to send
includeComment Flag to include comment on the email, if sent. Use value 1 to include.
tracking Array of TrackingData
shipmentData Extra shipment data as Object
shipmentData.base_shipping_amount Shipping amount in base currency

TrackingData

Param Notes
carrier_code Code for the shipment carrier used for tracking. A list is available using the Get Carriers method.
number Tracking Number
title Tracking Carrier title

Example request body:

{
    "orderIncrementId": "100002958",
    "itemsQty": {
        "60012": "1"
    },
    "comment": "Created By API",
    "email": "1",
    "includeComment": "1",
    "tracking": [],
    "extraData": {
        "attachments": [
            {
                "file_name": "attachment_5.jpg",
                "file_mime_type": "image/png",
                "file_content": "iVBORw0KGgo..."
            }
        ]
    }
}

Example response (Create), HTTP 200:

"100000020"

Void

POST https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/void

Voids a shipment.

Request Body

Example request body:

{
    "shipmentIncrementId": "100004841",
    "voidReason": "Testing void from the API."
}

Example response (Create), HTTP 200:

"100000020"

Get

GET https://container-url.zoeysite.com/api/rest/sales2/orders/shipment?id=100000249

Query parameters:

NameExampleNotes
id100000249Increment ID of shipment

Get All

GET https://container-url.zoeysite.com/api/rest/sales2/orders/shipments?include_comments=1&include_tracking=1

Query parameters:

NameExampleNotes
limit2Limit the amount of results returned. (Optional)
page1Paginate the limit. (Optional)
order[order_id]ASCUsed to sort by property key / direction. (Optional)
filters[order_id]41Used to filter results by property. (Optional)
filters[total_qty][gt]1Qty Filtering Example
include_comments1Include comments in the response. (Boolean Flag 1 or 0. Optional)
include_tracking1Include tracking in the response. (Boolean Flag 1 or 0. Optional)

Print

GET https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/print?id=100000003

Response

Key Type Description
file string A base64 encoded PDF.
filename string PDF file name.

Query parameters:

NameExampleNotes
id100000003Increment ID of shipment

Email

GET https://container-url.zoeysite.com/api/rest/sales2/orders/shipment/email?id=100000003

Query parameters:

NameExampleNotes
id100000003Increment ID of shipment