# API

# General

# What are the available endpoints?

#### Orders

<table border="1" id="bkmrk-method-endpoint-perm" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 12.0369%;"></col><col style="width: 37.9035%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td data-col-size="sm" data-end="698" data-start="690">`GET`</td><td data-col-size="sm" data-end="714" data-start="698">`/api/orders`</td><td data-col-size="sm" data-end="731" data-start="714">`orders.index`</td><td data-col-size="sm" data-end="746" data-start="731">List orders</td></tr><tr><td data-col-size="sm" data-end="755" data-start="747">`GET`</td><td data-col-size="sm" data-end="776" data-start="755">`/api/orders/{id}`</td><td data-col-size="sm" data-end="792" data-start="776">`orders.view`</td><td data-col-size="sm" data-end="808" data-start="792">Get an order</td></tr><tr><td data-col-size="sm" data-end="818" data-start="809">`POST`</td><td data-col-size="sm" data-end="834" data-start="818">`/api/orders`</td><td data-col-size="sm" data-end="851" data-start="834">`orders.store`</td><td data-col-size="sm" data-end="870" data-start="851">Create an order</td></tr><tr><td data-col-size="sm" data-end="880" data-start="871">`POST`</td><td data-col-size="sm" data-end="912" data-start="880">`/api/orders/{id}/flags/{id}`</td><td data-col-size="sm" data-end="935" data-start="912">`orders.flags.store`</td><td data-col-size="sm" data-end="952" data-start="935">Attach a flag</td></tr><tr><td data-col-size="sm" data-end="964" data-start="953">`DELETE`</td><td data-col-size="sm" data-end="996" data-start="964">`/api/orders/{id}/flags/{id}`</td><td data-col-size="sm" data-end="1020" data-start="996">`orders.flags.delete`</td><td data-col-size="sm" data-end="1037" data-start="1020">Remove a flag</td></tr><tr><td data-col-size="sm" data-end="1047" data-start="1038">`POST`</td><td data-col-size="sm" data-end="1077" data-start="1047">`/api/orders/{id}/comments`</td><td data-col-size="sm" data-end="1103" data-start="1077">`orders.comments.store`</td><td data-col-size="sm" data-end="1120" data-start="1103">Add a comment</td></tr></tbody></table>

<p class="callout info">You can pass the order `reference` in place of `id`.</p>

<p class="callout info">You can pass the flag `name` in place of the `id`.</p>

#### Fulfillments

<table border="1" id="bkmrk-method-endpoint-perm-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4416%;"></col><col style="width: 38.4988%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td data-col-size="sm" data-end="1330" data-start="1321">`POST`</td><td data-col-size="sm" data-end="1364" data-start="1330">`/api/orders/{id}/fulfillments`</td><td data-col-size="sm" data-end="1387" data-start="1364">`fulfillments.store`</td><td data-col-size="sm" data-end="1411" data-start="1387">Create a fulfillment</td></tr><tr><td data-col-size="sm" data-end="1423" data-start="1412">`DELETE`</td><td data-col-size="sm" data-end="1462" data-start="1423">`/api/orders/{id}/fulfillments/{id}`</td><td data-col-size="sm" data-end="1486" data-start="1462">`fulfillments.delete`</td><td data-col-size="sm" data-end="1510" data-start="1486">Cancel a fulfillment</td></tr></tbody></table>

<p class="callout info">You can pass the order `reference` in place of `id`.</p>

<p class="callout info">You can pass the fulfillment `reference` in place of `id`.</p>

#### Order Statuses

<table border="1" id="bkmrk-method-endpoint-perm-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td class="align-left">`GET`</td><td>`/api/order-statuses`</td><td>`order-statuses.index`</td><td>List order statuses</td></tr><tr><td class="align-left">`GET`</td><td>`/api/order-statuses/{id}`</td><td>`order-statuses.view`</td><td>Get an order status</td></tr></tbody></table>

#### Products

<table border="1" id="bkmrk-method-endpoint-perm-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td align="center" class="align-left" style="height: 29.7969px;">`GET`</td><td style="height: 29.7969px;">`/api/products`</td><td style="height: 29.7969px;">`products.index`</td><td style="height: 29.7969px;">List products</td></tr><tr><td class="align-left" style="height: 29.7969px;">`GET`</td><td style="height: 29.7969px;">`/api/products/search`</td><td style="height: 29.7969px;">`products.search`</td><td style="height: 29.7969px;">Search products</td></tr><tr><td class="align-left" style="height: 29.7969px;">`GET`</td><td style="height: 29.7969px;">`/api/products/{id}`</td><td style="height: 29.7969px;">`products.view`</td><td style="height: 29.7969px;">Get a product</td></tr><tr><td class="align-left" style="height: 29.7969px;">`POST`</td><td style="height: 29.7969px;">`/api/products`</td><td style="height: 29.7969px;">`products.store`</td><td style="height: 29.7969px;">Create a product</td></tr><tr><td class="align-left" style="height: 29.7969px;">`PUT`</td><td style="height: 29.7969px;">`/api/products/{id}`</td><td style="height: 29.7969px;">`products.update`</td><td style="height: 29.7969px;">Update a product</td></tr></tbody></table>

<p class="callout info">You can pass the product `model` in place of `id`.</p>

<p class="callout info">The `search` route allows for filtering at document level rather than eloquent level.</p>

#### Variants

<table border="1" id="bkmrk-method-endpoint-perm-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/products/{id}/variants`</td><td>`variants.store`</td><td>Create a variant</td></tr><tr><td>`PUT`</td><td>`/api/products/{id}/variants/{id}`</td><td>`variants.update`</td><td>Update a variant</td></tr></tbody></table>

<p class="callout info">You can pass the product `model` in place of `id`.</p>

<p class="callout info">You can pass the variant `sku` in place of `id`.</p>

#### Manufacturers

<table border="1" id="bkmrk-method-endpoint-perm-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/manufacturers`</td><td>`manufacturers.index`</td><td>List manufacturers</td></tr><tr><td>`GET`</td><td>`/api/manufacturers/{id}`</td><td>`manufacturers.view`</td><td>Get a manufacturer</td></tr><tr><td>`POST`</td><td>`/api/manufacturers`</td><td>`manufacturers.store`</td><td>Create a manufacturer</td></tr><tr><td>`PUT`</td><td>`/api/manufacturers/{id}`</td><td>`manufacturers.update`</td><td>Update a manufacturer</td></tr><tr><td>`DELETE`</td><td>`/api/manufacturers/{id}`</td><td>`manufacturers.delete`</td><td>Delete a manufacturer</td></tr></tbody></table>

