> ## 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.

# Delivery

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).

## Methods

* [delivery.search](#delivery-search)
* [delivery.create](#delivery-create)
* [delivery.labels](#delivery-labels)
* [delivery.gallery](#delivery-gallery)
* [delivery.update](#delivery-update)
* [delivery.close](#delivery-close)
* [delivery.commit](#delivery-commit)
* [delivery.cancel](#delivery-cancel)
* [delivery.void](#delivery-void)

***

## Entity Properties

* [Delivery](#delivery-properties)
* [Delivery Item](#delivery-item-properties)
* [Delivery Item Lot](#delivery-item-lot-properties)
* [Delivery Label](#delivery-label-properties)
* [Delivery Label Package](#delivery-label-package-properties)
* [Delivery Label Address](#delivery-label-address-properties)
* [Container](#container-properties)
* [Container Content](#container-content-properties)
* [Container Content Lot](#container-content-lot-properties)
* [Exception](#exception-properties)
* [Gallery](#gallery-properties)
* [Photo](#photo-properties)
* [Device Info](#device-info-properties)
* [Media Info](#media-info-properties)

***

## `delivery.search`

`delivery.search(null|object $filters, array $options = [])`

Retrieve list of deliveries. Filtration could be applied.

### Parameters

<ParamField path="filters" type="null | object">
  * `null` - Retrieve list of all deliveries.
  * `object` - Retrieve list of deliveries using specified [Search Filters](/merchant-api/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".
</ParamField>

<ParamField path="options" type="null | object">
  * `null` - No options will be applied.
  * `object` - Apply specified [Search Options](/merchant-api/search-options).
</ParamField>

### Return Value

An array of objects. Each object will contain [Delivery Properties](#delivery-properties).

### Example Request

Get delivery for one delivery id:

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "delivery.search",
        [
            {
                "delivery_id" : {
                    "eq" : 1
                }
            },
            []
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : {
        "results" : [
            {
                "delivery_id" : 1,
                "warehouse_id" : 1,
                "increment_id" : "1000036",
                "delivery_type" : "asn",
                "state" : "complete",
                "status" : "put_away",
                "progress" : 100,
                "total_skus" : 2,
                "sender_name" : "Microsoft",
                "carrier_name" : "FedEx",
                "expected_delivery" : "2014-06-26",
                "expected_containers" : 2,
                "delivered_at" : "2014-07-21T08:52:56+00:00",
                "ready_to_process_at" : "2014-07-21T08:52:56+00:00",
                "processed_at" : "2014-07-21T09:22:36+00:00",
                "putaway_at" : "2014-07-21T11:24:05+00:00",
                "completed_at" : null,
                "comments" : null,
                "merchant_ref" : null,
                "merchant_status" : null,
                "sender_ref" : null,
                "sender_ref_alt" : null,
                "num_containers" : 2,
                "num_labels" : 1,
                "total_container_weight" : null,
                "total_container_weight_unit" : null,
                "total_product_weight" : null,
                "total_product_weight_unit" : null,
                "special_requirements" : null,
                "auto_commit" : 2,
                "auto_close" : 2,
                "created_at" : "2014-06-26T13:47:47+00:00",
                "updated_at" : "2014-06-26T14:09:30+00:00",
                "items" : [
                    {
                        "delivery_item_id" : 1,
                        "delivery_id" : 1,
                        "product_id" : 214,
                        "qty" : 1,
                        "qty_expected" : 0,
                        "qty_received" : 1,
                        "qty_shortage" : 0,
                        "qty_overage" : 5,
                        "qty_processed" : 1,
                        "qty_putaway" : 1,
                        "qty_committed" : 0,
                        "sku" : "product2",
                        "item_ref" : "ref_123456",
                        "lots" : [
                            {
                                "lot_id" : 25,
                                "qty_received" : 1,
                                "qty_shortage" : 0,
                                "qty_overage" : 5,
                                "qty_processed" : 1,
                                "qty_putaway" : 1,
                                "qty_committed" : 0
                            }
                        ]
                    },
                    {
                        "delivery_item_id" : 2,
                        "delivery_id" : 1,
                        "product_id" : 213,
                        "qty" : 1,
                        "qty_expected" : 0,
                        "qty_received" : 1,
                        "qty_shortage" : 0,
                        "qty_overage" : 0,
                        "qty_processed" : 1,
                        "qty_putaway" : 1,
                        "qty_committed" : 0,
                        "sku" : "product1",
                        "item_ref" : null,
                        "lots" : []
                    }
                ],
                "containers" : [
                    {
                        "container_id" : 1,
                        "delivery_id" : 1,
                        "container_type_id" : 1,
                        "damage_type" : "none",
                        "weight_discrepancy" : "none",
                        "tare_weight" : 1,
                        "tare_weight_unit" : "lb",
                        "weight" : 8,
                        "weight_unit" : "lb",
                        "weighed_at" : "2014-06-26T13:49:04+00:00",
                        "weighed_by" : 1,
                        "contents" : [
                            {
                                "delivery_item_id": 1,
                                "qty_counted": 6,
                                "qty_shortage": 0,
                                "lots": [
                                    {
                                        "lot_id": 25,
                                        "qty_counted": 6,
                                        "qty_shortage": 0
                                    }
                                ]
                            }
                        ],
                        "notes" : null
                    },
                    {
                        "container_id" : 2,
                        "delivery_id" : 1,
                        "container_type_id" : 1,
                        "damage_type" : "none",
                        "weight_discrepancy" : "none",
                        "tare_weight" : 1,
                        "tare_weight_unit" : "lb",
                        "weight" : 3,
                        "weight_unit" : "lb",
                        "weighed_at" : "2014-06-26T13:49:15+00:00",
                        "weighed_by" : 1,
                        "contents" : [
                            {
                                "delivery_item_id": 2,
                                "qty_counted": 1,
                                "qty_shortage": 0,
                                "lots": []
                            }
                        ],
                        "notes" : null
                    }
                ],
                "exceptions" : [
                    {
                        "delivery_exception_id" : 1,
                        "delivery_id" : 1,
                        "delivery_item_id" : 1,
                        "container_id" : 2,
                        "lot_id" : null,
                        "status" : "pending",
                        "sign" : 1,
                        "reason" : "overage_counted",
                        "comment" : null,
                        "qty" : 5
                    }
                ]
            }
        ],
        "totalCount" : 1,
        "numPages" : 1
    }
}
```

### 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

<ParamField path="deliveryType" type="string">
  Delivery type. Allowed: "asn", "rma", "other".
</ParamField>

<ParamField path="data" type="object">
  Delivery data. See [Delivery Properties](#delivery-properties).
</ParamField>

<ParamField path="items" type="null | array">
  * `null` - Create delivery without items.
  * `array` - Array of objects with two properties: "sku" and "qty".
</ParamField>

### Return Value

Delivery information.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "delivery.create",
        [
            "asn",
            {
                "warehouse_id" : 1,
                "auto_commit" : 2,
                "auto_close" : 2,
                "sender_name" : "Bill Gates",
                "carrier_name" : "FedEx",
                "expected_delivery" : "2014-07-31",
                "merchant_ref" : "Inv 12345"
            },
            [
                {
                    "sku" : "product1",
                    "qty" : 5,
                    "item_ref" : "ref_123456"
                },
                {
                    "sku" : "product2",
                    "qty" : 1
                }
            ]
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result" : {
        "delivery_id" : 4,
        "increment_id" : "1000039",
        "delivery_type" : "asn",
        "state": "new",
        "status": "new",
        "progress": 0,
        "total_skus": 1,
        "sender_name" : "Bill Gates",
        "carrier_name" : "FedEx",
        "expected_delivery" : "2014-07-31",
        "delivered_at": null,
        "ready_to_process_at": null,
        "processed_at": null,
        "putaway_at": null,
        "completed_at": null,
        "comments": null,
        "merchant_ref" : 12345,
        "merchant_status": null,
        "sender_ref": null,
        "sender_ref_alt": null,
        "num_containers": null,
        "num_labels": 0,
        "total_container_weight": null,
        "total_container_weight_unit": null,
        "total_product_weight": null,
        "total_product_weight_unit": null,
        "special_requirements": null,
        "auto_commit": 2,
        "auto_close": 2,
        "created_at" : "2014-07-31T14:10:00+00:00",
        "updated_at" : "2014-07-31T14:10:00+00:00",
        "warehouse_id" : 1
    }
}
```

### 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

<ParamField path="incrementId" type="string">
  Delivery increment id
</ParamField>

<ParamField path="fields" type="null | array">
  * `null` - Basic label data.
  * `array` - Array of fields. Allowed: "packages", "destination\_address", "origin\_address"
</ParamField>

### Return Value

An array of objects. Each object will contain [Delivery Label Properties](#delivery-label-properties).

### Example Request

Get labels for the delivery:

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "delivery.labels",
        [
            "1000055",
            [
                "packages",
                "destination_address",
                "origin_address"
            ]
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "error" : null,
    "result": [
        {
            "label_id": "8",
            "delivery_id": "26",
            "warehouse_id": "1",
            "status": "valid",
            "shipping_label": "ups_03",
            "created_at": "2021-01-20T10:03:55+00:00",
            "updated_at": "2021-01-20T10:04:01+00:00",
            "packages": [
                {
                    "warehouse_id": "1",
                    "label_id": "8",
                    "carrier": "ups",
                    "weight": "18.000",
                    "weight_unit": "lb",
                    "dimensions": {
                        "length": "10.000",
                        "width": "11.000",
                        "height": "12.000"
                    },
                    "dimension_unit": "in",
                    "tracking": [
                        {
                            "number": "1Z49R7V89024431506",
                            "description": "UPS Ground"
                        }
                    ],
                    "package_items": [
                        {
                            "delivery_item_id": 2,
                            "sku": "O-VS-Oregano-p3",
                            "quantity": "4.000"
                        },
                        {
                            "delivery_item_id": 3,
                            "sku": "O-VS-Mint-p2",
                            "quantity": "4.000"
                        },
                        {
                            "delivery_item_id": 5,
                            "sku": "VS-Bags-p1",
                            "quantity": "4.000"
                        }
                    ]
                }
            ],
            "destination_address": {
                "region": "New York",
                "postcode": "13088",
                "lastname": "Marquez",
                "street": "4616 Crossroads Park Dr",
                "city": "Liverpool",
                "email": null,
                "telephone": "865-971-4663",
                "firstname": "Sherlock",
                "company": null,
                "classification": "com",
                "is_valid": null,
                "country": "US"
            },
            "origin_address": {
                "region": "New York",
                "postcode": "10036",
                "lastname": "Gates",
                "street": "11 Times Square",
                "city": "New York",
                "email": null,
                "telephone": "212.245.2100",
                "firstname": "Bill",
                "company": "Microsoft",
                "classification": null,
                "is_valid": null,
                "country": "US"
            }
        },
        {
            "label_id": "9",
            "delivery_id": "26",
            "warehouse_id": "1",
            "status": "valid",
            "carrier": "ups",
            "created_at": "2021-01-20T10:04:23+00:00",
            "updated_at": "2021-01-20T10:04:26+00:00",
            "packages": [
                {
                    "warehouse_id": "1",
                    "label_id": "9",
                    "carrier": "ups",
                    "weight": "27.000",
                    "weight_unit": "lb",
                    "dimensions": {
                        "length": "10.000",
                        "width": "11.000",
                        "height": "12.000"
                    },
                    "dimension_unit": "in",
                    "tracking": [
                        {
                            "number": "1Z49R7V89021837511",
                            "description": "UPS Ground"
                        }
                    ],
                    "package_items": [
                        {
                            "delivery_item_id": 2,
                            "sku": "O-VS-Oregano-p3",
                            "quantity": "6.000"
                        },
                        {
                            "delivery_item_id": 3,
                            "sku": "O-VS-Mint-p2",
                            "quantity": "6.000"
                        },
                        {
                            "delivery_item_id": 5,
                            "sku": "VS-Bags-p1",
                            "quantity": "6.000"
                        }
                    ]
                }
            ],
            "destination_address": {
                "region": "New York",
                "postcode": "13088",
                "lastname": "Marquez",
                "street": "4616 Crossroads Park Dr",
                "city": "Liverpool",
                "email": null,
                "telephone": "865-971-4663",
                "firstname": "Sherlock",
                "company": null,
                "classification": "com",
                "is_valid": null,
                "country": "US"
            },
            "origin_address": {
                "region": "New York",
                "postcode": "10036",
                "lastname": "Gates",
                "street": "11 Times Square",
                "city": "New York",
                "email": null,
                "telephone": "212.245.2100",
                "firstname": "Bill",
                "company": "Microsoft",
                "classification": null,
                "is_valid": null,
                "country": "US"
            }
        }
    ]
}
```

### 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

<ParamField path="incrementId" type="string">
  The delivery increment ID.
</ParamField>

<ParamField path="updatedSince" type="string | null">
  Optional. Filter galleries by update date. Only galleries updated since this date will be returned. Format: "YYYY-MM-DD HH:MM:SS".
</ParamField>

### Return Value

An object containing [Gallery Properties](#gallery-properties) for the delivery gallery, with nested children galleries and associated photos.

### Example Request

Get complete gallery structure for a delivery:

```json title="Request" theme={null}
{
    "jsonrpc": 2.0,
    "id": 1234,
    "method": "call",
    "params": [
        "95847bf590ea11c6a67d3a429ab14c61",
        "delivery.gallery",
        [
            "11000008"
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": {
        "gallery_id": 205,
        "entity_type": "delivery",
        "entity_id": 8,
        "photo_count": 0,
        "updated_at": "2025-09-25T10:32:51+00:00",
        "photos": [],
        "children": [
            {
                "gallery_id": 227,
                "entity_type": "delivery_container",
                "entity_id": 22,
                "photo_count": 1,
                "updated_at": "2025-09-25T10:32:51+00:00",
                "photos": [
                    {
                        "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/delivery_container/22/45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                        "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/delivery_container/22/45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                        "caption": null,
                        "taken_at": null,
                        "device_info": null,
                        "media_info": {
                            "size": 77702,
                            "width": 2133,
                            "height": 1200,
                            "original_size": 159551,
                            "was_converted": false,
                            "original_width": 2560,
                            "size_formatted": "75.9KB",
                            "original_height": 1440,
                            "original_filename": "photo_12_1755888907743.png",
                            "processed_filename": "45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                            "original_size_formatted": "155.8KB"
                        },
                        "created_at": "2025-09-25T10:32:51+00:00"
                    }
                ],
                "children": [
                    {
                        "gallery_id": 0,
                        "entity_type": "container_item",
                        "entity_id": 36,
                        "photo_count": 0,
                        "updated_at": null,
                        "photos": [],
                        "children": []
                    }
                ]
            },
            {
                "gallery_id": 225,
                "entity_type": "delivery_container",
                "entity_id": 23,
                "photo_count": 0,
                "updated_at": "2025-09-25T10:31:20+00:00",
                "photos": [],
                "children": [
                    {
                        "gallery_id": 226,
                        "entity_type": "container_item",
                        "entity_id": 37,
                        "photo_count": 1,
                        "updated_at": "2025-09-25T10:31:20+00:00",
                        "photos": [
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/37/5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/37/5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                "caption": null,
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 92574,
                                    "width": 1280,
                                    "height": 960,
                                    "original_size": 162469,
                                    "was_converted": false,
                                    "original_width": 1280,
                                    "size_formatted": "90.4KB",
                                    "original_height": 960,
                                    "original_filename": "photo_2025-08-08_17-06-51.jpg",
                                    "processed_filename": "5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                    "original_size_formatted": "158.7KB"
                                },
                                "created_at": "2025-09-25T10:31:20+00:00"
                            }
                        ],
                        "children": []
                    }
                ]
            },
            {
                "gallery_id": 206,
                "entity_type": "delivery_container",
                "entity_id": 24,
                "photo_count": 0,
                "updated_at": "2025-09-25T07:59:22+00:00",
                "photos": [],
                "children": [
                    {
                        "gallery_id": 207,
                        "entity_type": "container_item",
                        "entity_id": 38,
                        "photo_count": 0,
                        "updated_at": "2025-09-25T07:59:15+00:00",
                        "photos": [],
                        "children": []
                    }
                ]
            },
            {
                "gallery_id": 219,
                "entity_type": "delivery_container",
                "entity_id": 25,
                "photo_count": 0,
                "updated_at": "2025-09-25T07:59:35+00:00",
                "photos": [],
                "children": [
                    {
                        "gallery_id": 220,
                        "entity_type": "container_item",
                        "entity_id": 39,
                        "photo_count": 2,
                        "updated_at": "2025-09-25T07:59:35+00:00",
                        "photos": [
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/39/b6a6a99adb62aa99ef6171e10d1d7eb4293af006.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/39/b6a6a99adb62aa99ef6171e10d1d7eb4293af006.webp",
                                "caption": null,
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 185868,
                                    "width": 675,
                                    "height": 1200,
                                    "original_size": 225381,
                                    "was_converted": false,
                                    "original_width": 720,
                                    "size_formatted": "181.5KB",
                                    "original_height": 1280,
                                    "original_filename": "photo_2024-04-25_17-25-28.jpg",
                                    "processed_filename": "b6a6a99adb62aa99ef6171e10d1d7eb4293af006.webp",
                                    "original_size_formatted": "220.1KB"
                                },
                                "created_at": "2025-09-25T07:58:57+00:00"
                            },
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/39/b0864b04d9e8ae07cda17ef84d0296a3d1cf3822.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/39/b0864b04d9e8ae07cda17ef84d0296a3d1cf3822.webp",
                                "caption": null,
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 180020,
                                    "width": 1920,
                                    "height": 1080,
                                    "original_size": 185862,
                                    "was_converted": false,
                                    "original_width": 1920,
                                    "size_formatted": "175.8KB",
                                    "original_height": 1080,
                                    "original_filename": "photo_12_17510867594.jpg",
                                    "processed_filename": "b0864b04d9e8ae07cda17ef84d0296a3d1cf3822.webp",
                                    "original_size_formatted": "181.5KB"
                                },
                                "created_at": "2025-09-25T07:58:57+00:00"
                            }
                        ],
                        "children": []
                    }
                ]
            },
            {
                "gallery_id": 208,
                "entity_type": "delivery_container",
                "entity_id": 26,
                "photo_count": 0,
                "updated_at": "2025-09-25T07:59:54+00:00",
                "photos": [],
                "children": [
                    {
                        "gallery_id": 209,
                        "entity_type": "container_item",
                        "entity_id": 40,
                        "photo_count": 2,
                        "updated_at": "2025-09-25T07:59:54+00:00",
                        "photos": [
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/40/3adce614977d8ca84579d75ce47a6dddf7b5875a.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/40/3adce614977d8ca84579d75ce47a6dddf7b5875a.webp",
                                "caption": "ddd",
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 85110,
                                    "width": 1065,
                                    "height": 600,
                                    "original_size": 769040,
                                    "was_converted": false,
                                    "original_width": 1065,
                                    "size_formatted": "83.1KB",
                                    "original_height": 600,
                                    "original_filename": "photo_5_1754929459408.png",
                                    "processed_filename": "3adce614977d8ca84579d75ce47a6dddf7b5875a.webp",
                                    "original_size_formatted": "751.0KB"
                                },
                                "created_at": "2025-09-25T07:48:08+00:00"
                            },
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/40/c50b84705620840166b8aa20e9b84ab4cd127ed0.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/40/c50b84705620840166b8aa20e9b84ab4cd127ed0.webp",
                                "caption": null,
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 71640,
                                    "width": 1065,
                                    "height": 600,
                                    "original_size": 778219,
                                    "was_converted": false,
                                    "original_width": 1065,
                                    "size_formatted": "70.0KB",
                                    "original_height": 600,
                                    "original_filename": "photo_16_1754397289147.png",
                                    "processed_filename": "c50b84705620840166b8aa20e9b84ab4cd127ed0.webp",
                                    "original_size_formatted": "760.0KB"
                                },
                                "created_at": "2025-09-25T07:48:08+00:00"
                            }
                        ],
                        "children": []
                    }
                ]
            }
        ]
    },
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### Example Request with Date Filter

Filter galleries by date to get only galleries updated since a specific date:

```json title="Request" theme={null}
{
    "jsonrpc": 2.0,
    "id": 1234,
    "method": "call",
    "params": [
        "95847bf590ea11c6a67d3a429ab14c61",
        "delivery.gallery",
        [
            "11000008",
            "2025-09-25 10:30:00"
        ]
    ]
}
```

### Example Response with Date Filter

```json title="Response" theme={null}
{
    "result": {
        "gallery_id": 205,
        "entity_type": "delivery",
        "entity_id": 8,
        "photo_count": 0,
        "updated_at": "2025-09-25T10:32:51+00:00",
        "photos": [],
        "children": [
            {
                "gallery_id": 227,
                "entity_type": "delivery_container",
                "entity_id": 22,
                "photo_count": 1,
                "updated_at": "2025-09-25T10:32:51+00:00",
                "photos": [
                    {
                        "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/delivery_container/22/45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                        "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/delivery_container/22/45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                        "caption": null,
                        "taken_at": null,
                        "device_info": null,
                        "media_info": {
                            "size": 77702,
                            "width": 2133,
                            "height": 1200,
                            "original_size": 159551,
                            "was_converted": false,
                            "original_width": 2560,
                            "size_formatted": "75.9KB",
                            "original_height": 1440,
                            "original_filename": "photo_12_1755888907743.png",
                            "processed_filename": "45784f473e9f3375f2e3fb1430cb8863f03a32bf.webp",
                            "original_size_formatted": "155.8KB"
                        },
                        "created_at": "2025-09-25T10:32:51+00:00"
                    }
                ],
                "children": []
            },
            {
                "gallery_id": 225,
                "entity_type": "delivery_container",
                "entity_id": 23,
                "photo_count": 0,
                "updated_at": "2025-09-25T10:31:20+00:00",
                "photos": [],
                "children": [
                    {
                        "gallery_id": 226,
                        "entity_type": "container_item",
                        "entity_id": 37,
                        "photo_count": 1,
                        "updated_at": "2025-09-25T10:31:20+00:00",
                        "photos": [
                            {
                                "original_url": "http://magentohost/cdn-cgi/image/original/development/gallery/container_item/37/5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                "thumbnail_url": "http://magentohost/cdn-cgi/image/fit=inside,width=250/development/gallery/container_item/37/5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                "caption": null,
                                "taken_at": null,
                                "device_info": null,
                                "media_info": {
                                    "size": 92574,
                                    "width": 1280,
                                    "height": 960,
                                    "original_size": 162469,
                                    "was_converted": false,
                                    "original_width": 1280,
                                    "size_formatted": "90.4KB",
                                    "original_height": 960,
                                    "original_filename": "photo_2025-08-08_17-06-51.jpg",
                                    "processed_filename": "5aab80b2ea8d4d9cdfa0eb2b5fd1c4d57805e923.webp",
                                    "original_size_formatted": "158.7KB"
                                },
                                "created_at": "2025-09-25T10:31:20+00:00"
                            }
                        ],
                        "children": []
                    }
                ]
            }
        ]
    },
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### Example Request for Empty Gallery

Get gallery structure for a delivery without any photos:

```json title="Request" theme={null}
{
    "jsonrpc": 2.0,
    "id": 1234,
    "method" : "call",
    "params" : [
        "95847bf590ea11c6a67d3a429ab14c61",
        "delivery.gallery",
        [
            "11000013"
        ]
    ]
}
```

### Example Response for Empty Gallery

```json title="Response" theme={null}
{
    "jsonrpc": 2.0,
    "id": 1234,
    "result": {
        "gallery_id": 0,
        "entity_type": "delivery",
        "entity_id": 19,
        "photo_count": 0,
        "updated_at": null,
        "children": [
            {
                "gallery_id": 0,
                "entity_type": "delivery_container",
                "entity_id": 41,
                "photo_count": 0,
                "updated_at": null,
                "children": [
                    {
                        "gallery_id": 0,
                        "entity_type": "container_item",
                        "entity_id": 49,
                        "photo_count": 0,
                        "updated_at": null,
                        "children": [],
                        "photos": []
                    }
                ],
                "photos": []
            }
        ],
        "photos": []
    }
}
```

### 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

<ParamField path="incrementId" type="string">
  Increment ID.
</ParamField>

<ParamField path="data" type="object">
  Delivery data. See [Delivery Properties](#delivery-properties).
</ParamField>

<ParamField path="addItems" type="null | array">
  * `null` - Update delivery without adding items.
  * `array` - Array of objects with two properties: "sku" and "qty".
</ParamField>

<ParamField path="removeItems" type="null | array">
  * `null` - Update delivery without removing items.
  * `array` - Array of objects with two properties: "sku" and "qty".
</ParamField>

### Return Value

`true` if delivery was successfully updated.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "aebdb4cc6f861c79428768923f0eb6a2",
        "delivery.update",
        [
            "10000011",
            {
                "merchant_ref" : "Inv 12345",
                "merchant_status": "new",
                "sender_name" : "Bill Gates",
                "sender_ref": "100000004",
                "sender_ref_alt": "100000001",
                "expected_delivery" : "2014-07-31",
                "carrier_name": "FedEx",
                "auto_commit": 1,
                "auto_close": 1,
                "comments": "This delivery was updated via API"                
            },
            [
                {
                    "sku": "O-VS-Oregano-p3",
                    "qty": "6.000",
                    "item_ref": "ref_456"
                }
            ],
            [
                {
                    "sku": "O-VS-Oregano-p3",
                    "qty": "3.000"
                }
            ]
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": true,
    "id": "1234",
    "jsonrpc": "2.0"
}
```

***

## `delivery.close`

`delivery.close(string $incrementId)`

Close a delivery.

### Parameters

<ParamField path="incrementId" type="string">
  The "Increment ID" property.
</ParamField>

### Return Value

`true` if delivery inventory was successfully closed.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "aebdb4cc6f861c79428768923f0eb6a2",
        "delivery.close",
        [
            "11000011"
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": true,
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### 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

<ParamField path="incrementId" type="string">
  The "Increment ID" property.
</ParamField>

<ParamField path="close" type="boolean">
  `true` to close the delivery.
</ParamField>

### Return Value

`true` if delivery inventory was successfully committed.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "aebdb4cc6f861c79428768923f0eb6a2",
        "delivery.commit",
        [
            "11000011"
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": true,
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### 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

<ParamField path="incrementId" type="string">
  The "Increment ID" property.
</ParamField>

### Return Value

`true` if delivery was successfully canceled.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "aebdb4cc6f861c79428768923f0eb6a2",
        "delivery.cancel",
        [
            "11000017"
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": true,
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### 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

<ParamField path="incrementId" type="string">
  The "Increment ID" property.
</ParamField>

### Return Value

`true` if delivery was successfully voided.

### Example Request

```json title="Request" theme={null}
{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "aebdb4cc6f861c79428768923f0eb6a2",
        "delivery.void",
        [
            "11000018"
        ]
    ]
}
```

### Example Response

```json title="Response" theme={null}
{
    "result": true,
    "id": "1234",
    "jsonrpc": "2.0"
}
```

### 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 |

<ParamField path="delivery_id" type="integer">
  The internal delivery ID.
</ParamField>

<ParamField path="warehouse_id" type="integer">
  The internal warehouse ID.
</ParamField>

<ParamField path="increment_id" type="string">
  The "Increment ID" property.
</ParamField>

<ParamField path="delivery_type" type="string">
  The "Delivery Type" property. Allowed: "asn", "rma", "other".
</ParamField>

<ParamField path="state" type="string">
  The "State" property. Allowed: "new", "processing", "putting\_away", "pending\_commit", "complete", "canceled".
</ParamField>

<ParamField path="status" type="string">
  The "Status" property. Allowed: "new", "accepting", "accepted", "ready\_to\_process", "processing", "processing\_exception", "processed", "putting\_away", "put\_away", "complete", "canceled", "void".
</ParamField>

<ParamField path="progress" type="integer">
  The "Progress" property. Number from 0 to 100.
</ParamField>

<ParamField path="total_skus" type="integer">
  Total amount of SKUs.
</ParamField>

<ParamField path="sender_name" type="string">
  The "Sender Name" property.
</ParamField>

<ParamField path="carrier_name" type="string">
  The "Carrier Name" property.
</ParamField>

<ParamField path="expected_delivery" type="string">
  The "Expected Delivery" property.
</ParamField>

<ParamField path="delivered_at" type="string">
  The "Delivered At" property.
</ParamField>

<ParamField path="ready_to_process_at" type="string">
  The "Delivered At" property.
</ParamField>

<ParamField path="processed_at" type="string">
  The "Processed At" property.
</ParamField>

<ParamField path="putaway_at" type="string">
  The "Put-Away At" property.
</ParamField>

<ParamField path="completed_at" type="string">
  The "Completed At" property.
</ParamField>

<ParamField path="comments" type="string">
  The "Comments" property.
</ParamField>

<ParamField path="merchant_ref" type="string">
  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.
</ParamField>

<ParamField path="merchant_status" type="string">
  The "Merchant Status" property.
</ParamField>

<ParamField path="sender_ref" type="string">
  The "Sender Reference" property. Do not use this field for RMAs.
</ParamField>

<ParamField path="sender_ref_alt" type="string">
  The "Sender Reference Alt" property.
</ParamField>

<ParamField path="tracking_numbers" type="array">
  The "Tracking Numbers" property.
</ParamField>

<ParamField path="expected_containers" type="integer">
  Number of containers expected to arrive with the delivery. Used to track reconciliation against `num_containers` as the warehouse accepts them.
</ParamField>

<ParamField path="num_containers" type="integer">
  Number of containers.
</ParamField>

<ParamField path="num_labels" type="integer">
  Number of labels.
</ParamField>

<ParamField path="total_container_weight" type="number">
  The "Total Container Weight" property.
</ParamField>

<ParamField path="total_container_weight_unit" type="string">
  The unit of measure used for `total_container_weight`. See: [Weight Units](/merchant-api/units-of-measure#weight).
</ParamField>

<ParamField path="total_product_weight" type="number">
  The "Total Product Weight" property.
</ParamField>

<ParamField path="total_product_weight_unit" type="string">
  The unit of measure used for `total_product_weight`. See: [Weight Units](/merchant-api/units-of-measure#weight).
</ParamField>

<ParamField path="special_requirements" type="string">
  The "Special Requirements" property.
</ParamField>

<ParamField path="auto_commit" type="integer">
  Determines whether inventory will be commited automatically upon put-away completion. 0 - Disabled, 1 - Enabled, 2 - Use default from config
</ParamField>

<ParamField path="auto_close" type="integer">
  Determines whether the delivery will be closed automatically upon acceptance of the last container. 0 - Disabled, 1 - Enabled, 2 - Use default from config
</ParamField>

<ParamField path="created_at" type="string">
  The "Created At" property in ISO 8601 format. If not available, `null` is returned.
</ParamField>

<ParamField path="updated_at" type="string">
  The "Updated At" property in ISO 8601 format. If not available, `null` is returned.
</ParamField>

<ParamField path="items" type="array">
  Array of delivery items. See [Delivery Item Properties](#delivery-item-properties).
</ParamField>

<ParamField path="containers" type="array">
  Array of containers. See [Container Properties](#container-properties).
</ParamField>

<ParamField path="exceptions" type="array">
  Array of exceptions. See [Exception Properties](#exception-properties).
</ParamField>

### Delivery Item Properties

<ParamField path="delivery_item_id" type="integer">
  The internal delivery item ID.
</ParamField>

<ParamField path="delivery_id" type="integer">
  The internal delivery ID.
</ParamField>

<ParamField path="product_id" type="integer">
  The internal product ID.
</ParamField>

<ParamField path="qty" type="integer">
  The quantity that was set when the delivery was created or edited.
</ParamField>

<ParamField path="qty_expected" type="integer">
  The quantity that is expected to be received in the future.
</ParamField>

<ParamField path="qty_received" type="integer">
  The "Received" quantity.
</ParamField>

<ParamField path="qty_shortage" type="integer">
  The "Shortage" quantity.
</ParamField>

<ParamField path="qty_overage" type="integer">
  The "Overage" quantity.
</ParamField>

<ParamField path="qty_processed" type="integer">
  The "Processed" quantity.
</ParamField>

<ParamField path="qty_putaway" type="integer">
  The "Put-Away" quantity.
</ParamField>

<ParamField path="qty_committed" type="integer">
  The "Committed" quantity.
</ParamField>

<ParamField path="sku" type="string">
  The "SKU" property.
</ParamField>

<ParamField path="item_ref" type="string">
  An external item reference which may be up to 1024 characters.
</ParamField>

<ParamField path="lots" type="array">
  Array of per-lot quantity breakdowns for this item. See [Delivery Item Lot Properties](#delivery-item-lot-properties). Present only for lot-tracked products; units received without a lot are not decomposed.
</ParamField>

### Delivery Item Lot Properties

Each entry breaks down the [Delivery Item](#delivery-item-properties) quantities by lot. Lot metadata (lot number, expiration date, etc.) is not included here — resolve `lot_id` via [inventory.lots](/merchant-api/inventory#inventory-lots) when needed.

<ParamField path="lot_id" type="integer">
  The lot ID.
</ParamField>

<ParamField path="qty_received" type="number">
  The "Received" quantity attributable to this lot.
</ParamField>

<ParamField path="qty_shortage" type="number">
  The "Shortage" quantity attributable to this lot.
</ParamField>

<ParamField path="qty_overage" type="number">
  The "Overage" quantity attributable to this lot.
</ParamField>

<ParamField path="qty_processed" type="number">
  The "Processed" quantity attributable to this lot.
</ParamField>

<ParamField path="qty_putaway" type="number">
  The "Put-Away" quantity attributable to this lot.
</ParamField>

<ParamField path="qty_committed" type="number">
  The "Committed" quantity attributable to this lot.
</ParamField>

### Delivery Label Properties

<ParamField path="label_id" type="integer">
  The internal delivery label ID.
</ParamField>

<ParamField path="delivery_id" type="integer">
  The internal delivery ID.
</ParamField>

<ParamField path="warehouse_id" type="integer">
  The internal warehouse ID.
</ParamField>

<ParamField path="status" type="string">
  The "Status" property. Allowed: "valid", "void".
</ParamField>

<ParamField path="shipping_method" type="string">
  See the [Shipping Methods](/merchant-api/shipping-methods) document for a reference. Is not optional.
</ParamField>

<ParamField path="created_at" type="string">
  The "Created At" property in ISO 8601 format.
</ParamField>

<ParamField path="updated_at" type="string">
  The "Updated At" property in ISO 8601 format.
</ParamField>

<ParamField path="packages" type="array">
  Array of delivery label packages. See [Delivery Label Package Properties](#delivery-label-package-properties).
</ParamField>

<ParamField path="destination_address" type="object">
  Destination Address. See [Delivery Label Address Properties](#delivery-label-address-properties).
</ParamField>

<ParamField path="origin_address" type="object">
  Origination Address. See [Delivery Label Address Properties](#delivery-label-address-properties).
</ParamField>

### Delivery Label Package Properties

<ParamField path="warehouse_id" type="string">
  The ID of the warehouse associated with the package.
</ParamField>

<ParamField path="label_id" type="integer">
  The internal delivery label ID.
</ParamField>

<ParamField path="carrier" type="string">
  Carrier code.
</ParamField>

<ParamField path="weight" type="string">
  The weight of the package.
</ParamField>

<ParamField path="weight_unit" type="string">
  The unit of measure used for `weight`. See: [Weight Units](/merchant-api/units-of-measure#weight).
</ParamField>

<ParamField path="dimensions" type="object">
  The `length`, `width`, and `height` of the package.
</ParamField>

<ParamField path="dimension_unit" type="string">
  The unit of measure used for `length`, `width`, and `height` in `dimensions`. See: [Length Units](/merchant-api/units-of-measure#length).
</ParamField>

<ParamField path="tracking" type="array">
  An array of tracking objects. The "number" property contains the tracking number. The "description" property contains the shipping method name.
</ParamField>

<ParamField path="package_items" type="array">
  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.
</ParamField>

### Delivery Label Address Properties

<ParamField path="firstname" type="string">
  The "First Name" property.
</ParamField>

<ParamField path="lastname" type="string">
  The "Last Name" property.
</ParamField>

<ParamField path="company" type="string">
  The "Company" property.
</ParamField>

<ParamField path="street" type="string">
  The street address. Multi-line street addresses will be separated by a newline (`\n`) character. Only two address lines are supported.
</ParamField>

<ParamField path="city" type="string">
  The "City" property.
</ParamField>

<ParamField path="region" type="string">
  The "Region" property.
</ParamField>

<ParamField path="postcode" type="string">
  The "Postal Code" property. Pass as a string to prevent leading 0s from being dropped.
</ParamField>

<ParamField path="country" type="string">
  The "Country" property.
</ParamField>

<ParamField path="classification" type="string">
  The "Classification" property. Allowed: "res" - residential, "com" - commercial, "po" - post office, "mil" - military, "unk" - unknown.
</ParamField>

<ParamField path="is_valid" type="integer">
  Flag whether address is valid.
</ParamField>

<ParamField path="telephone" type="string">
  The "Telephone" property.
</ParamField>

<ParamField path="email" type="string">
  The "Email" property.
</ParamField>

### Container Properties

<ParamField path="container_id" type="integer">
  The internal container ID.
</ParamField>

<ParamField path="delivery_id" type="integer">
  The internal delivery ID.
</ParamField>

<ParamField path="container_type_id" type="integer">
  The "Container Type ID" property.
</ParamField>

<ParamField path="damage_type" type="string">
  The "Damage Type" property. Allowed: "none", "noted", "unnoted".
</ParamField>

<ParamField path="weight_discrepancy" type="string">
  The "Weight Discrepancy" property. Allowed: "none", "shortage\_noted", "shortage\_unnoted", "overage", "unknown".
</ParamField>

<ParamField path="tare_weight" type="number">
  The "Tare Weight" property.
</ParamField>

<ParamField path="tare_weight_unit" type="string">
  The unit of measure used for `tare_weight`. See: [Weight Units](/merchant-api/units-of-measure#weight).
</ParamField>

<ParamField path="weight" type="number">
  The "Weight" property.
</ParamField>

<ParamField path="weight_unit" type="string">
  The unit of measure used for `weight`. See: [Weight Units](/merchant-api/units-of-measure#weight).
</ParamField>

<ParamField path="weighed_at" type="string">
  The "Weighed At" property.
</ParamField>

<ParamField path="weighed_by" type="integer">
  The "Weighed By" property.
</ParamField>

<ParamField path="contents" type="array">
  Array of "content" objects. See [Container Content Properties](#container-content-properties).
</ParamField>

<ParamField path="notes" type="string">
  The "Notes" property.
</ParamField>

### Container Content Properties

<ParamField path="delivery_item_id" type="integer">
  The internal delivery item ID.
</ParamField>

<ParamField path="qty_counted" type="integer">
  The "Quantity Counted" property.
</ParamField>

<ParamField path="qty_shortage" type="integer">
  The "Quantity Shortage" property.
</ParamField>

<ParamField path="lots" type="array">
  Array of per-lot counted/shortage breakdowns for this container content. See [Container Content Lot Properties](#container-content-lot-properties). Present only for lot-tracked products.
</ParamField>

### Container Content Lot Properties

Each entry breaks down the parent [Container Content](#container-content-properties) quantities by lot.

<ParamField path="lot_id" type="integer">
  The lot ID.
</ParamField>

<ParamField path="qty_counted" type="number">
  The "Quantity Counted" attributable to this lot within this container content.
</ParamField>

<ParamField path="qty_shortage" type="number">
  The "Quantity Shortage" attributable to this lot within this container content.
</ParamField>

### Exception Properties

<ParamField path="delivery_exception_id" type="integer">
  The internal delivery exception ID.
</ParamField>

<ParamField path="delivery_id" type="integer">
  The internal delivery ID.
</ParamField>

<ParamField path="delivery_item_id" type="integer">
  The internal delivery item ID.
</ParamField>

<ParamField path="container_id" type="integer">
  The internal container ID.
</ParamField>

<ParamField path="lot_id" type="integer">
  The internal lot ID the exception is scoped to, or `null` for exceptions that are not lot-specific.
</ParamField>

<ParamField path="status" type="string">
  The "Status" property. Allowed: "new", "pending", "approved", "rejected", "void".
</ParamField>

<ParamField path="sign" type="integer">
  The "Sign" property. Allowed: "-1" - shortage, "1" - overage.
</ParamField>

<ParamField path="reason" type="string">
  The "Reason" property. Allowed: "overage\_counted", "overage\_unexpected", "shortage\_damaged", "shortage\_missing".
</ParamField>

<ParamField path="comment" type="string">
  The "Comment" property.
</ParamField>

<ParamField path="qty" type="integer">
  The "Quantity" property.
</ParamField>

### Gallery Properties

<ParamField path="gallery_id" type="number">
  The internal gallery ID. `0` indicates no gallery exists for this entity.
</ParamField>

<ParamField path="entity_type" type="string">
  The type of entity this gallery belongs to. Allowed: "delivery", "delivery\_container", "container\_item", "delivery\_exception".
</ParamField>

<ParamField path="entity_id" type="number">
  The internal ID of the entity this gallery belongs to.
</ParamField>

<ParamField path="photo_count" type="number">
  The total number of photos in this gallery.
</ParamField>

<ParamField path="updated_at" type="string">
  The timestamp when this gallery was last updated. `null` if no photos have been added.
</ParamField>

<ParamField path="children" type="array">
  Array of child galleries. See [Gallery Properties](#gallery-properties).
</ParamField>

<ParamField path="photos" type="array">
  Array of photos in this gallery. See [Photo Properties](#photo-properties).
</ParamField>

### Photo Properties

<ParamField path="original_url" type="string">
  The URL to the original full-size photo.
</ParamField>

<ParamField path="thumbnail_url" type="string">
  The URL to the thumbnail version of the photo, resized to fit 250px × 250px.
</ParamField>

<ParamField path="caption" type="string | null">
  Optional caption text for the photo.
</ParamField>

<ParamField path="taken_at" type="string | null">
  Time and date in ISO 8601 format when the photo was taken. If not available, `null` is returned.
</ParamField>

<ParamField path="device_info" type="object | null">
  Information about the device used to take the photo. See [Device Info Properties](#device-info-properties). `null` if not available.
</ParamField>

<ParamField path="media_info" type="object">
  Technical information about the photo file. See [Media Info Properties](#media-info-properties).
</ParamField>

<ParamField path="created_at" type="string">
  The timestamp when the photo was uploaded to the system.
</ParamField>

### Device Info Properties

<ParamField path="lens" type="string">
  Information about the camera lens used.
</ParamField>

<ParamField path="device" type="string">
  The device model that took the photo.
</ParamField>

<ParamField path="aperture" type="string">
  The aperture setting used when taking the photo.
</ParamField>

<ParamField path="focal_length" type="string">
  The focal length setting used when taking the photo.
</ParamField>

<ParamField path="camera_settings" type="object">
  Additional camera settings used when taking the photo.
</ParamField>

<ParamField path="camera_settings.iso" type="string">
  The ISO setting used when taking the photo.
</ParamField>

<ParamField path="camera_settings.flash" type="string">
  Information about flash usage when taking the photo.
</ParamField>

<ParamField path="camera_settings.shutter_speed" type="string">
  The shutter speed used when taking the photo.
</ParamField>

### Media Info Properties

<ParamField path="size" type="number">
  The processed file size in bytes.
</ParamField>

<ParamField path="width" type="number">
  The width of the processed image in pixels.
</ParamField>

<ParamField path="height" type="number">
  The height of the processed image in pixels.
</ParamField>

<ParamField path="original_size" type="number">
  The original file size in bytes.
</ParamField>

<ParamField path="was_converted" type="boolean">
  Whether the original file was converted to a different format.
</ParamField>

<ParamField path="original_width" type="number">
  The width of the original image in pixels.
</ParamField>

<ParamField path="size_formatted" type="string">
  The processed file size formatted as a human-readable string (e.g., "502.3KB", "2.4MB").
</ParamField>

<ParamField path="original_height" type="number">
  The height of the original image in pixels.
</ParamField>

<ParamField path="original_filename" type="string">
  The original filename when the photo was uploaded.
</ParamField>

<ParamField path="processed_filename" type="string">
  The filename after processing.
</ParamField>

<ParamField path="original_size_formatted" type="string">
  The original file size formatted as a human-readable string (e.g., "2.4MB").
</ParamField>
