A delivery is an inbound shipment of your product to RSF. It could be an “ASN” (Advanced Shipment Notification), an “RMA” (Return Merchandise Authorization) or an “Other Delivery” (anything other than an ASN or RMA). They are all processed similarly regardless of which type of delivery is specified. Processing involves the general stages of “Accepting” the container from the carrier and weighing it, “Processing” the containers to align what was expected with what was actually received, “Putting Away” the processed inventory and “Committing” the put-away inventory to the available inventory. “Accepting” stage results with “Accepted” or “Ready To Process” delivery status. If the delivery has items on it before it is accepted, “Ready To Process” status is set and “Accepted” status skipped. Most of these steps happen automatically depending on the merchant’s configuration and whether or not there are any exceptions (discrepancies between expected and received).Documentation Index
Fetch the complete documentation index at: https://docs.shipstream.io/llms.txt
Use this file to discover all available pages before exploring further.
Methods
- delivery.search
- delivery.create
- delivery.labels
- delivery.gallery
- delivery.update
- delivery.close
- delivery.commit
- delivery.cancel
- delivery.void
Entity Properties
- Delivery
- Delivery Item
- Delivery Item Lot
- Delivery Label
- Delivery Label Package
- Delivery Label Address
- Container
- Container Content
- Container Content Lot
- Exception
- Gallery
- Photo
- Device Info
- Media Info
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”, “expected_containers”, “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.gallery
delivery.gallery(string $incrementId, string|null $updatedSince = null)
Retrieve the gallery structure and photos for a delivery, including all child galleries for containers, container items, exceptions.
Parameters
The delivery increment ID.
Optional. Filter galleries by update date. Only galleries updated since this date will be returned. Format: “YYYY-MM-DD HH:MM:SS”.
Return Value
An object containing Gallery Properties for the delivery gallery, with nested children galleries and associated photos.Example Request
Get complete gallery structure for a delivery:Request
Example Response
Response
Example Request with Date Filter
Filter galleries by date to get only galleries updated since a specific date:Request
Example Response with Date Filter
Response
Example Request for Empty Gallery
Get gallery structure for a delivery without any photos:Request
Example Response for Empty Gallery
Response
Error Codes
| code | message |
|---|---|
| -32100 | 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 expected to arrive with the delivery. Used to track reconciliation against
num_containers as the warehouse accepts them.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 in ISO 8601 format. If not available,
null is returned.The “Updated At” property in ISO 8601 format. If not available,
null is returned.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 1024 characters.
Array of per-lot quantity breakdowns for this item. See Delivery Item Lot Properties. Present only for lot-tracked products; units received without a lot are not decomposed.
Delivery Item Lot Properties
Each entry breaks down the Delivery Item quantities by lot. Lot metadata (lot number, expiration date, etc.) is not included here — resolvelot_id via inventory.lots when needed.
The lot ID.
The “Received” quantity attributable to this lot.
The “Shortage” quantity attributable to this lot.
The “Overage” quantity attributable to this lot.
The “Processed” quantity attributable to this lot.
The “Put-Away” quantity attributable to this lot.
The “Committed” quantity attributable to this lot.
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.
Array of per-lot counted/shortage breakdowns for this container content. See Container Content Lot Properties. Present only for lot-tracked products.
Container Content Lot Properties
Each entry breaks down the parent Container Content quantities by lot.The lot ID.
The “Quantity Counted” attributable to this lot within this container content.
The “Quantity Shortage” attributable to this lot within this container content.
Exception Properties
The internal delivery exception ID.
The internal delivery ID.
The internal delivery item ID.
The internal container ID.
The internal lot ID the exception is scoped to, or
null for exceptions that are not lot-specific.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.
Gallery Properties
The internal gallery ID.
0 indicates no gallery exists for this entity.The type of entity this gallery belongs to. Allowed: “delivery”, “delivery_container”, “container_item”, “delivery_exception”.
The internal ID of the entity this gallery belongs to.
The total number of photos in this gallery.
The timestamp when this gallery was last updated.
null if no photos have been added.Array of child galleries. See Gallery Properties.
Array of photos in this gallery. See Photo Properties.
Photo Properties
The URL to the original full-size photo.
The URL to the thumbnail version of the photo, resized to fit 250px × 250px.
Optional caption text for the photo.
Time and date in ISO 8601 format when the photo was taken. If not available,
null is returned.Information about the device used to take the photo. See Device Info Properties.
null if not available.Technical information about the photo file. See Media Info Properties.
The timestamp when the photo was uploaded to the system.
Device Info Properties
Information about the camera lens used.
The device model that took the photo.
The aperture setting used when taking the photo.
The focal length setting used when taking the photo.
Additional camera settings used when taking the photo.
The ISO setting used when taking the photo.
Information about flash usage when taking the photo.
The shutter speed used when taking the photo.
Media Info Properties
The processed file size in bytes.
The width of the processed image in pixels.
The height of the processed image in pixels.
The original file size in bytes.
Whether the original file was converted to a different format.
The width of the original image in pixels.
The processed file size formatted as a human-readable string (e.g., “502.3KB”, “2.4MB”).
The height of the original image in pixels.
The original filename when the photo was uploaded.
The filename after processing.
The original file size formatted as a human-readable string (e.g., “2.4MB”).