<p class="callout info">You can pass the manufacturer `name` in place of `id`.</p>

#### Attribute Groups

<table border="1" id="bkmrk-method-endpoint-perm-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/attribute-groups`</td><td>`attribute-groups.index`</td><td>List attribute groups</td></tr><tr><td>`GET`</td><td>`/api/attribute-groups/{id}`</td><td>`attribute-groups.view`</td><td>Get an attribute group</td></tr><tr><td>`POST`</td><td>`/api/attribute-groups`</td><td>`attribute-groups.store`</td><td>Create an attribute group</td></tr><tr><td>`PUT`</td><td>`/api/attribute-groups/{id}`</td><td>`attribute-groups.update`</td><td>Update an attribute group</td></tr><tr><td>`DELETE`</td><td>`/api/attribute-groups/{id}`</td><td>`attribute-groups.delete`</td><td>Delete an attribute group</td></tr></tbody></table>

<p class="callout info">You can pass the attribute group `name` in place of `id`.</p>

#### Attributes

<table border="1" id="bkmrk-method-endpoint-perm-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/attribute-groups/{id}/attributes`</td><td>`attributes.store`</td><td>Create an attribute</td></tr><tr><td>`PUT`</td><td>`/api/attribute-groups/{id}/attributes/{id}`</td><td>`attributes.update`</td><td>Update an attribute</td></tr><tr><td>`DELETE`</td><td>`/api/attribute-groups/{id}/attributes/{id}`</td><td>`attributes.delete`</td><td>Delete an attribute</td></tr></tbody></table>

<p class="callout info">You can pass the attribute group `name` in place of `id`.</p>

<p class="callout info">You can pass the attribute `name` in place of `id`.</p>

#### Categories

<table border="1" id="bkmrk-method-endpoint-perm-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/categories`</td><td>`categories.index`</td><td>List categories</td></tr><tr><td>`GET`</td><td>`/api/categories/{id}`</td><td>`categories.view`</td><td>Get a category</td></tr><tr><td>`POST`</td><td>`/api/categories`</td><td>`categories.store`</td><td>Create a category</td></tr><tr><td>`PUT`</td><td>`/api/categories/{id}`</td><td>`categories.update`</td><td>Update a category</td></tr><tr><td>`DELETE`</td><td>`/api/categories/{id}`</td><td>`categories.delete`</td><td>Delete a category</td></tr></tbody></table>

<p class="callout info">You can pass the category `name` or `breadcrumb` in place of `id`.</p>

#### Tag Groups

<table border="1" id="bkmrk-method-endpoint-perm-9" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/tag-groups`</td><td>`tag-groups.index`</td><td>List tag groups</td></tr><tr><td>`GET`</td><td>`/api/tag-groups/{id}`</td><td>`tag-groups.view`</td><td>Get a tag group</td></tr><tr><td>`POST`</td><td>`/api/tag-groups`</td><td>`tag-groups.store`</td><td>Create a tag group</td></tr><tr><td>`PUT`</td><td>`/api/tag-groups/{id}`</td><td>`tag-groups.update`</td><td>Update a tag group</td></tr><tr><td>`DELETE`</td><td>`/api/tag-groups/{id}`</td><td>`tag-groups.delete`</td><td>Delete a tag group</td></tr></tbody></table>

<p class="callout info">You can pass the tag group `name` in place of `id`.</p>

#### Tags

<table border="1" id="bkmrk-method-endpoint-perm-10" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/tag-groups/{id}/tags`</td><td>`tags.store`</td><td>Create a tag</td></tr><tr><td>`PUT`</td><td>`/api/tag-groups/{id}/tags/{id}`</td><td>`tags.update`</td><td>Update a tag</td></tr><tr><td>`DELETE`</td><td>`/api/tag-groups/{id}/tags/{id}`</td><td>`tags.delete`</td><td>Delete a tag</td></tr></tbody></table>

<p class="callout info">You can pass the tag group `name` in place of `id`.</p>

<p class="callout info">You can pass the tag `name` in place of `id`.</p>

#### Collections

<table border="1" id="bkmrk-method-endpoint-perm-11" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/collections`</td><td>`collections.index`</td><td>List collections</td></tr><tr><td>`GET`</td><td>`/api/collections/{id}`</td><td>`collections.view`</td><td>Get a collection</td></tr><tr><td>`POST`</td><td>`/api/collections`</td><td>`collections.store`</td><td>Create a collection</td></tr><tr><td>`PUT`</td><td>`/api/collections/{id}`</td><td>`collections.update`</td><td>Update a collection</td></tr><tr><td>`DELETE`</td><td>`/api/collections/{id}`</td><td>`collections.delete`</td><td>Delete a collection</td></tr></tbody></table>

<p class="callout info">You can pass the collection `name` in place of `id`.</p>

#### Customers

<table border="1" id="bkmrk-method-endpoint-perm-12" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/customers`</td><td>`customers.index`</td><td>List customers</td></tr><tr><td>`GET`</td><td>`/api/customers/{id}`</td><td>`customers.view`</td><td>Get a customer</td></tr><tr><td>`POST`</td><td>`/api/customers`</td><td>`customers.store`</td><td>Create a customer</td></tr><tr><td>`PUT`</td><td>`/api/customers/{id}`</td><td>`customers.update`</td><td>Update a customer</td></tr></tbody></table>

#### Addresses

<table border="1" id="bkmrk-method-endpoint-perm-13" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/customers/{id}/addresses`</td><td>`addresses.store`</td><td>Create an address</td></tr><tr><td>`PUT`</td><td>`/api/customers/{id}/addresses/{id}`</td><td>`addresses.update`</td><td>Update an address</td></tr><tr><td>`DELETE`</td><td>`/api/customers/{id}/addresses/{id}`</td><td>`addresses.delete`</td><td>Delete an address</td></tr></tbody></table>

#### Payment Methods

<table border="1" id="bkmrk-method-endpoint-perm-14" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/payment-methods`</td><td>`payment-methods.index`</td><td>List payment methods</td></tr><tr><td>`GET`</td><td>`/api/payment-methods/{id}`</td><td>`payment-methods.view`</td><td>Get a payment method</td></tr></tbody></table>

