Methods
- delivery.search
- delivery.create
- delivery.labels
- delivery.update
- delivery.close
- delivery.commit
- delivery.cancel
- delivery.void
Entity Properties
- Delivery
- Delivery Item
- Delivery Label
- Delivery Label Package
- Delivery Label Address
- Container
- Container Content
- Exception
delivery.search
delivery.search(null|object $filters, array $options = [])
Retrieve list of deliveries. Filtration could be applied.
Parameters
null
- Retrieve list of all deliveries.object
- Retrieve list of deliveries using specified Search Filters. Allowed properties for filtering: “delivery_id”, “increment_id”, “warehouse_id”, “merchant_ref”, “merchant_status”, “total_skus”, “delivery_type”, “status”, “sender_name”, “expected_delivery”, “sender_ref”, “sender_ref_alt”, “created_at”, “updated_at”, “comments”, “tracking_numbers”.
null
- No options will be applied.object
- Apply specified Search Options.
Return Value
An array of objects. Each object will contain Delivery Properties.Example Request
Get delivery for one delivery id:Request
Example Response
Response
Error Codes
code | message |
---|---|
101 | Invalid filters given. Details in error message. |
delivery.create
delivery.create(number $deliveryType, object $data, null|array $items = null)
Create delivery.
Parameters
Delivery type. Allowed: “asn”, “rma”, “other”.
Delivery data. See Delivery Properties.
null
- Create delivery without items.array
- Array of objects with two properties: “sku” and “qty”.
Return Value
Delivery information.Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
107 | Error creating the delivery. Details in error message. |
delivery.labels
delivery.labels(string $incrementId, null|array $fields = [])
Retrieve list of labels for the given delivery.
Parameters
Delivery increment id
null
- Basic label data.array
- Array of fields. Allowed: “packages”, “destination_address”, “origin_address”
Return Value
An array of objects. Each object will contain Delivery Label Properties.Example Request
Get labels for the delivery:Request
Example Response
Response
Error Codes
code | message |
---|---|
100 | Requested delivery does not exist. |
delivery.update
delivery.update(string $incrementId, array|null $data = null, array|null $addItems = null, array|null $removeItems = null)
Update delivery attributes. Add products. Remove products.
Parameters
Increment ID.
Delivery data. See Delivery Properties.
null
- Update delivery without adding items.array
- Array of objects with two properties: “sku” and “qty”.
null
- Update delivery without removing items.array
- Array of objects with two properties: “sku” and “qty”.
Return Value
true
if delivery was successfully updated.
Example Request
Request
Example Response
Response
delivery.close
delivery.close(string $incrementId)
Close a delivery.
Parameters
The “Increment ID” property.
Return Value
true
if delivery inventory was successfully closed.
Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
115 | Delivery with the specified ID cannot be closed. Details in the error message. |
delivery.commit
delivery.commit(string $incrementId, boolean $close = FALSE)
Commit delivery inventory.
Parameters
The “Increment ID” property.
true
to close the delivery.Return Value
true
if delivery inventory was successfully committed.
Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
113 | Delivery with the specified ID cannot be committed. Details in the error message. |
delivery.cancel
delivery.cancel(string $incrementId)
Cancel delivery.
Parameters
The “Increment ID” property.
Return Value
true
if delivery was successfully canceled.
Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
112 | Delivery with the specified ID cannot be canceled. Details in the error message. |
delivery.void
delivery.void(string $incrementId)
Cancel delivery.
Parameters
The “Increment ID” property.
Return Value
true
if delivery was successfully voided.
Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
114 | Delivery with the specified ID cannot be voided. Details in the error message. |
Entity Properties
Delivery Properties
Property Translations: API to UI
API | ASN | RMA | Other |
---|---|---|---|
sender_name | Supplier | Customer Name | Sender |
sender_ref | Supplier Invoice Ref | (deprecated, use tracking_numbers ) | Sender Ref 1 |
sender_ref_alt | Supplier Order Ref | Merchant Order # | Sender Ref 2 |
tracking_numbers | Tracking Numbers | Tracking Numbers | Tracking Numbers |
merchant_ref | Merchant Ref | Merchant RMA # | Merchant Ref |
merchant_status | Merchant Status | Merchant Status | Merchant Status |
expected_delivery | Expected Delivery Date | Authorization Date | Expected Delivery Date |
The internal delivery ID.
The internal warehouse ID.
The “Increment ID” property.
The “Delivery Type” property. Allowed: “asn”, “rma”, “other”.
The “State” property. Allowed: “new”, “processing”, “putting_away”, “pending_commit”, “complete”, “canceled”.
The “Status” property. Allowed: “new”, “accepting”, “accepted”, “ready_to_process”, “processing”, “processing_exception”, “processed”, “putting_away”, “put_away”, “complete”, “canceled”, “void”.
The “Progress” property. Number from 0 to 100.
Total amount of SKUs.
The “Sender Name” property.
The “Carrier Name” property.
The “Expected Delivery” property.
The “Delivered At” property.
The “Delivered At” property.
The “Processed At” property.
The “Put-Away At” property.
The “Completed At” property.
The “Comments” property.
The “Merchant Reference” property. Uniqueness based on this field is enforced so an error will be given if a delivery with the same merchant_ref already exists.
The “Merchant Status” property.
The “Sender Reference” property. Do not use this field for RMAs.
The “Sender Reference Alt” property.
The “Tracking Numbers” property.
Number of containers.
Number of labels.
The “Total Container Weight” property.
The unit of measure used for
total_container_weight
. See: Weight Units.The “Total Product Weight” property.
The unit of measure used for
total_product_weight
. See: Weight Units.The “Special Requirements” property.
Determines whether inventory will be commited automatically upon put-away completion. 0 - Disabled, 1 - Enabled, 2 - Use default from config
Determines whether the delivery will be closed automatically upon acceptance of the last container. 0 - Disabled, 1 - Enabled, 2 - Use default from config
The “Created At” property.
The “Updated At” property.
Array of delivery items. See Delivery Item Properties.
Array of containers. See Container Properties.
Array of exceptions. See Exception Properties.
Delivery Item Properties
The internal delivery item ID.
The internal delivery ID.
The internal product ID.
The quantity that was set when the delivery was created or edited.
The quantity that is expected to be received in the future.
The “Received” quantity.
The “Shortage” quantity.
The “Overage” quantity.
The “Processed” quantity.
The “Put-Away” quantity.
The “Committed” quantity.
The “SKU” property.
An external item reference which may be up to 32 characters.
Delivery Label Properties
The internal delivery label ID.
The internal delivery ID.
The internal warehouse ID.
The “Status” property. Allowed: “valid”, “void”.
See the Shipping Methods document for a reference. Is not optional.
The “Created At” property in ISO 8601 format.
The “Updated At” property in ISO 8601 format.
Array of delivery label packages. See Delivery Label Package Properties.
Destination Address. See Delivery Label Address Properties.
Origination Address. See Delivery Label Address Properties.
Delivery Label Package Properties
The ID of the warehouse associated with the package.
The internal delivery label ID.
Carrier code.
The weight of the package.
The unit of measure used for
weight
. See: Weight Units.The
length
, width
, and height
of the package.The unit of measure used for
length
, width
, and height
in dimensions
. See: Length Units.An array of tracking objects. The “number” property contains the tracking number. The “description” property contains the shipping method name.
An array of items contained in the package.
delivery_item_id
is the unqiue identifier of the related delivery item. sku
is the package item’s SKU. quantity
is the quantity of the item in the package.Delivery Label Address Properties
The “First Name” property.
The “Last Name” property.
The “Company” property.
The street address. Multi-line street addresses will be separated by a newline (
\n
) character. Only two address lines are supported.The “City” property.
The “Region” property.
The “Postal Code” property. Pass as a string to prevent leading 0s from being dropped.
The “Country” property.
The “Classification” property. Allowed: “res” - residential, “com” - commercial, “po” - post office, “mil” - military, “unk” - unknown.
Flag whether address is valid.
The “Telephone” property.
The “Email” property.
Container Properties
The internal container ID.
The internal delivery ID.
The “Container Type ID” property.
The “Damage Type” property. Allowed: “none”, “noted”, “unnoted”.
The “Weight Discrepancy” property. Allowed: “none”, “shortage_noted”, “shortage_unnoted”, “overage”, “unknown”.
The “Tare Weight” property.
The unit of measure used for
tare_weight
. See: Weight Units.The “Weight” property.
The unit of measure used for
weight
. See: Weight Units.The “Weighed At” property.
The “Weighed By” property.
Array of “content” objects. See Container Content Properties.
The “Notes” property.
Container Content Properties
The internal delivery item ID.
The “Quantity Counted” property.
The “Quantity Shortage” property.
Exception Properties
The internal delivery exception ID.
The internal delivery ID.
The internal delivery item ID.
The internal container ID.
The “Status” property. Allowed: “new”, “pending”, “approved”, “rejected”, “void”.
The “Sign” property. Allowed: “-1” - shortage, “1” - overage.
The “Reason” property. Allowed: “overage_counted”, “overage_unexpected”, “shortage_damaged”, “shortage_missing”.
The “Comment” property.
The “Quantity” property.