#### Shipping Methods

<table border="1" id="bkmrk-method-endpoint-perm-15" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/shipping-methods`</td><td>`shipping-methods.index`</td><td>List shipping methods</td></tr><tr><td>`GET`</td><td>`/api/shipping-methods/{id}`</td><td>`shipping-methods.view`</td><td>Get a shipping method</td></tr></tbody></table>

#### Locations

<table border="1" id="bkmrk-method-endpoint-perm-16" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/locations`</td><td>`locations.index`</td><td>List locations</td></tr><tr><td>`GET`</td><td>`/api/locations/{id}`</td><td>`locations.view`</td><td>Get a location</td></tr><tr><td>`POST`</td><td>`/api/locations`</td><td>`locations.store`</td><td>Create a location</td></tr><tr><td>`PUT`</td><td>`/api/locations/{id}`</td><td>`locations.update`</td><td>Update a location</td></tr></tbody></table>

<p class="callout info">You can pass the location `name` in place of `id`.</p>

#### Flags

<table border="1" id="bkmrk-method-endpoint-perm-17" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/flags`</td><td>`flags.index`</td><td>List flags</td></tr><tr><td>`GET`</td><td>`/api/flags/{id}`</td><td>`flags.view`</td><td>Get a flag</td></tr><tr><td>`POST`</td><td>`/api/flags`</td><td>`flags.store`</td><td>Create a flag</td></tr><tr><td>`PUT`</td><td>`/api/flags/{id}`</td><td>`flags.update`</td><td>Update a flag</td></tr><tr><td>`DELETE`</td><td>`/api/flags/{id}`</td><td>`flags.delete`</td><td>Delete a flag</td></tr></tbody></table>

<p class="callout info">You can pass the flag `name` in place of `id`.</p>

#### Price Lists

<table border="1" id="bkmrk-method-endpoint-perm-18" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/price-lists`</td><td>`price-lists.index`</td><td>List price lists</td></tr><tr><td>`GET`</td><td>`/api/price-lists/{id}`</td><td>`price-lists.view`</td><td>Get a price list</td></tr><tr><td>`POST`</td><td>`/api/price-lists`</td><td>`price-lists.store`</td><td>Create a price list</td></tr><tr><td>`PUT`</td><td>`/api/price-lists/{id}`</td><td>`price-lists.update`</td><td>Update a price list</td></tr></tbody></table>

#### Price List Entries

<table border="1" id="bkmrk-method-endpoint-perm-19" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/price-lists/{id}/entries`</td><td>`price-list-entries.store`</td><td>Create a price list entry</td></tr><tr><td>`PUT`</td><td>`/api/price-lists/{id}/entries/{id}`</td><td>`price-list-entries.update`</td><td>Update a price list entry</td></tr></tbody></table>

#### Specification Groups

<table border="1" id="bkmrk-method-endpoint-perm-20" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/specification-groups`</td><td>`specification-groups.index`</td><td>List specification groups</td></tr><tr><td>`GET`</td><td>`/api/specification-groups/{id}`</td><td>`specification-groups.view`</td><td>Get a specification group</td></tr><tr><td>`POST`</td><td>`/api/specification-groups`</td><td>`specification-groups.store`</td><td>Create a specification group</td></tr><tr><td>`PUT`</td><td>`/api/specification-groups/{id}`</td><td>`specification-groups.update`</td><td>Update a specification group</td></tr></tbody></table>

<p class="callout warning">Must have installed `aerocargo/specifications` for these endpoints to work.</p>

#### Upsell Groups

<table border="1" id="bkmrk-method-endpoint-perm-21" style="border-collapse: collapse; width: 100%; height: 27.7969px;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 27.7969px;"><td style="height: 27.7969px;">**Method**</td><td style="height: 27.7969px;">**Endpoint**</td><td style="height: 27.7969px;">**Permission**</td><td style="height: 27.7969px;">**Description**</td></tr><tr><td style="height: 29.7969px;">`GET`</td><td style="height: 29.7969px;">`/api/upsell-groups`</td><td style="height: 29.7969px;">`upsell-groups.index`</td><td style="height: 29.7969px;">List upsell groups</td></tr><tr><td style="height: 29.7969px;">`GET`</td><td style="height: 29.7969px;">`/api/upsell-groups/{key}`</td><td style="height: 29.7969px;">`upsell-groups.view`</td><td style="height: 29.7969px;">Get an upsell group</td></tr><tr><td style="height: 29.7969px;">`POST`</td><td style="height: 29.7969px;">`/api/upsell-groups`</td><td style="height: 29.7969px;">`upsell-groups.store`</td><td style="height: 29.7969px;">Create an upsell group</td></tr><tr><td style="height: 29.7969px;">`PUT`</td><td style="height: 29.7969px;">`/api/upsell-groups/{key}`</td><td style="height: 29.7969px;">`upsell-groups.update`</td><td style="height: 29.7969px;">Update an upsell group</td></tr></tbody></table>

<p class="callout warning">Must have installed `aerocargo/upsells` for these endpoints to work.</p>

#### Listing Collection Groups

<table border="1" id="bkmrk-method-endpoint-perm-22" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`GET`</td><td>`/api/listing-collection-groups`</td><td>`listing-collection-groups.index`</td><td>List listing collection groups</td></tr><tr><td>`GET`</td><td>`/api/listing-collection-groups/{key}`</td><td>`listing-collection-groups.view`</td><td>Get a listing collection group</td></tr><tr><td>`POST`</td><td>`/api/listing-collection-groups`</td><td>`listing-collection-groups.store`</td><td>Create a listing collection group</td></tr><tr><td>`PUT`</td><td>`/api/listing-collection-groups/{key}`</td><td>`listing-collection-groups.update`</td><td>Update a listing collection group</td></tr></tbody></table>

<p class="callout warning">Must have installed `aerocargo/listing-collections` for these endpoints to work.</p>

#### Stock

<table border="1" id="bkmrk-method-endpoint-perm-23" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 11.4422%;"></col><col style="width: 38.4982%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Method**</td><td>**Endpoint**</td><td>**Permission**</td><td>**Description**</td></tr><tr><td>`POST`</td><td>`/api/stock`</td><td>`stock.update`</td><td>Bulk update variant stock</td></tr></tbody></table>

# What conventions does the API use?

#### Attribute Conventions

- Keys generally match the attribute name on their respective models.
- **Exception:** Attributes ending in "\_code" should omit the suffix when passed to the API, e.g. `currency_code` =&gt; `currency`

#### Relationship Conventions

- Nested data should use a **snake\_case** version of the relationship method name where present, e.g.: `shippingMethod` =&gt; `shipping_method`

#### Price Conventions

- Prices retrieved from the API are mostly in the currency's smallest unit, e.g. `1000` = `10 GBP`
- Prices should generally be provided in the currency’s standard unit, e.g. `10` = `10 GBP` (unless otherwise stated)
- Prices should generally be passed as an object, e.g.:  
      
    ```
    {
        "price": {
            "amount": 400, // Excluding tax
            "tax": 80
        }
    }
    ```
    
    **Exception:** Some endpoints support passing a single tax-inclusive value:
    
    ```
    {
        "price": 480 // Including tax
    }
    ```
    
    See the relevant endpoint docs to see if this is supported for an endpoint

#### Date Conventions

- Dates must be **Carbon-parseable**, supported formats include: 
    - 2023-09-01T09:29:41.000000Z
    - 2023-09-01 09:29:41
    - 2023-09-01 (defaults to midnight if no time is provided)

#### Pagination Conventions

<table border="1" id="bkmrk-parameter-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Parameter**  
</td><td>**Description**  
</td><td>**Example**  
</td></tr><tr><td>`page`</td><td>The page number (default: 1)</td><td>`?page=2`</td></tr><tr><td>`per_page`</td><td>The number of results per page (default: 24, max: 96)</td><td>`?per_page=48`</td></tr><tr><td>`ids`</td><td>Comma-separated list of IDs to fetch</td><td>`?ids=1,2,5`</td></tr><tr><td>`min_updated_at`</td><td>The min updated at for a product</td><td>`?min_updated_at=2023-08-30%2010:35:05`</td></tr><tr><td>`max_updated_at`</td><td>The max updated at for a product</td><td>`?max_updated_at=2023-08-30%2010:35:05`</td></tr></tbody></table>

<p class="callout info">The `min_updated_at` and `max_updated_at` parameters are only supported by index endpoints.</p>

Responses follow Laravel's pagination format, e.g.:

```
{
    "current_page": 1,
    "data": [
        //...
    ],
    "first_page_url": "http://aero.test/api/products?page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "http://aero.test/api/products?page=2",
    "next_page_url": "http://aero.test/api/products?page=2",
    "path": "http://aero.test/api/products",
    "per_page": 24,
    "prev_page_url": null,
    "to": 24,
    "total": 29
}
```

#### Scope Conventions

- Index endpoints support a scope parameter, which is a comma-separated list of scopes.
- Supported scopes are endpoint-specific and documented in endpoint-specific example docs.

#### Image Factory Conventions

<table border="1" id="bkmrk-parameter-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Parameter**  
</td><td>**Description**  
</td><td>**Example**  
</td></tr><tr><td>`image_factory_width`</td><td>Output image width</td><td>`?image_factory_width=200`</td></tr><tr><td>`image_factory_height`</td><td>Output image height</td><td>`?image_factory_height=200`</td></tr><tr><td>`image_factory_options`</td><td>Comma-seperated options</td><td>`?image_factory_options=flip,greyscale`</td></tr></tbody></table>

<p class="callout info">If any of these query parameters are present in the GET requests, Image Factory will be applied.</p>

# What responses does the API return?

<table border="1" id="bkmrk-code-scenario-200-su" style="border-collapse: collapse; width: 100%; height: 29.7969px;"><colgroup><col style="width: 50.0596%;"></col><col style="width: 50.0596%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Code**  
</td><td style="height: 29.7969px;">**Scenario**  
</td></tr><tr><td>`200 Success`</td><td>The request was processed successfully.</td></tr><tr><td>`201 Created`  
</td><td>One (or multiple) resources were created.</td></tr><tr><td>`400 Bad Request`   
</td><td>Cannot process request due to client error.</td></tr><tr><td>`401 Unauthorised`  
</td><td>Invalid bearer token provided.</td></tr><tr><td>`404 Not Found`  
</td><td>Endpoint not found.</td></tr><tr><td>`422 Unprocessable Content`  
</td><td>Payload failed validation.</td></tr><tr><td>`500 Internal Server Error`  
</td><td>  
</td></tr></tbody></table>

#### Examples

##### `200 Success`

```
GET /api/orders/{id}
```

```json
{
    "reference": "ABC123",
    "email": "acme@aerocommerce.com",
    "subtotal": {
        "amount": 84166.67,
        "tax": 16833.33
    },
    "shipping": {
        "amount": 83.33,
        "tax": 16.67
    },
    "discount": {
        "amount": 8416.67,
        "tax": 1683.33
    },
    "surcharge": {
        "amount": 0,
        "tax": 0
    },
    "ordered_at": "2023-09-01T09:29:41.000000Z",
    "deliver_on": null,
    "currency": "GBP",
    "status": {
        "id": 3,
        "name": "Successful",
        "state": "successful"
    },
    "customer": {
        "id": 1,
        "name": "Acme",
        "email": "acme@aerocommerce.com"
    },
    "shipping_method": {
        "id": 1,
        "name": "Standard"
    },
    "billing_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "reference": null,
        "country": "GB",
        "eori_number": null
    },
    "shipping_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "reference": null,
        "country": "GB",
        "eori_number": null
    },
    "items": [
        {
            "id": 1,
            "name": "Test",
            "sku": "TEST-S",
            "product_id": 4,
            "variant_id": 14,
            "shippable": true,
            "quantity": 2,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            },
            "full_price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "weight": 0,
            "volume": 0
        }
    ]
}
```

##### `201 Created`

```
POS /api/orders
```

```json
{
    "order": {
        "id": 15
    }
}
```

##### `400 Bad Request`

```
GET /api/orders/{id}
```

```json
{
    "message": "Missing order ID"
}
```

##### `401 Unauthorised`

```
GET /api/orders/{id}
```

```json
{
    "message": "Unauthorized: Bearer token missing."
}
```

##### `404 Not Found`

```
GET /api/orders/{id}
```

```json
{
    "message": "The requested order with ID {id} could not be found."
}
```

##### `422 Unprocessable Content`

```
POST /api/orders
```

```json
{
    "message": "The given data was invalid.",
    "errors": {
        "currency": ["The currency field is required."]
    }
}
```

##### `500 Internal Server Error`

```json
{
    "message": "Exception message..."
}
```

# Orders

# Order Index Endpoint

This endpoint retrieves a paginated list of all orders

#### Structure

See [`Order View Endpoint`](https://support.aerocommerce.com/books/api/page/order-view-endpoint) for the structure of the order payload inside the `data` array.

---

#### Scopes

<table border="1" id="bkmrk-name-description-exa" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Description**  
</td><td>**Example**  
</td></tr><tr><td>`visible`</td><td>Only return visible orders (those which have been ordered)</td><td>`?scope=visible`</td></tr><tr><td>`outstanding`</td><td>Only return outstanding orders</td><td>`?scope=outstanding`</td></tr><tr><td>`completed`</td><td>Only return completed orders</td><td>`?scope=completed`</td></tr><tr><td>`incomplete`</td><td>Only return incomplete orders</td><td>`?scope=incomplete`</td></tr><tr><td>`express`</td><td>Only return express orders</td><td>`?scope=express`</td></tr><tr><td>`standard`</td><td>Only return standard orders</td><td>`?scope=standard`</td></tr></tbody></table>

---

#### Filters

<table border="1" id="bkmrk-name-description-exa-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Description**  
</td><td>**Example**  
</td></tr><tr><td>`reference`</td><td>Only return orders with specific references</td><td>`?references=ABC123,DEF456`</td></tr><tr><td>`statuses`</td><td>Only return orders with specific status ids or names</td><td>`?statuses=1,On Hold`</td></tr><tr><td>`states`</td><td>Only return orders with specific states</td><td>`?states=dispatched,returned`</td></tr><tr><td>`customers`</td><td>Only return orders with specific customers (by id or email)</td><td>`?customers=1,test@gmail.com`</td></tr><tr><td>`emails`</td><td>Only return orders for specific emails</td><td>`?emails=test@gmail.com`</td></tr><tr><td>`channels`</td><td>Only return orders for specific channels</td><td>`?channels=web,api`</td></tr><tr><td>`flags`</td><td>Only return orders for specific flags (by `id`, `name`, or `name|value`)</td><td>`?flags=1,abc,def|123`</td></tr></tbody></table>

---

```
GET /api/orders?per_page=2&min_ordered_at=2023-08-30%2010:36:23
```

```json
{
    "current_page": 1,
    "data": [
      //...
    ],
    "first_page_url": "http://aero.test/api/orders?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "http://aero.test/api/orders?page=3",
    "next_page_url": "http://aero.test/api/orders?page=2",
    "path": "http://aero.test/api/orders",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 5
}
```

<p class="callout info">See [`Order View Endpoint`](https://support.aerocommerce.com/books/api/page/order-view-endpoint) for the structure of the order payload inside the `data` array.</p>

# Order View Endpoint

This endpoint retrieves a single order by `id` or `reference`.

#### Structure

##### Order

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 907.313px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`reference`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The **unique** reference for the order</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`status`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">The [Order Status](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-order-status) of the order (`null` if none)</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`customer`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">The [Customer](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-customer) of the order (`null` if none)</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`email`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The email of the customer that placed the order</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`subtotal.amount`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The subtotal of the order **excluding tax**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`subtotal.tax`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The subtotal tax for the order</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`shipping.amount`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The shipping of the order **excluding tax**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`shipping.tax`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The shipping tax for the order</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`discount.amount`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The discount of the order **excluding tax**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`discount.tax`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The discount tax for the order</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`surcharge.amount`</td><td style="height: 46.5938px;">float</td><td style="height: 46.5938px;">The surcharge of the order **excluding tax**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`surcharge.tax`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">The surcharge tax for the order</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`currency`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The currency code of the order</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`shipping_method`</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">The [Shipping Method](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-shipping-method) of the order (`null` if none)</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`shipping_address`</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">The [Shipping Address](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-shipping-address) of the order (`null` if none)</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`billing_address `</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">The [Billing Address](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-billing-address) of the order (`null` if none)</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`ordered_at`</td><td style="height: 29.7969px;">timestamp</td><td style="height: 29.7969px;">When the order was ordered</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`deliver_on`</td><td style="height: 29.7969px;">timestamp</td><td style="height: 29.7969px;">When the order should be delivered</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`items`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Order Item](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-order-item) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`payments`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Payment](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-payment) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`fulfillments`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Fulfillment](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-fulfillment) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`returns`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Return](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-return) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`comments`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Comment](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-comment) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`additional_attributes`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-additional-attribute) objects</td></tr></tbody></table>

##### Order Status

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order status</td></tr><tr><td>`name`</td><td>string</td><td>The name of the order status</td></tr><tr><td>`state`</td><td>string</td><td>The state of the order status</td></tr></tbody></table>

**Valid states:** cancelled, on\_hold, successful, complete, processing, closed, partially\_dispatched, dispatched, partially\_returned, returned

##### Customer

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 119.188px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`id`</td><td style="height: 29.7969px;">int</td><td style="height: 29.7969px;">The id of the customer</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`name`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The name of the customer</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`email`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The email of the customer</td></tr></tbody></table>

##### Shipping Method

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 119.188px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the shipping method</td></tr><tr><td>`name`</td><td>string</td><td>The name of the shipping method</td></tr></tbody></table>

##### Shipping Address

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 119.188px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`first_name`</td><td>string</td><td>The first name for the shipping address</td></tr><tr><td>`last_name`</td><td>string</td><td>The last name for the shipping address</td></tr><tr><td>`company`</td><td>string</td><td>The company for the shipping address</td></tr><tr><td>`mobile`</td><td>string</td><td>The mobile number for the shipping address</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the shipping address</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the shipping address</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the shipping address</td></tr><tr><td>`city`</td><td>string</td><td>The city for the shipping address</td></tr><tr><td>`county`</td><td>string</td><td>The county for the shipping address</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the shipping address</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the shipping address</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the shipping address</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the shipping address</td></tr><tr><td>`eori_number`</td><td>string</td><td>The EORI number for the shipping address</td></tr></tbody></table>

##### Billing Address

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`first_name`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The first name for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`last_name`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The last name for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`company`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The company for the billing address</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`mobile`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The mobile number for the billing address</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`phone`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The phone number for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`line_1`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The first line for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`line_2`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The second line for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`city`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The city for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`county`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The county for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`zone`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The zone code for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`postcode`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The postcode for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`country`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The country code for the billing address</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`reference`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The **unique** reference for the billing address</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`eori_number`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The EORI number for the billing address</td></tr></tbody></table>

##### Order Item

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order item</td></tr><tr><td>`variant_id`</td><td>int</td><td>The variant id of the buyable (not set if the buyable is not a variant)</td></tr><tr><td>`product_id`</td><td>int</td><td>The product id of the buyable</td></tr><tr><td>`buyable_type`</td><td>string</td><td>The buyable type of the order item</td></tr><tr><td>`buyable_id`</td><td>int</td><td>The buyable id of the order item</td></tr><tr><td>`name`</td><td>string</td><td>The name for the order item</td></tr><tr><td>`url`</td><td>string</td><td>The url for the order item</td></tr><tr><td>`sku`</td><td>string</td><td>The sku for the order item</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the order item</td></tr><tr><td>`manufacturer`</td><td>object</td><td>The [Manufacturer](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-manufacturer) for the order item (`null` if none)</td></tr><tr><td>`image.url`</td><td>string</td><td>The image url for the order item</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the order item is shippable</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity for the order item</td></tr><tr><td>`returned_quantity`</td><td>int</td><td>The quantity returned for the order item</td></tr><tr><td>`price.amount`</td><td>float</td><td>The **unit** price of the order item **excluding tax**</td></tr><tr><td>`price.tax`</td><td>float</td><td>The **unit** tax for the order item</td></tr><tr><td>`discount.amount`</td><td>float</td><td>The **total** discount of the order item **excluding tax**</td></tr><tr><td>`discount.tax`</td><td>float</td><td>The **total** discount tax for the order item</td></tr><tr><td>`full_price.amount`</td><td>float</td><td>The **unit** full price (including extras) of the order item **excluding tax**</td></tr><tr><td>`full_price.tax`</td><td>float</td><td>The **unit** full tax (including extras) for the order item</td></tr><tr><td>`cost_price.amount`</td><td>float</td><td>The **unit** cost price of the order item **excluding tax**</td></tr><tr><td>`cost_price.currency`</td><td>string</td><td>The currency code for the cost price</td></tr><tr><td>`weight`</td><td>float</td><td>The weight for the order item</td></tr><tr><td>`weight_unit`</td><td>float</td><td>The weight unit for the order item, defaults to stores normalized  
weight unit</td></tr><tr><td>`volume`</td><td>float</td><td>The volume for the order item</td></tr><tr><td>`volume_unit`</td><td>float</td><td>The volume unit for the order item, defaults to stores normalized  
volume unit</td></tr><tr><td>`hs`</td><td>string</td><td>The HS code for the order item</td></tr><tr><td>`origin_country`</td><td>string</td><td>The origin country code for the order item</td></tr><tr><td>`goods_description`</td><td>string</td><td>The goods description for the order item</td></tr></tbody></table>

##### Manufacturer

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the manufacturer</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td></tr></tbody></table>

##### Payment

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the payment</td></tr><tr><td>`method`</td><td>object</td><td>The [Payment Method](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-payment-method) for the payment</td></tr><tr><td>`reference`</td><td>string</td><td>The reference for the payment</td></tr><tr><td>`state`</td><td>string</td><td>The state of the payment</td></tr><tr><td>`amount`</td><td>float</td><td>The total amount for the payment</td></tr><tr><td>`currency`</td><td>string</td><td>The currency code for the payment</td></tr><tr><td>`captured_at`</td><td>timestamp</td><td>The date the payment was captured</td></tr></tbody></table>

##### Payment Method

<table border="1" id="bkmrk-name-type-descriptio-9" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the payment method</td></tr><tr><td>`name`</td><td>string</td><td>The name of the payment method</td></tr><tr><td>`driver`</td><td>string</td><td>The driver of the payment method</td></tr></tbody></table>

##### Fulfillment

<table border="1" id="bkmrk-name-type-descriptio-10" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order return</td></tr><tr><td>`method`</td><td>object</td><td>The [Fulfillment Method](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-fulfillment-method) for the fulfillment</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the fulfillment</td></tr><tr><td>`state`</td><td>string</td><td>The state of the fulfillment</td></tr><tr><td>`mobile`</td><td>string</td><td>The mobile number for the fulfillment</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the fulfillment</td></tr><tr><td>`tracking_code`</td><td>string</td><td>The tracking code for the fulfillment</td></tr><tr><td>`tracking_url`</td><td>string</td><td>The tracking url for the fulfillment</td></tr><tr><td>`weight`</td><td>float</td><td>The weight for the fulfillment</td></tr><tr><td>`weight_unit`</td><td>string</td><td>The weight unit for the fulfillment, defaults to stores normalized  
weight unit</td></tr><tr><td>`volume`</td><td>float</td><td>The volume for the order item</td></tr><tr><td>`volume_unit`</td><td>string</td><td>The volume unit for the fulfillment, defaults to stores normalized  
volume unit</td></tr><tr><td>`delivery_note`</td><td>string</td><td>The delivery note for the fulfillment</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date the fulfillment was made</td></tr><tr><td>`items`</td><td>array</td><td>An array of [Fulfillment Items](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-fulfillment-items) objects</td></tr></tbody></table>

##### Fulfillment Method

<table border="1" id="bkmrk-name-type-descriptio-11" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the fulfillment method</td></tr><tr><td>`name`</td><td>string</td><td>The name of the fulfillment method</td></tr><tr><td>`driver`</td><td>string</td><td>The driver of the fulfillment method</td></tr></tbody></table>

##### Fulfillment Items

<table border="1" id="bkmrk-name-type-descriptio-12" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order item that was fulfilled</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity of the order item that was fulfilled</td></tr></tbody></table>

##### Return

<table border="1" id="bkmrk-name-type-descriptio-13" style="border-collapse: collapse; width: 100%; height: 171.383px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`id`</td><td style="height: 29.7969px;">int</td><td style="height: 29.7969px;">The id of the order return</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`reason`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The reason for the return - `null` if no reason given</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`created_at`</td><td style="height: 29.7969px;">timestamp</td><td style="height: 29.7969px;">The date the return was made</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`items`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Return Item](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-return-item) objects</td></tr></tbody></table>

##### Return Item

<table border="1" id="bkmrk-name-type-descriptio-14" style="border-collapse: collapse; width: 100%; height: 186.375px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`id`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The id of the order item that was returned</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`quantity`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The quantity of the order item that was returned</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`exchanged_for_id`</td><td style="height: 63.3906px;">int</td><td style="height: 63.3906px;">The id of the order item that the item was returned for (`null` if the item was not exchanged)</td></tr></tbody></table>

##### Comment

<table border="1" id="bkmrk-name-type-descriptio-15" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`admin`</td><td>object</td><td>The [Admin](https://support.aerocommerce.com/books/api/page/order-view-endpoint#bkmrk-admin) who commented</td></tr><tr><td>`message`</td><td>string</td><td>The comment message</td></tr><tr><td>`customer_facing`</td><td>boolean</td><td>Whether the comment is customer facing</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date the comment was created</td></tr></tbody></table>

##### Admin

<table border="1" id="bkmrk-name-type-descriptio-16" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the admin</td></tr><tr><td>`name`</td><td>string</td><td>The name of the admin</td></tr><tr><td>`email`</td><td>string</td><td>The email of the admin</td></tr></tbody></table>

##### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-17" style="border-collapse: collapse; width: 100%; height: 497.344px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td></tr></tbody></table>

---

#### Example Requests

<details id="bkmrk-unfulfilled-%26-unretu"><summary>Unfulfilled &amp; Unreturned Order</summary>

```
GET /api/orders/{id|reference}
```

```json
{
    "id": 1,
    "reference": "ABC123",
    "email": "testing@gmail.com",
    "subtotal": {
        "amount": 84166.67,
        "tax": 16833.33
    },
    "shipping": {
        "amount": 83.33,
        "tax": 16.67
    },
    "discount": {
        "amount": 8416.67,
        "tax": 1683.33
    },
    "surcharge": {
        "amount": 0,
        "tax": 0
    },
    "ordered_at": "2023-09-01T09:29:41.000000Z",
    "deliver_on": null,
    "currency": "GBP",
    "status": {
        "id": 3,
        "name": "Successful",
        "state": "successful"
    },
    "customer": {
        "id": 1,
        "name": "Test",
        "email": "test@gmail.com"
    },
    "shipping_method": {
        "id": 1,
        "name": "Standard"
    },
    "billing_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "reference": null,
        "country": "GB",
        "eori_number": null
    },
    "shipping_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "reference": null,
        "country": "GB",
        "eori_number": null
    },
    "items": [
        {
            "id": 148,
            "name": "Sandro Paris Checked Trench Coat",
            "sku": "SHPMA00148-M",
            "product_id": 4,
            "variant_id": 14,
            "shippable": true,
            "quantity": 2,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            },
            "full_price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "weight": 0,
            "volume": 0
        }
    ],
    "payments": [
        {
            "id": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "method": {
                "id": 1,
                "name": "Cash",
                "driver": "cash"
            },
            "reference": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "amount": 91000,
            "currency": "GBP",
            "captured_at": "2023-09-12T10:17:03.000000Z"
        }
    ],
    "fulfillments": [],
    "returns": [],
    "comments": [
        {
            "admin": {
                "id": 1,
                "name": "Admin",
                "email": "admin@example.com"
            },
            "message": "This is an API message",
            "customer_facing": true,
            "created_at": "2025-09-01 09:29:41"
        }
    ]
}
```

</details><details id="bkmrk-fulfilled-order-get-"><summary>Fulfilled Order</summary>

```
GET /api/orders/{id|reference}
```

```json
{
    "id": 1,
    "reference": "ABC123",
    "email": "testing@gmail.com",
    "subtotal": {
        "amount": 84166.67,
        "tax": 16833.33
    },
    "shipping": {
        "amount": 83.33,
        "tax": 16.67
    },
    "discount": {
        "amount": 8416.67,
        "tax": 1683.33
    },
    "surcharge": {
        "amount": 0,
        "tax": 0
    },
    "currency": "GBP",
    "ordered_at": "2023-09-01T08:29:41.000000Z",
    "deliver_on": null,
    "status": {
        "id": 6,
        "name": "Dispatched",
        "state": "dispatched"
    },
    "customer": {
        "id": 1,
        "name": "Test",
        "email": "test@gmail.com"
    },
    "shipping_method": {
        "id": 1,
        "name": "Standard"
    },
    "billing_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "shipping_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "items": [
        {
            "id": 26,
            "name": "Sandro Paris Checked Trench Coat",
            "url": "/product/sandro-paris-checked-trench-coat-4?variant=2",
            "sku": "SHPMA00148-M",
            "reference": null,
            "manufacturer": {
                "id": 2,
                "name": "Sandro Paris"
            },
            "image": {
                "url": "http://l9.test/storage/images/products/uaaVbTbqbZxs1FH3N28Tw0a7dc6I7Xd08DiyPAG6.jpg"
            },
            "product_id": 4,
            "variant_id": 14,
            "buyable_type": "variant",
            "buyable_id": 14,
            "shippable": true,
            "quantity": 2,
            "returned_quantity": 0,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            },
            "full_price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "weight": 0,
            "volume": 0,
            "cost_price": {
                "amount": null,
                "currency": null
            },
            "hs": null,
            "origin_country": null,
            "goods_description": null
        }
    ],
    "flags": [],
    "payments": [
        {
            "id": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "method": {
                "id": 1,
                "name": "Cash",
                "driver": "cash"
            },
            "reference": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "state": "captured",
            "amount": 91000,
            "currency": "GBP",
            "captured_at": "2023-09-12T10:17:03.000000ZZ",
            "refunds": []
        }
    ],
    "fulfillments": [
        {
            "id": 3,
            "method": {
                "id": 1,
                "name": "Manual Fulfillment",
                "driver": "manual"
            },
            "address": {
                "id": 3,
                "first_name": "Aero",
                "last_name": "Commerce",
                "company": "Aero Commerce",
                "mobile": null,
                "phone": null,
                "line_1": "28-32 Albert Rd",
                "line_2": null,
                "city": "Middlesbrough",
                "zone": null,
                "postcode": "TS1 1QD",
                "country": "GB",
                "eori_number": null
            },
            "reference": "F3-128",
            "state": "successful",
            "mobile": null,
            "email": "testing@gmail.com",
            "tracking_code": "test tracking code",
            "tracking_url": null,
            "weight": 0,
            "weight_unit": null,
            "volume": 0,
            "volume_unit": "cm^3",
            "delivery_note": "test delivery note",
            "created_at": "2023-09-12T10:17:03.000000Z",
            "items": [
                {
                    "id": 26,
                    "quantity": 2
                }
            ]
        }
    ],
    "returns": [],
    "comments": []
}
```

</details><details id="bkmrk-returned-order-%28exch"><summary>Returned Order (Exchange)</summary>

```
GET /api/orders/{id|reference}
```

```json
{
    "id": 1,
    "reference": "ABC123",
    "email": "testing@gmail.com",
    "subtotal": {
        "amount": 84166.67,
        "tax": 16833.33
    },
    "shipping": {
        "amount": 83.33,
        "tax": 16.67
    },
    "discount": {
        "amount": 8416.67,
        "tax": 1683.33
    },
    "surcharge": {
        "amount": 0,
        "tax": 0
    },
    "currency": "GBP",
    "ordered_at": "2023-09-01T08:29:41.000000Z",
    "deliver_on": null,
    "status": {
        "id": 7,
        "name": "Partially Returned",
        "state": "partially_returned"
    },
    "customer": {
        "id": 1,
        "name": "Test",
        "email": "test@gmail.com"
    },
    "shipping_method": {
        "id": 1,
        "name": "Standard"
    },
    "billing_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "shipping_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "items": [
        {
            "id": 26,
            "name": "Sandro Paris Checked Trench Coat",
            "url": "/product/sandro-paris-checked-trench-coat-4?variant=2",
            "sku": "SHPMA00148-M",
            "reference": null,
            "manufacturer": {
                "id": 2,
                "name": "Sandro Paris"
            },
            "image": {
                "url": "http://l9.test/storage/images/products/uaaVbTbqbZxs1FH3N28Tw0a7dc6I7Xd08DiyPAG6.jpg"
            },
            "product_id": 4,
            "variant_id": 14,
            "buyable_type": "variant",
            "buyable_id": 14,
            "shippable": true,
            "quantity": 2,
            "returned_quantity": 0,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            },
            "full_price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "weight": 0,
            "volume": 0,
            "cost_price": {
                "amount": null,
                "currency": null
            },
            "hs": null,
            "origin_country": null,
            "goods_description": null
        }
    ],
    "flags": [],
    "payments": [
        {
            "id": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "method": {
                "id": 1,
                "name": "Cash",
                "driver": "cash"
            },
            "reference": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "state": "captured",
            "amount": 91000,
            "currency": "GBP",
            "captured_at": "2023-09-12T10:17:03.000000ZZ",
            "refunds": []
        }
    ],
    "fulfillments": [],
    "returns": [
        {
            "id": 1,
            "reason": "Test Reason",
            "created_at": "2023-09-12T10:17:03.000000ZZ",
            "items": [
                {
                    "id": 26,
                    "quantity": 2,
                    "exchanged_for_id": 27
                }
            ]
        }
    ],
    "comments": []
}
```

</details><details id="bkmrk-returned-order-%28refu"><summary>Returned Order (Refund)</summary>

```
GET /api/orders/{id|reference}
```

```json
{
    "id": 1,
    "reference": "ABC123",
    "email": "testing@gmail.com",
    "subtotal": {
        "amount": 84166.67,
        "tax": 16833.33
    },
    "shipping": {
        "amount": 83.33,
        "tax": 16.67
    },
    "discount": {
        "amount": 8416.67,
        "tax": 1683.33
    },
    "surcharge": {
        "amount": 0,
        "tax": 0
    },
    "currency": "GBP",
    "ordered_at": "2023-09-01T08:29:41.000000Z",
    "deliver_on": null,
    "status": {
        "id": 8,
        "name": "Returned",
        "state": "returned"
    },
    "customer": {
        "id": 1,
        "name": "Test",
        "email": "test@gmail.com"
    },
    "shipping_method": {
        "id": 1,
        "name": "Standard"
    },
    "billing_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "shipping_address": {
        "id": 1,
        "first_name": "Aero",
        "last_name": "Commerce",
        "company": "Aero Commerce",
        "mobile": null,
        "phone": null,
        "line_1": "28-32 Albert Rd",
        "line_2": null,
        "city": "Middlesbrough",
        "zone": null,
        "postcode": "TS1 1QD",
        "country": "GB",
        "eori_number": null
    },
    "items": [
        {
            "id": 26,
            "name": "Sandro Paris Checked Trench Coat",
            "url": "/product/sandro-paris-checked-trench-coat-4?variant=2",
            "sku": "SHPMA00148-M",
            "reference": null,
            "manufacturer": {
                "id": 2,
                "name": "Sandro Paris"
            },
            "image": {
                "url": "http://l9.test/storage/images/products/uaaVbTbqbZxs1FH3N28Tw0a7dc6I7Xd08DiyPAG6.jpg"
            },
            "product_id": 4,
            "variant_id": 14,
            "buyable_type": "variant",
            "buyable_id": 14,
            "shippable": true,
            "quantity": 2,
            "returned_quantity": 0,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            },
            "full_price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "weight": 0,
            "volume": 0,
            "cost_price": {
                "amount": null,
                "currency": null
            },
            "hs": null,
            "origin_country": null,
            "goods_description": null
        }
    ],
    "flags": [],
    "payments": [
        {
            "id": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "method": {
                "id": 1,
                "name": "Cash",
                "driver": "cash"
            },
            "reference": "a53c31f9-43bd-4fc4-b308-cded0b533a2c",
            "state": "captured",
            "amount": 91000,
            "currency": "GBP",
            "captured_at": "2023-09-12T10:17:03.000000ZZ",
            "refunds": [
                {
                    "id": 1,
                    "amount": 91000,
                    "created_at": "2025-09-16T07:40:22.000000Z"
                }
            ]
        }
    ],
    "fulfillments": [],
    "returns": [
        {
            "id": 1,
            "reason": "Test reason",
            "created_at": "2025-09-16T07:40:22.000000Z",
            "items": [
                {
                    "id": 28,
                    "quantity": 2,
                    "exchanged_for_id": null
                }
            ]
        }
    ],
    "comments": []
}
```

</details>