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

### Size Guides

<table border="1" id="bkmrk-method-endpoint-perm-24" 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/size-guides`</td><td>`size-guides.index`</td><td>List size guides</td></tr><tr><td>`GET`</td><td>`/api/size-guides/{id}`</td><td>`size-guides.view`</td><td>Get a size guide</td></tr><tr><td>`POST`</td><td>`/api/size-guides`</td><td>`size-guides.store`</td><td>Create a size guide</td></tr><tr><td>`PUT`</td><td>`/api/size-guides/{id}`</td><td>`size-guides.update`</td><td>Update a size guide</td></tr></tbody></table>

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

# 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

## Structure

See [`View Order Endpoint`](https://support.aerocommerce.com/books/api/page/view-order-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 [`View Order Endpoint`](https://support.aerocommerce.com/books/api/page/view-order-endpoint) for the structure of the order payload inside the `data` array.</p>

# View Order Endpoint

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

---

## Examples

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

##### Request

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

##### Response

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

##### Request

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

##### Response

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

##### Request

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

##### Response

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

##### Request

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

##### Response

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

# Create Order Endpoint

## Structure

### Order

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the order</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the order</td><td>Yes</td></tr><tr><td>`status_id`</td><td>int</td><td>The status id of the order, can also be resolved from `state`</td><td>If `ordered_at` is not null</td></tr><tr><td>`state`</td><td>string</td><td>Alternative to passing `status_id`, resolves the first status with the specified state</td><td>No</td></tr><tr><td>`customer_id`</td><td>int</td><td>The id of the customer that placed the order</td><td>No</td></tr><tr><td>`email`</td><td>string</td><td>The email of the customer that placed the order</td><td>No</td></tr><tr><td>`subtotal.amount`</td><td>float</td><td>The subtotal of the order **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`subtotal.tax`</td><td>float</td><td>The subtotal tax for the order (in pence not pounds)</td><td>No</td></tr><tr><td>`shipping.amount`</td><td>float</td><td>The shipping of the order **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`shipping.tax`</td><td>float</td><td>The shipping tax for the order (in pence not pounds)</td><td>No</td></tr><tr><td>`discount.amount`</td><td>float</td><td>The discount of the order **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`discount.tax`</td><td>float</td><td>The discount tax for the order (in pence not pounds)</td><td>No</td></tr><tr><td>`surcharge.amount`</td><td>float</td><td>The surcharge of the order **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`surcharge.tax`</td><td>float</td><td>The surcharge tax for the order (in pence not pounds)</td><td>No</td></tr><tr><td>`shipping_method_id`</td><td>int</td><td>The shipping method id of the order</td><td>No</td></tr><tr><td>`currency`</td><td>string</td><td>The currency of the order, (defaults to store default if not provided)</td><td>No</td></tr><tr><td>`exchange_rate`</td><td>float</td><td>The exchange rate of the order (derives from currency if not supplied)</td><td>No</td></tr><tr><td>`shipping_address`</td><td>object</td><td>The [Shipping Address](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-shipping-address) for the order</td><td>No</td></tr><tr><td>`billing_address `</td><td>object</td><td>The [Billing Address](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-billing-address) for the order</td><td>No</td></tr><tr><td>`ip`</td><td>string</td><td>The ip of the order</td><td>No</td></tr><tr><td>`channel`</td><td>string</td><td>The channel of the order</td><td>No</td></tr><tr><td>`subscription_id`</td><td>int</td><td>The subscription id of the order</td><td>No</td></tr><tr><td>`notify`</td><td>boolean</td><td>Whether the order notifications are activated (defaults to `true`)</td><td>No</td></tr><tr><td>`buy_items`</td><td>boolean</td><td>Whether the order items stock should be mutated. If false then `OrderItemBought` event will not be emit (defaults to `true`)</td><td>No</td></tr><tr><td>`ordered_at`</td><td>timestamp</td><td>When the order was ordered</td><td>No</td></tr><tr><td>`deliver_on`</td><td>timestamp</td><td>When the order should be delivered</td><td>No</td></tr><tr><td>`items`</td><td>array</td><td>An array of [Order Item](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-order-item) objects</td><td>Yes</td></tr><tr><td>`payments`</td><td>array</td><td>An array of [Payment](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-payment) objects</td><td>No</td></tr><tr><td>`fulfillments`</td><td>array</td><td>An array of [Fulfillment](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-fulfillment) objects</td><td>No</td></tr><tr><td>`comments`</td><td>array</td><td>An array of [Comment](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-comment) objects</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr></tbody></table>

<p class="callout info">If no `subtotal.amount` or `subtotal.tax` is passed their values will be set to the sum of the items `price.amount` \* `quantity` &amp; `price.tax` \* `quantity` respectively.</p>

<p class="callout info">If no `discount.amount` or `discount.tax` is passed their values will be set to the sum of the items `discount.amount` &amp; `discount.tax` respectively.</p>

### Shipping Address

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 635.516px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`first_name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The first name for the shipping address</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`last_name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The last name for the shipping address</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`company`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The company for the shipping address</td><td style="height: 46.5938px;">No</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 shipping address</td><td style="height: 46.5938px;">No</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 shipping address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`line_1`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The first line for the shipping address</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`line_2`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The second line for the shipping address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`city`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The city for the shipping address</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`zone`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The zone code for the shipping address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`postcode`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The postcode for the shipping address</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`country`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The country code for the shipping address</td><td style="height: 46.5938px;">No</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 shipping address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`eori_number`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The EORI number for the shipping address</td><td style="height: 46.5938px;">No</td></tr></tbody></table>

### Billing Address

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

### Order Item

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The unique key for the order item</td><td>No</td></tr><tr><td>`variant_id`</td><td>int</td><td>The variant id of the buyable</td><td>No</td></tr><tr><td>`product_id`</td><td>string</td><td>The product id of the buyable (resolves first variant unless variant\_id is provided)</td><td>No</td></tr><tr><td>`buyable_type`</td><td>string</td><td>The buyable type of the order item</td><td>Not required if any of:  
`sku`/`variant_id`/`product_id` are provided</td></tr><tr><td>`buyable_id`</td><td>int</td><td>The buyable id of the order item</td><td>Not required if any of:  
`sku`/`variant_id`/`product_id` are provided</td></tr><tr><td>`name`</td><td>string</td><td>The name for the order item</td><td>Conditional `*`</td></tr><tr><td>`url`</td><td>string</td><td>The url for the order item</td><td>No</td></tr><tr><td>`sku`</td><td>string</td><td>The sku for the order item, can be used to resolve buyable</td><td>Conditional `*`</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the order item</td><td>No</td></tr><tr><td>`manufacturer_id`</td><td>int</td><td>The manufacturer id for the order item</td><td>No</td></tr><tr><td>`image`</td><td>string</td><td>The image for the order item</td><td>No</td></tr><tr><td>`options`</td><td>array</td><td>The options for the order item</td><td>No</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the order item is shippable</td><td>No</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity for the order item</td><td>Yes</td></tr><tr><td>`price.amount`</td><td>float</td><td>The **unit** price of the order item **excluding tax** (in pence not pounds)</td><td>Yes</td></tr><tr><td>`price.tax`</td><td>float</td><td>The **unit** tax for the order item (in pence not pounds)</td><td>Yes</td></tr><tr><td>`discount.amount`</td><td>float</td><td>The **total** discount of the order item **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`discount.tax`</td><td>float</td><td>The **total** discount tax for the order item (in pence not pounds)</td><td>No</td></tr><tr><td>`full_price.amount`</td><td>float</td><td>The **unit** full price (including extras) of the order item **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`full_price.tax`</td><td>float</td><td>The **unit** full tax (including extras) for the order item (in pence not pounds)</td><td>No</td></tr><tr><td>`cost_price.amount`</td><td>float</td><td>The **unit** cost price of the order item **excluding tax** (in pence not pounds)</td><td>No</td></tr><tr><td>`cost_price.currency`</td><td>string</td><td>The currency code for the cost price</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>The weight for the order item</td><td>No</td></tr><tr><td>`weight_unit`</td><td>float</td><td>The weight unit for the order item, defaults to stores normalized  
weight unit if not passed</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>The volume for the order item</td><td>No</td></tr><tr><td>`volume_unit`</td><td>float</td><td>The volume unit for the order item, defaults to stores normalized  
volume unit if not passed</td><td>No</td></tr><tr><td>`tag_ids`</td><td>array</td><td>The tag ids for the order item</td><td>No</td></tr><tr><td>`hs`</td><td>string</td><td>The HS code for the order item</td><td>No</td></tr><tr><td>`origin_country`</td><td>string</td><td>The origin country code for the order item</td><td>No</td></tr><tr><td>`subscription_plan_id`</td><td>int</td><td>The subscription plan id for the order item</td><td>No</td></tr><tr><td>`goods_description`</td><td>string</td><td>The goods description for the order item</td><td>No</td></tr></tbody></table>

`*` If no buyable can be resolved from the given data, the `sku` is required - as is the `name`.

<p class="callout info">`price`, `discount` &amp; `full_price` all support an un-nested price including tax being passed, see [Price Conventions](https://support.aerocommerce.com/link/726#bkmrk-price-conventions).</p>

### Payment

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`method_id`</td><td>int</td><td>The payment method id of the payment</td><td>Not required if `driver` is passed</td></tr><tr><td>`driver`</td><td>string</td><td>Payment driver used to resolve `method_id`</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference for the payment, if not specified a uuid will be generated</td><td>No</td></tr><tr><td>`state`</td><td>string</td><td>The state for the payment, if not specified the captured state will be used</td><td>No</td></tr><tr><td>`amount`</td><td>float</td><td>The total amount for the payment</td><td>Yes</td></tr></tbody></table>

**Valid states:** failed, pending, authorized, partially captured, captured, partially refunded, refunded, canceled, errored

### Fulfillment

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the fulfillment</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference for the fulfillment</td><td>No</td></tr><tr><td>`state`</td><td>string</td><td>The state of the fulfillment (defaults to method's default if not passed)</td><td>No</td></tr><tr><td>`method`</td><td>int| string</td><td>The fulfillment method's id, name or driver (defaults to orders' default if not passed)</td><td>No</td></tr><tr><td>`tracking_code`</td><td>string</td><td>The tracking code for the fulfillment</td><td>No</td></tr><tr><td>`tracking_url`</td><td>url</td><td>The tracking url for the fulfillment</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>The total weight of the fulfillment (calculated from items if not passed)</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>The weight unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>The total volume of the fulfillment (calculated from items if not passed)</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>The volume unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`delivery_note`</td><td>string</td><td>The delivery note for the fulfillment</td><td>No</td></tr><tr><td>`notify`</td><td>boolean</td><td>Whether the fulfillment notifications are activated (defaults to `true`)</td><td>No</td></tr><tr><td>`dispatched_at`</td><td>timestamp</td><td>The dispatched at of the fulfillment</td><td>No</td></tr><tr><td>`items`</td><td>array</td><td>An array of [Fullfillment Item](https://support.aerocommerce.com/books/api/page/order-create-endpoint#bkmrk-fulfillment-item) objects (if not passed every fulfillable item is fulfilled)</td><td>No</td></tr></tbody></table>

### Fulfillment Item

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`sku`</td><td>string</td><td>The sku of the order item to be fulfilled</td><td>Yes</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity to be fulfilled (defaults to max possible)</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>The weight of the item (uses order item's weight if not passed)</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>The weight unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>The volume of the fulfillment (uses order item's volume if not passed)</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>The volume unit (defaults to store's default if not provided)</td><td>No</td></tr></tbody></table>

### Comment

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the comment</td><td>No</td></tr><tr><td>`admin`</td><td>int|string</td><td>The id or email of the admin</td><td>No</td></tr><tr><td>`message`</td><td>string</td><td>The comment message</td><td>Yes</td></tr><tr><td>`customer_facing`</td><td>boolean</td><td>Whether the comment is customer facing (default: `false`)</td><td>No</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date the comment was created (defaults to now)</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/orders
```

```json
{
    "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
    },
    "ordered_at": "2023-09-01T09:29:41.000000Z",
    "currency": "GBP", 
    "status_id": 3, 
    "customer_id": 1, 
    "shipping_method_id": 1, 
    "notify": true, 
    "billing_address": { 
        "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": {
        "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": [
        {
            "variant_id": 1,
            "shippable": true,
            "quantity": 2,
            "price": {
                "amount": 42083.33,
                "tax": 8416.67
            },
            "discount": {
                "amount": 8416.67,
                "tax": 1683.33
            }
        }
    ],
    "payments": [
        {
            "driver": "cash",
            "amount": 91000
        }
    ],
    "comments": [
        {
            "admin": "admin@example.com",
            "message": "This is an API message",
            "created_at": "2025-09-01 09:29:41",
            "customer_facing": true
        }
    ]
}
```

## Example Response

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

# Flag Order Endpoints

## Examples

<details id="bkmrk-adding-a-flag-post-%2F"><summary>Adding a Flag</summary>

##### Request

```
POST /api/orders/{id|reference}/flags/{id|name}
```

##### Response

```json
{
    "order": {
        "id": 1
    },
    "flag": {
        "id": 1
    }
}
```

</details><details id="bkmrk-removing-a-flag-dele"><summary>Removing a Flag</summary>

##### Request

```
DELETE /api/orders/{id|reference}/flags/{id|name}
```

##### Response

```
204 No Content
```

</details>

# Order Comments Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the comment</td><td>No</td></tr><tr><td>`admin`</td><td>int|string</td><td>The id or email of the admin</td><td>No</td></tr><tr><td>`message`</td><td>string</td><td>The comment message</td><td>Yes</td></tr><tr><td>`customer_facing`</td><td>boolean</td><td>Whether the comment is customer facing (default: `false`)</td><td>No</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date the comment was created (defaults to now)</td><td>No</td></tr></tbody></table>

<p class="callout info">If no admin is supplied then the API Token name will be displayed for the comment in the Admin.</p>

## Example Request

```
POST /api/orders/{id|reference}/comments
```

```json
{
    "admin": "admin@example.com",
    "message": "This is an API message",
    "customer_facing": true,
    "created_at": "2025-09-01 09:29:41"
}
```

## Example Response

```json
{
    "order": {
        "id": 1
    },
    "comment": {
        "id": 1
    }
}
```

# Fulfillments

# Create Fulfillment Endpoint

## Structure

### Fulfillment

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the fulfillment</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference for the fulfillment</td><td>No</td></tr><tr><td>`state`</td><td>string</td><td>The state of the fulfillment (defaults to method's default if not passed)</td><td>No</td></tr><tr><td>`method`</td><td>int| string</td><td>The fulfillment method's id, name or driver (defaults to orders' default if not passed)</td><td>No</td></tr><tr><td>`tracking_code`</td><td>string</td><td>The tracking code for the fulfillment</td><td>No</td></tr><tr><td>`tracking_url`</td><td>url</td><td>The tracking url for the fulfillment</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>The total weight of the fulfillment (calculated from items if not passed)</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>The weight unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>The total volume of the fulfillment (calculated from items if not passed)</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>The volume unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`delivery_note`</td><td>string</td><td>The delivery note for the fulfillment</td><td>No</td></tr><tr><td>`notify`</td><td>boolean</td><td>Whether the fulfillment notifications are activated (defaults to `true`)</td><td>No</td></tr><tr><td>`dispatched_at`</td><td>timestamp</td><td>The dispatched at of the fulfillment</td><td>No</td></tr><tr><td>`items`</td><td>array</td><td>An array of [Item](https://support.aerocommerce.com/books/api/page/create-fulfillment-endpoint#bkmrk-fulfillment-item) objects (if not passed every fulfillable item is fulfilled)</td><td>No</td></tr></tbody></table>

**Valid fulfillment states:** `failed`, `pending`, `open`, `successful`, `canceled`, `errored`

### Fulfillment Item

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the order item to be fulfilled</td><td>Conditional `*`</td></tr><tr><td>`sku`</td><td>string</td><td>The sku of the order item to be fulfilled</td><td>Conditional `*`</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity to be fulfilled (defaults to max possible)</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>The weight of the item (uses order item's weight if not passed)</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>The weight unit (defaults to store's default if not provided)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>The volume of the fulfillment (uses order item's volume if not passed)</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>The volume unit (defaults to store's default if not provided)</td><td>No</td></tr></tbody></table>

`*` One of id or sku must be provided.

## Example Requests

<details id="bkmrk-fulfill-specific-ite"><summary>Fulfill Specific Items</summary>

```
POST /api/orders/{id|reference}/fulfillments
```

```json
{
    "reference": "F1-API",
    "tracking_code": "Test tracking code",
    "tracking_url": "http://aero.test",
    "delivery_note": "Test delivery note",
    "items": [
        {
            "sku": "ABC-123",
            "quantity": 1,
            "weight": 10,
            "weight_unit": "oz",
            "volume": 0.5,
            "volume_unit": "m^3"
        },
        {
            "sku": "DEF-456"
        }
    ]
}
```

</details><details id="bkmrk-fulfill-all-items-po"><summary>Fulfill All Items</summary>

```
POST /api/orders/{id|reference}/fulfillments
```

```json
{
    "reference": "F2-API",
    "tracking_code": "Test tracking code",
    "tracking_url": "http://aero.test",
    "delivery_note": "Test delivery note",
}
```

</details>## Example Response

```json
{
    "fulfillment": {
        "id": 1
    }
}
```

# Delete Fulfillment Endpoint

## Example Request

```
DELETE /api/orders/{id|reference}/fulfillments/{id|reference}
```

## Example Response

```
204 No Content
```

# Order Statuses

# View Order Status Endpoint

## Structure

### Order Status

<table border="1" id="bkmrk-name-type-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>**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><tr><td>`group`</td><td>object</td><td>The [Group](https://support.aerocommerce.com/books/api/page/view-order-status-endpoint#bkmrk-order-status-group) of the order status</td></tr></tbody></table>

### Order Status Group

<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 group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the order status group</td></tr></tbody></table>

## Example Request  


```
GET /api/order-statuses/{id}
```

## Example Response

```json
{
    "id": 2,
    "name": "On Hold",
    "state": "on_hold",
    "group": {
        "id": 1,
        "name": "test"
    }
}
```

# Order Status Index Endpoint

## Structure

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

### Example Request

```
GET /api/order-statuses?per_page=2
```

### Example Response

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

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

# Products

# Product Index Endpoint

## Structure

See [<span class="s1">View Product Endpoint</span>](https://support.aerocommerce.com/books/api/page/view-product-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>`active`</td><td>Only return active products</td><td>`?scope=active`</td></tr><tr><td>`inactive`</td><td>Only return inactive products</td><td>`?scope=inactive`</td></tr><tr><td>`visible`</td><td>Only return visible products</td><td>`?scope=visible`</td></tr><tr><td>`hidden`</td><td>Only return hidden products</td><td>`?scope=hidden`</td></tr><tr><td>`published`</td><td>Only return published products</td><td>`?scope=published`</td></tr><tr><td>`unpublished`</td><td>Only return unpublished products</td><td>`?scope=unpublished`</td></tr><tr><td>`scheduled`</td><td>Only return scheduled to be published products</td><td>`?scope=scheduled`</td></tr></tbody></table>

<p class="callout info">These scopes are applied at database level and may not always reflect real-time search index data. For precise filtering use the [Product Search Endpoint](https://support.aerocommerce.com/books/api/page/product-search-endpoint).</p>

## 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>`models`</td><td>Only return products with specific models (note: singular form `?model` not supported)</td><td>`?models=ABC,DEF`</td></tr><tr><td>`skus`</td><td>Only return products with variants that have specific SKUs</td><td>`?skus=ABC-123,DEF-456`</td></tr></tbody></table>

<p class="callout info">Plural filters can also be used in singular form (unless otherwise stated), e.g. `?sku=ABC-123` for `?skus=ABC-123`.</p>

## Example Request

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

## Example Response

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

# Product Search Endpoint

## Pre-requisites

This endpoint performs product search queries using Elasticsearch. Make sure your product documents are indexed before using this route:

```
php artisan aero:search:reindex --type=product
```

<p class="callout info">You must run this command **after** installing the API.</p>

## Structure

See [<span class="s1">View Product Endpoint</span>](https://support.aerocommerce.com/books/api/page/view-product-endpoint) for the structure of the order payload inside the data array.

<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>`active`</td><td>Only return active products</td><td>`?scope=active`</td></tr><tr><td>`inactive`</td><td>Only return inactive products</td><td>`?scope=inactive`</td></tr><tr><td>`visible`</td><td>Only return visible products</td><td>`?scope=visible`</td></tr><tr><td>`hidden`</td><td>Only return hidden products</td><td>`?scope=hidden`</td></tr><tr><td>`categorised`</td><td>Only return products that are in a category</td><td>`?scope=categorised`</td></tr><tr><td>`un-categorised`</td><td>Only return products that aren't in a category</td><td>`?scope=un-categorised`</td></tr><tr><td>`published`</td><td>Only return published products</td><td>`?scope=published`</td></tr><tr><td>`unpublished`</td><td>Only return unpublished products</td><td>`?scope=unpublished`</td></tr><tr><td>`scheduled`</td><td>Only return scheduled to be published products</td><td>`?scope=scheduled`</td></tr><tr><td>`has-stock`</td><td>Only return products that have stock</td><td>`?scope=has-stock`</td></tr><tr><td>`out-of-stock`</td><td>Only return products that don't have stock</td><td>`?scope=out-of-stock`</td></tr><tr><td>`not-tracking-stock`</td><td>Only return products that aren't tracking stock</td><td>`?scope=not-tracking-stock`</td></tr><tr><td>`reduced`</td><td>Only return reduced products</td><td>`?scope=reduced`</td></tr><tr><td>`not-reduced`</td><td>Only return non-reduced products</td><td>`?scope=not-reduced`</td></tr><tr><td>`has-images`</td><td>Only return products that have images</td><td>`?scope=has-images`</td></tr><tr><td>`no-images`</td><td>Only return products that don't have images</td><td>`?scope=no-images`</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>`manufacturers`</td><td>Only return products with specific manufacturer ids (or names)</td><td>`?manufacturers=1,burberry`</td></tr><tr><td>`tags`</td><td>Only return products with specific tag ids (or names formatted as `group|name`)</td><td>`?tags=1,colour|red`</td></tr><tr><td>`barcodes`</td><td>Only return products with specific barcodes</td><td>`?barcodes=123,abc`</td></tr><tr><td>`references`</td><td>Only return products with specific references</td><td>`?references=123,abc`</td></tr><tr><td>`price`</td><td>Only return products with specific price in whole units (e.g. pounds, not pence)</td><td>`?price=123`</td></tr><tr><td>`min_price`</td><td>Only return products with price above min price in whole units (e.g. pounds, not pence)</td><td>`?min_price=123`</td></tr><tr><td>`max_price`</td><td>Only return products with price below max price in whole units (e.g. pounds, not pence)</td><td>`?max_price=123`</td></tr><tr><td>`stock_level`</td><td>Only return products with specific stock level</td><td>`?stock_level=1`</td></tr><tr><td>`min_stock_level`</td><td>Only return products with stock above specific stock level</td><td>`?min_stock_level=1`</td></tr><tr><td>`max_stock_level`</td><td>Only return products with stock below specific stock level</td><td>`?max_stock_level=10`</td></tr><tr><td>`type`</td><td>Only return products of a certain type (e.g. simple or variant)</td><td>`?type=variant`</td></tr><tr><td>`models`</td><td>Only return products with specific models</td><td>`?models=ABC,DEF`</td></tr><tr><td>`skus`</td><td>Only return products with variants that have specific SKUs</td><td>`?skus=ABC-123,DEF-456`</td></tr></tbody></table>

<p class="callout info">The `tags` filter applies AND logic across groups and OR logic within groups:  
  
- `?tags=size|small,colour|red` = small **and** red.  
- `?tags=colour|red,colour|green` = red **or** green.</p>

<p class="callout info">Plural filters can also be used in singular form, e.g. `?manufacturer=burberry` for `?manufacturers=burberry`.</p>

## Example Request

```
GET /api/products/search?per_page=2&min_updated_at=2023-08-30%2010:36:23&min_stock_level=1&max_stock_level=10
```

## Example Response

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

# View Product Endpoint

## Structure

### Product

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 793.734px;"><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;">`model`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The **unique** model identifier for the product</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 display name of the product</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`manufacturer`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">The [Manufacturer](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-manufacturer) object (null when none)</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">A short summary of the product</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">A detailed description of the product</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`active`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the product is active (available for purchase)</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`visible`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the product is visible in the storefront</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`attribute_groups_to_split_by`</td><td style="height: 46.5938px;">?array</td><td style="height: 46.5938px;">The attribute groups to split listings by (null when none)</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`published_at`</td><td style="height: 29.7969px;">timestamp</td><td style="height: 29.7969px;">When the product was published</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`images`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Image](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-image) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`categories`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Category](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-category) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`tags`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Tag](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`variants`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Variant](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-variant) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`seo`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">A [SEO](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-seo) object</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-settings) object with grouped key-value pairs</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/view-product-endpoint#bkmrk-additional-attribute) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`specifications` `*`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Specification](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`specification_groups` `*`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`upsells`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Upsell](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell) objects</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`related_listings`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Related Listing](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-related-listing) objects</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Manufacturer

<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 manufacturer</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`url`</td><td>string</td><td>The url of the image</td></tr><tr><td>`default`</td><td>bool</td><td>Whether the image is default</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects</td></tr></tbody></table>

### Category

<table border="1" id="bkmrk-name-type-descriptio-3" 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 category</td></tr><tr><td>`name`</td><td>string</td><td>The name of the category (e.g., Coats)</td></tr><tr><td>`breadcrumb`</td><td>string</td><td>The breadcrumb path for the category (e.g., Mens &gt; Coats)</td></tr></tbody></table>

### Variant

<table border="1" id="bkmrk-name-type-descriptio-4" 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>`sku`</td><td>string</td><td>The **unique** SKU for the variant</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the variant</td></tr><tr><td>`name`</td><td>string</td><td>Display name of the variant</td></tr><tr><td>`summary`</td><td>string</td><td>A short summary of the variant</td></tr><tr><td>`description`</td><td>string</td><td>A detailed description of the variant</td></tr><tr><td>`barcode`</td><td>string</td><td>The barcode/UPC/EAN of the variant</td></tr><tr><td>`buyable`</td><td>boolean</td><td>Whether the variant can be purchased</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the variant is visible in listings</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the variant is shippable</td></tr><tr><td>`discountable`</td><td>boolean</td><td>Whether discounts can be applied to this variant</td></tr><tr><td>`hide_when_no_stock`</td><td>boolean</td><td>Whether the variant should be hidden when out of stock</td></tr><tr><td>`infinite_stock`</td><td>boolean</td><td>Whether the variant has unlimited stock</td></tr><tr><td>`stock_level`</td><td>int</td><td>Current stock level</td></tr><tr><td>`stock_buffer`</td><td>int</td><td>The stock buffer</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group applied to the variant</td></tr><tr><td>`minimum_quantity`</td><td>int</td><td>Minimum quantity per purchase</td></tr><tr><td>`maximum_quantity`</td><td>int</td><td>Maximum quantity per purchase</td></tr><tr><td>`multiples_of`</td><td>int</td><td>Purchasable only in multiples of this number</td></tr><tr><td>`weight`</td><td>float</td><td>Weight of the variant</td></tr><tr><td>`weight_unit`</td><td>string</td><td>Unit of weight (e.g., `kg`, `lb`)</td></tr><tr><td>`volume`</td><td>float</td><td>Volume of the variant</td></tr><tr><td>`volume_unit`</td><td>string</td><td>Unit of volume (e.g., `m^3`, `cm^3`)</td></tr><tr><td>`hs`</td><td>string</td><td>HS (Harmonized System) code for customs</td></tr><tr><td>`price.amount`</td><td>float</td><td>The current price of the variant **excluding tax**</td></tr><tr><td>`price.tax`</td><td>float</td><td>The tax of the current price</td></tr><tr><td>`price.currency`</td><td>string</td><td>The currency of the current price</td></tr><tr><td>`retail.amount`</td><td>float</td><td>The RRP for the variant **excluding tax**</td></tr><tr><td>`retail.tax`</td><td>float</td><td>The tax of the RRP</td></tr><tr><td>`retail.currency`</td><td>string</td><td>The currency of the RRP</td></tr><tr><td>`origin_country`</td><td>string</td><td>ISO country code of origin (e.g., `US`, `GB`)</td></tr><tr><td>`goods_description`</td><td>string</td><td>Description of goods for customs</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag) objects</td></tr><tr><td>`cost`</td><td>object</td><td>The [Cost Price](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-cost-price) of the variant</td></tr><tr><td>`prices`</td><td>array</td><td>An array of [Price](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-price) objects</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-additional-attribute) objects</td></tr><tr><td>`specifications` `*`</td><td>array</td><td>An array of [Specification](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification) objects</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) objects</td></tr><tr><td>`upsells`</td><td>array</td><td>An array of [Upsell](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell) objects</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-5" 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 attribute</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute</td></tr><tr><td>`group`</td><td>object</td><td>The [Attribute Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute-group) object</td></tr></tbody></table>

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%; height: 29.7969px;"><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 tag group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag group</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-7" 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 tag</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag</td></tr><tr><td>`group`</td><td>object</td><td>The [Tag Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag-group) object</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-8" 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 tag group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag group</td></tr></tbody></table>

### Cost Price

<table border="1" id="bkmrk-name-type-descriptio-9" 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>`amount`</td><td>float</td><td>The cost price **including tax**</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default if not provided)</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-10" 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 price</td></tr><tr><td>`currency`</td><td>string</td><td>The currency code for the price</td></tr><tr><td>`quantity`</td><td>int</td><td>The quantity required for the price to be detected/applied</td></tr><tr><td>`value.amount`</td><td>float</td><td>The normal price **excluding tax**</td></tr><tr><td>`value.tax`</td><td>float</td><td>The tax for the normal price</td></tr><tr><td>`sale_value.amount`</td><td>float</td><td>The sale price **excluding tax**</td></tr><tr><td>`sale_value.tax`</td><td>float</td><td>The tax for the sale price</td></tr><tr><td>`retail_value.amount`</td><td>float</td><td>The retail price **excluding tax**</td></tr><tr><td>`retail_value.tax`</td><td>float</td><td>The tax for the retail price</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start date for when the price is active</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end date for when the price is active</td></tr><tr><td>`reference`</td><td>string</td><td>The reference for the price</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-11" 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>`heading`</td><td>string</td><td>The SEO Heading</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-12" 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>`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>

### Specification

<table border="1" id="bkmrk-name-type-descriptio-13" 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>`group.name`</td><td>string</td><td>The name of the specification group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td></tr></tbody></table>

<p class="callout info">This is only for `<1.0.0` version of `aerocargo/specifications`. See [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) for `1.x` structure.</p>

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio-14" 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 specification group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group-) objects</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td></tr></tbody></table>

<p class="callout info">This is only for `>=1.0.0` version of `aerocargo/specifications`. See [Specification](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification) for `0.x` structure.</p>

### Specification Group Field

<table border="1" id="bkmrk-name-type-descriptio-15" 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 specification group field</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group field</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification group field</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td></tr></tbody></table>

### Media

<table border="1" id="bkmrk-name-type-descriptio-16" 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 media</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the media</td></tr><tr><td>`disk`</td><td>string</td><td>The disk used to store the media</td></tr><tr><td>`path`</td><td>string</td><td>The path of the media on the disk</td></tr><tr><td>`title`</td><td>string</td><td>The title of the media</td></tr><tr><td>`type`</td><td>string</td><td>The mimetype of the media</td></tr><tr><td>`extension`</td><td>string</td><td>The file extension of the media</td></tr><tr><td>`size`</td><td>int</td><td>The file size of the media in bytes</td></tr><tr><td>`meta`</td><td>object</td><td>The meta data of the media</td></tr><tr><td>`source`</td><td>string</td><td>The source file name of the media</td></tr><tr><td>`is_protected`</td><td>bool</td><td>Whether the media is protected</td></tr></tbody></table>

### Upsell

<table border="1" id="bkmrk-name-type-descriptio-17" 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>`group`</td><td>object</td><td>The [Upsell Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell-group) object (null when none)</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects that the upsell shows for</td></tr><tr><td>`models`</td><td>array</td><td>And array of models for the upsell</td></tr><tr><td>`skus`</td><td>array</td><td>And array of SKUs for the upsell</td></tr></tbody></table>

### Upsell Group

<table border="1" id="bkmrk-name-type-descriptio-18" 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>`key`</td><td>string</td><td>The key of the upsell group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the upsell group</td></tr></tbody></table>

### Related Listing

<table border="1" id="bkmrk-name-type-descriptio-19" 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 listing</td></tr><tr><td>`product.id`</td><td>int</td><td>The id of the product linked to the listing</td></tr><tr><td>`product.model`</td><td>string</td><td>The model of the product linked to the listing</td></tr><tr><td>`variants.*.id`</td><td>id</td><td>The id of the variants linked to the listing</td></tr><tr><td>`variants.*.sku`</td><td>string</td><td>The sku of the variants linked to the listing</td></tr><tr><td>`sort`</td><td>int</td><td>The sort of the listing within the group</td></tr></tbody></table>

## Example Requests

```
GET /api/products/{id|model}
```

```
GET /api/products?model=model
```

<p class="callout info">Using the first request syntax is advised, only use the second if/when the model is numeric, as if a matching id exists that would be resolved instead.</p>

## Example Responses

<details id="bkmrk-simple-product-%7B-%22mo"><summary>Simple Product</summary>

```json
{
    "model": "9021182",
    "name": "Detachable Sleeve Puffer Jacket",
    "manufacturer": "Burberry",
    "categories": [
        { 
            "name": "Mens > Coats > Padded Coats"
        }
    ],
    "summary": "Summary",
    "description": "Description",
    "active": true,
    "visible": true,
    "images": [
        {
            "src": "https://picsum.photos/seed/first/600/400",
            "default": true
        }
    ],
    "variants": [
        {
            "sku": "9021182",
            "barcode": "abc123",
            "stock_level": 5,
            "prices": [
                {
                    "currency": "GBP",
                    "price": 790,
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product"
        }
    ],
    "tags": [
        {
            "group": { 
                "name": "Colour"
            },
            "name": "Blue"
        }
    ],
    "seo": {
        "heading": "test heading",
        "page_title": "test page title",
        "meta_description": "test meta description",
        "noindex": 0,
        "nofollow": 0
    },
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

</details><details id="bkmrk-variant-product-%7B-%22i"><summary>Variant Product</summary>

```json
{
    "id": 1,
    "model": "8021182",
    "name": "Detachable Sleeve Puffer Jacket",
    "summary": "Outer: Leather 100%, Polyamide 100%\nLining: Polyester 100%, Goose Down 90%, Wool 70%, Polyamide 20%, Cashmere 10%, Feather 10%",
    "description": "A quintessentially British brand, Burberry creates iconic designs that seamlessly infuse their rich heritage with a contemporary aesthetic. This deep blue wool and cashmere blend detachable sleeve puffer jacket from Burberry features a hood, a high standing collar, a zip and press stud fastening, detachable long sleeves, a contrast logo patch to one side, zipped side slit pockets and a puffer style.",
    "type": "variant",
    "active": true,
    "visible": true,
    "attribute_groups_to_split_by": null,
    "published_at": "2025-06-13T07:34:34.000000Z",
    "manufacturer": {
        "id": 1,
        "name": "Burberry"
    },
    "images": [
        {
            "url": "https://picsum.photos/seed/first/600/400",
            "default": "1"
        },
        {
            "url": "https://picsum.photos/seed/second/600/400",
            "default": "1"
        },
        {
            "url": "https://picsum.photos/seed/third/600/400",
            "default": "1"
        },
    ],
    "categories": [
        {
            "id": 3,
            "name": "Padded Coats",
            "breadcrumb": "Mens » Coats » Padded Coats"
        }
    ],
    "tags": [
        {
            "id": 1,
            "name": "Blue",
            "reference": null,
            "group": {
                "id": 1,
                "name": "Colour",
                "reference": null
            }
        }
    ],
    "seo": {
        "heading": "test heading",
        "page_title": "test page title",
        "meta_description": "test meta description",
        "open_graph": "",
        "canonical": "",
        "noindex": null,
        "nofollow": null
    },
    "variants": [
        {
            "id": 1,
            "sku": "8021182-S",
            "reference": null,
            "name": "",
            "summary": "",
            "description": "",
            "barcode": null,
            "buyable": true,
            "visible": true,
            "shippable": true,
            "discountable": true,
            "infinite_stock": false,
            "stock_level": 5,
            "stock_buffer": 0,
            "weight": null,
            "weight_unit": null,
            "volume": null,
            "volume_unit": null,
            "hs": null,
            "origin_country": null,
            "goods_description": null,
            "cost": {
                "amount": 5623.54,
                "currency": "GBP"
            },
            "price": {
                "amount": 65833.33,
                "tax": 13166.669999999998,
                "currency": "GBP"
            },
            "retail": {
                "amount": null,
                "tax": null,
                "currency": "GBP"
            },
            "prices": [
                {
                    "id": 1,
                    "currency": "GBP",
                    "quantity": 1,
                    "value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "sale_value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "retail_value": {
                        "amount": null,
                        "tax": null
                    },
                    "start_at": null,
                    "end_at": null,
                    "reference": null
                }
            ],
            "images": [
                {
                    "url": "https://picsum.photos/seed/fourth/600/400",
                    "default": "1",
                    "attributes": [
                        {
                            "group": {
                                "name": "Size"
                            },
                            "name": "Small"
                        }
                    ]
                }
            ],
            "attributes": [
                {
                    "id": 1,
                    "name": "Small",
                    "display_name": "Small",
                    "reference": null,
                    "group": {
                        "id": 1,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Small",
                    "reference": null,
                    "group": {
                        "id": 2,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "additional_attributes": []
        },
        {
            "id": 2,
            "sku": "8021182-M",
            "reference": null,
            "name": "",
            "summary": "",
            "description": "",
            "barcode": null,
            "buyable": true,
            "visible": true,
            "shippable": true,
            "discountable": true,
            "infinite_stock": false,
            "stock_level": 5,
            "stock_buffer": 0,
            "weight": null,
            "weight_unit": null,
            "volume": null,
            "volume_unit": null,
            "hs": null,
            "origin_country": null,
            "goods_description": null,
            "cost": {
                "amount": null,
                "currency": null
            },
            "price": {
                "amount": 65833.33,
                "tax": 13166.669999999998,
                "currency": "GBP"
            },
            "retail": {
                "amount": null,
                "tax": null,
                "currency": "GBP"
            },
            "prices": [
                {
                    "id": 2,
                    "currency": "GBP",
                    "quantity": 1,
                    "value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "sale_value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "retail_value": {
                        "amount": null,
                        "tax": null
                    },
                    "start_at": null,
                    "end_at": null,
                    "reference": null
                }
            ],
            "images": [],
            "attributes": [
                {
                    "id": 2,
                    "name": "Medium",
                    "display_name": "Medium",
                    "reference": null,
                    "group": {
                        "id": 1,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "tags": [
                {
                    "id": 3,
                    "name": "Medium",
                    "reference": null,
                    "group": {
                        "id": 2,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "additional_attributes": []
        },
        {
            "id": 3,
            "sku": "8021182-L",
            "reference": null,
            "name": "",
            "summary": "",
            "description": "",
            "barcode": null,
            "buyable": true,
            "visible": true,
            "shippable": true,
            "discountable": true,
            "infinite_stock": false,
            "stock_level": 5,
            "stock_buffer": 0,
            "weight": null,
            "weight_unit": null,
            "volume": null,
            "volume_unit": null,
            "hs": null,
            "origin_country": null,
            "goods_description": null,
            "cost": {
                "amount": null,
                "currency": null
            },
            "price": {
                "amount": 65833.33,
                "tax": 13166.669999999998,
                "currency": "GBP"
            },
            "retail": {
                "amount": null,
                "tax": null,
                "currency": "GBP"
            },
            "prices": [
                {
                    "id": 3,
                    "currency": "GBP",
                    "quantity": 1,
                    "value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "sale_value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "retail_value": {
                        "amount": null,
                        "tax": null
                    },
                    "start_at": null,
                    "end_at": null,
                    "reference": null
                }
            ],
            "images": [],
            "attributes": [
                {
                    "id": 3,
                    "name": "Large",
                    "display_name": "Large",
                    "reference": null,
                    "group": {
                        "id": 1,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "tags": [
                {
                    "id": 4,
                    "name": "Large",
                    "reference": null,
                    "group": {
                        "id": 2,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "additional_attributes": []
        },
        {
            "id": 4,
            "sku": "8021182-XL",
            "reference": null,
            "name": "",
            "summary": "",
            "description": "",
            "barcode": null,
            "buyable": true,
            "visible": true,
            "shippable": true,
            "discountable": true,
            "infinite_stock": false,
            "stock_level": 5,
            "stock_buffer": 0,
            "weight": null,
            "weight_unit": null,
            "volume": null,
            "volume_unit": null,
            "hs": null,
            "origin_country": null,
            "goods_description": null,
            "cost": {
                "amount": null,
                "currency": null
            },
            "price": {
                "amount": 65833.33,
                "tax": 13166.669999999998,
                "currency": "GBP"
            },
            "retail": {
                "amount": null,
                "tax": null,
                "currency": "GBP"
            },
            "prices": [
                {
                    "id": 1,
                    "currency": "GBP",
                    "quantity": 1,
                    "value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "sale_value": {
                        "amount": 65833.33,
                        "tax": 13166.669999999998
                    },
                    "retail_value": {
                        "amount": null,
                        "tax": null
                    },
                    "start_at": null,
                    "end_at": null,
                    "reference": null
                }
            ],
            "images": [],
            "attributes": [
                {
                    "id": 4,
                    "name": "Extra Large",
                    "display_name": "Extra Large",
                    "reference": null,
                    "group": {
                        "id": 1,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "tags": [
                {
                    "id": 5,
                    "name": "Extra Large",
                    "reference": null,
                    "group": {
                        "id": 2,
                        "name": "Size",
                        "reference": null
                    }
                }
            ],
            "additional_attributes": []
        }
    ],
    "additional_attributes": [],
    "settings": []
}
```

</details>

# Create Product Endpoint

## Structure

### Product

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the product</td><td>No</td></tr><tr><td>`model`</td><td>string</td><td>The **unique** model identifier for the product</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The display name of the product</td><td>Yes</td></tr><tr><td>`manufacturer`</td><td>string</td><td>The manufacturer/brand of the product</td><td>No</td></tr><tr><td>`summary`</td><td>string</td><td>A short summary of the product</td><td>No</td></tr><tr><td>`description`</td><td>string</td><td>A detailed description of the product</td><td>No</td></tr><tr><td>`active`</td><td>boolean</td><td>Whether the product is active (available for purchase)</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the product is visible in the storefront</td><td>No</td></tr><tr><td>`attribute_groups_to_split_by`</td><td>array</td><td>An array of attribute group names to split listings by (e.g., \["Size"\])</td><td>No</td></tr><tr><td>`published_at`</td><td>timestamp</td><td>When the product was published</td><td>No</td></tr><tr><td>`images`</td><td>array</td><td>An array of [Image](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-image) objects</td><td>No</td></tr><tr><td>`categories`</td><td>array</td><td>An array of [Category](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-category) objects</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`variants`</td><td>array</td><td>An array of [Variant](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-variant) objects</td><td>Yes</td></tr><tr><td>`seo`</td><td>object</td><td>A [SEO](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-seo) object</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`specifications` `*`</td><td>array</td><td>An array of [Specification](https://support.aerocommerce.com/books/api/page/create-product-endpoint#bkmrk-specification) objects</td><td>No</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr><td>`upsells`</td><td>array</td><td>An array of [Upsell](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell) objects</td><td>No</td></tr><tr><td>`related_listings`</td><td>array</td><td>An array of[ Related Listing](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-related-listing) objects</td><td>No</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Category

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The category name or breadcrumb (e.g., "Coats" or "Mens &gt; "Coats")</td><td>Yes</td></tr></tbody></table>

### Variant

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 1395.63px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 for the variant</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`sku`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The **unique** SKU for the variant</td><td style="height: 46.5938px;">Yes</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 variant</td><td style="height: 46.5938px;">No</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;">Display name of the variant</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`summary`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">A short summary of the variant</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`description`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">A detailed description of the variant</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`barcode`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The barcode/UPC/EAN of the variant</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`buyable`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the variant can be purchased</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`visible`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the variant is visible in listings</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`shippable`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the variant is shippable</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`discountable`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether discounts can be applied to this variant</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`hide_when_no_stock`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the variant should be hidden when out of stock</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`infinite_stock`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the variant has unlimited stock</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`stock_level`</td><td style="height: 29.7969px;">int</td><td style="height: 29.7969px;">Current stock level</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`stock_buffer`</td><td style="height: 29.7969px;">int</td><td style="height: 29.7969px;">The stock buffer</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`tax_group`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The tax group applied to the variant</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`minimum_quantity`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">Minimum quantity per purchase</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`maximum_quantity`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">Maximum quantity per purchase</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`multiples_of`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">Purchasable only in multiples of this number</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`weight`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">Weight of the variant</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`weight_unit`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">Unit of weight (e.g., `kg`, `lb`)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`volume`</td><td style="height: 29.7969px;">float</td><td style="height: 29.7969px;">Volume of the variant</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`volume_unit`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">Unit of volume (e.g., `m^3`, `cm^3`)</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`hs`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">HS (Harmonized System) code for customs</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`origin_country`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">ISO country code of origin (e.g., `US`, `GB`)</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`goods_description`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">Description of goods for customs</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`attributes`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects</td><td style="height: 29.7969px;">If product has variants</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`tags`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Tag](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag) objects</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`cost`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The [Cost Price](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-cost-price) of the variant</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`prices`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Price](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-price) objects</td><td style="height: 29.7969px;">Yes</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`additional_attributes`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-additional-attribute) objects</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`specifications` `*`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of [Specification](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification) objects</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`upsells`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Upsell](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell) objects</td><td style="height: 29.7969px;">No</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag) objects linked to the attribute</td><td>No</td></tr><tr><td>`group`</td><td>object</td><td>The [Attribute Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute-group) of the attribute</td><td>Yes</td></tr></tbody></table>

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., "Size", "Colour")</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The [Tag Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-tag-group) of the tag</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%; height: 29.7969px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., "Size" or "Colour"</td><td>Yes</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr><tr><td>`alt`</td><td>string</td><td>Alt text for accessibility and SEO</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether this is a default image</td><td>No</td></tr><tr><td>`position`</td><td>int</td><td>Sort order position of the image</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects that apply to this image</td><td>No</td></tr></tbody></table>

### Cost Price

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The cost price **including tax**</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default if not provided)</td><td>No</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-9" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`price`</td><td>float</td><td>The base price **including tax**</td><td>Yes</td></tr><tr><td>`sale_price`</td><td>float</td><td>The sale price **including tax**</td><td>No</td></tr><tr><td>`retail_price`</td><td>float</td><td>The retail price **including tax**</td><td>No</td></tr><tr><td>`quantity`</td><td>int</td><td>Quantity required for this price tier (default: 1)</td><td>No</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default)</td><td>No</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>When this price becomes active (e.g., 2023-09-01 09:29:41)</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>When this price expires</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the price</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-10" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-11" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Specification

<table border="1" id="bkmrk-name-type-descriptio-12" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.name`</td><td>string</td><td>The name of the specification group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification</td><td>`*`</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification</td><td>No</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present, futhermore if the group doesn't exist and is to be created you must provide at least one field for it.

<p class="callout info">This is only for `<1.0.0` version of `aerocargo/specifications`. See [Specification Group](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group) for `1.x` structure.</p>

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio-13" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>`*`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group</td><td>`*`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification-group-) objects</td><td>Yes</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

`*` At least one must be present.

<p class="callout info">This is only for `>=1.0.0` version of `aerocargo/specifications`. See [Specification](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-specification) for `0.x` structure.</p>

### Specification Group Field

<table border="1" id="bkmrk-name-type-descriptio-14" style="border-collapse: collapse; width: 100%; height: 257.172px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`value`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The value of the specification group field</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`media`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Media](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-media) objects</td><td style="height: 35.3984px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1953px;">No</td></tr></tbody></table>

`*` At least one must be present.

### Media

<table border="1" id="bkmrk-name-type-descriptio-15" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

### Upsell

<table border="1" id="bkmrk-name-type-descriptio-16" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.key`</td><td>string</td><td>The upsell group key</td><td>Yes</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-attribute) objects that the upsell shows for</td><td>No</td></tr><tr><td>`models`</td><td>array</td><td>And array of models for the upsell</td><td>No</td></tr><tr><td>`skus`</td><td>array</td><td>And array of SKUs for the upsell</td><td>No</td></tr></tbody></table>

### Related Listing

<table border="1" id="bkmrk-name-type-descriptio-17" style="border-collapse: collapse; width: 100%; height: 245.969px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 listing</td><td style="height: 29.7969px;">Conditional `*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`variant_id`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The id of the variant (of the listing)</td><td style="height: 46.5938px;">Conditional `*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`sku`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The SKU of the variant (of the listing)</td><td style="height: 46.5938px;">Conditional `*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`product_id`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The id of the product (of the listing)</td><td style="height: 46.5938px;">Conditional `*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`model`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The model of the product (of the listing)</td><td style="height: 46.5938px;">Conditional `*`</td></tr></tbody></table>

`*` At least one must be present, resolved in the order they are listed top-down.

## Example Requests

<details id="bkmrk-simple-product-%28one-"><summary>Simple Product (One variant without any attributes)</summary>

```
POST /api/products
```

```json
{
    "model": "9021182",
    "name": "Detachable Sleeve Puffer Jacket",
    "manufacturer": "Burberry",
    "categories": [
        { 
            "name": "Mens > Coats > Padded Coats"
        }
    ],
    "summary": "Summary",
    "description": "Description",
    "active": true,
    "visible": true,
    "images": [
        {
            "src": "https://picsum.photos/seed/first/600/400",
            "is_default": true
        }
    ],
    "variants": [
        {
            "sku": "9021182",
            "barcode": "abc123",
            "stock_level": 5,
            "prices": [
                {
                    "currency": "GBP",
                    "price": 790,
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product"
        }
    ],
    "tags": [
        {
            "group": { 
                "name": "Colour"
            },
            "name": "Blue"
        }
    ],
    "seo": {
        "heading": "test heading",
        "page_title": "test page title",
        "meta_description": "test meta description",
        "noindex": 0,
        "nofollow": 0
    },
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

</details><details id="bkmrk-variant-product-%28mul"><summary>Variant Product (Multiple variants with shared attribute matrix structure)</summary>

```
POST /api/products
```

```json
{
    "model": "9021182",
    "name": "Detachable Sleeve Puffer Jacket",
    "manufacturer": "Burberry",
    "categories": [
        {
            "name": "Mens > Coats > Padded Coats"
        }
    ],
    "summary": "Outer: Leather 100%, Polyamide 100%\nLining: Polyester 100%, Goose Down 90%, Wool 70%, Polyamide 20%, Cashmere 10%, Feather 10%",
    "description": "A quintessentially British brand, Burberry creates iconic designs that seamlessly infuse their rich heritage with a contemporary aesthetic. This deep blue wool and cashmere blend detachable sleeve puffer jacket from Burberry features a hood, a high standing collar, a zip and press stud fastening, detachable long sleeves, a contrast logo patch to one side, zipped side slit pockets and a puffer style.",
    "images": [
        {
            "src": "https://picsum.photos/seed/first/600/400",
            "is_default": "1"
        },
        {
            "src": "https://picsum.photos/seed/second/600/400",
            "is_default": "1"
        },
        {
            "src": "https://picsum.photos/seed/third/600/400",
            "is_default": "1"
        },
        {
            "src": "https://picsum.photos/seed/fourth/600/400",
            "is_default": "1",
            "attributes": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Small"
                }
            ]
        }
    ],
    "variants": [
        {
            "sku": "9021182-S",
            "stock_level": "5",
            "prices": [
                {
                    "currency": "GBP",
                    "price": "790",
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product",
            "attributes": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Small",
                    "tags": [
                        {
                            "group": {
                                "name": "Size"
                            },
                            "name": "Small"
                        }
                    ]
                }
            ],
            "stock_buffer": 0,
            "minimum_quantity": 1,
            "multiples_of": 1
        },
        {
            "sku": "9021182-M",
            "stock_level": "5",
            "prices": [
                {
                    "currency": "GBP",
                    "price": "790",
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product",
            "attributes": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Medium",
                    "tags": [
                        {
                            "group": {
                                "name": "Size"
                            },
                            "name": "Medium"
                        }
                    ]
                }
            ],
            "stock_buffer": 0,
            "minimum_quantity": 1,
            "multiples_of": 1
        },
        {
            "sku": "9021182-L",
            "stock_level": "5",
            "prices": [
                {
                    "currency": "GBP",
                    "price": "790",
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product",
            "attributes": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Large",
                    "tags": [
                        {
                            "group": {
                                "name": "Size"
                            },
                            "name": "Large"
                        }
                    ]
                }
            ],
            "stock_buffer": 0,
            "minimum_quantity": 1,
            "multiples_of": 1
        },
        {
            "sku": "9021182-XL",
            "stock_level": "5",
            "prices": [
                {
                    "currency": "GBP",
                    "price": "790",
                    "quantity": 1
                }
            ],
            "tax_group": "Taxable Product",
            "attributes": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Extra Large",
                    "tags": [
                        {
                            "group": {
                                "name": "Size"
                            },
                            "name": "Extra Large"
                        }
                    ]
                }
            ],
            "stock_buffer": 0,
            "minimum_quantity": 1,
            "multiples_of": 1
        }
    ],
    "tags": [
        {
            "group": {
                "name": "Colour"
            },
            "name": "Blue"
        }
    ],
    "active": true,
    "visible": true,
    "hide_when_no_stock": false,
    "seo": {
        "heading": "test heading",
        "page_title": "test page title",
        "meta_description": "test meta description",
        "noindex": 0,
        "nofollow": 0
    },
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    },
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

</details>## Example Response

```json
{
    "product": {
        "id": 1
    }
}
```

# Update Product Endpoint

## Structure

### Product

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the product</td><td>No</td></tr><tr><td>`manufacturer`</td><td>string</td><td>The manufacturer of the product</td><td>No</td></tr><tr><td>`summary`</td><td>string</td><td>The summary of the product</td><td>No</td></tr><tr><td>`description`</td><td>string</td><td>The description of the product</td><td>No</td></tr><tr><td>`active`</td><td>boolean</td><td>Whether the product is active</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the product is visible</td><td>No</td></tr><tr><td>`attribute_groups_to_split_by`</td><td>array</td><td>An array of attribute group names to split listings by (e.g., \["Size"\]</td><td>No</td></tr><tr><td>`published_at`</td><td>timestamp</td><td>When the product was published</td><td>No</td></tr><tr><td>`images`</td><td>array</td><td>An array of [Image](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-image) objects</td><td>No</td></tr><tr><td>`categories`</td><td>array</td><td>An array of [Category](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-category) objects</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`variants`</td><td>array</td><td>An array of [Variant](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-variant) objects</td><td>No</td></tr><tr><td>`seo`</td><td>object</td><td>A [SEO](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-seo) object</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`specifications` `*`</td><td>array</td><td>An array of [Specification](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-specification) objects</td><td>No</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr><td>`upsells`</td><td>array</td><td>An array of [Upsell](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-upsell) objects</td><td>No</td></tr><tr><td>`related_listings`</td><td>array</td><td>An array of [Related Listing](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-related-listing) objects</td><td>No</td></tr></tbody></table>

<p class="callout info">`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.</p>

### Category

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The category name or breadcrumb (e.g., "Coats" or "Mens &gt; "Coats")</td><td>Yes</td></tr></tbody></table>

### Variant

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`sku`</td><td>string</td><td>The **unique** SKU for the variant to be updated</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the variant</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>Display name of the variant</td><td>No</td></tr><tr><td>`summary`</td><td>string</td><td>A short summary of the variant</td><td>No</td></tr><tr><td>`description`</td><td>string</td><td>A detailed description of the variant</td><td>No</td></tr><tr><td>`barcode`</td><td>string</td><td>The barcode/UPC/EAN of the variant</td><td>No</td></tr><tr><td>`buyable`</td><td>boolean</td><td>Whether the variant can be purchased</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the variant is visible in listings</td><td>No</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the variant is shippable</td><td>No</td></tr><tr><td>`discountable`</td><td>boolean</td><td>Whether discounts can be applied to this variant</td><td>No</td></tr><tr><td>`hide_when_no_stock`</td><td>boolean</td><td>Whether the variant should be hidden when out of stock</td><td>No</td></tr><tr><td>`infinite_stock`</td><td>boolean</td><td>Whether the variant has unlimited stock</td><td>No</td></tr><tr><td>`stock_level`</td><td>int</td><td>Current stock level</td><td>No</td></tr><tr><td>`stock_buffer`</td><td>int</td><td>The stock buffer</td><td>No</td></tr><tr><td>`stock_action`</td><td>string</td><td>The stock action (e.g., set, add, remove &amp; multiply). Defaults to set</td><td>No</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group applied to the variant</td><td>No</td></tr><tr><td>`minimum_quantity`</td><td>int</td><td>Minimum quantity per purchase</td><td>No</td></tr><tr><td>`maximum_quantity`</td><td>int</td><td>Maximum quantity per purchase</td><td>No</td></tr><tr><td>`multiples_of`</td><td>int</td><td>Purchasable only in multiples of this number</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>Weight of the variant</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>Unit of weight (e.g., `kg`, `lb`)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>Volume of the variant</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>Unit of volume (e.g., `m^3`, `cm^3`)</td><td>No</td></tr><tr><td>`hs`</td><td>string</td><td>HS (Harmonized System) code for customs</td><td>No</td></tr><tr><td>`origin_country`</td><td>string</td><td>ISO country code of origin (e.g., `US`, `GB`)</td><td>No</td></tr><tr><td>`goods_description`</td><td>string</td><td>Description of goods for customs</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`cost`</td><td>object</td><td>The [Cost Price](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-cost-price) of the variant</td><td>No</td></tr><tr><td>`prices`</td><td>array</td><td>An array of [Price](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-price) objects</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`specifications` `*`</td><td>array</td><td>An array of [Specification](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-specification) objects</td><td>No</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr><td>`upsells`</td><td>array</td><td>An array of [Upsell](https://support.aerocommerce.com/books/api/page/view-product-endpoint#bkmrk-upsell) objects</td><td>No</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The [Tag Group](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-tag-group) of the tag</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., "Size" or "Colour"</td><td>Yes</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr><tr><td>`alt`</td><td>string</td><td>Alt text for accessibility and SEO</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether this is a default image</td><td>No</td></tr><tr><td>`position`</td><td>int</td><td>Sort order position of the image</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-attribute) objects that apply to this image</td><td>No</td></tr></tbody></table>

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-tag) objects linked to the attribute</td><td>No</td></tr><tr><td>`group`</td><td>object</td><td>The [Attribute Group](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-attribute-group) of the attribute</td><td>Yes</td></tr></tbody></table>

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., "Size", "Colour")</td><td>Yes</td></tr></tbody></table>

### Cost Price

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The cost price **including tax**</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default if not provided)</td><td>No</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-9" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`price`</td><td>float</td><td>The base price **including tax**</td><td>Yes</td></tr><tr><td>`sale_price`</td><td>float</td><td>The sale price **including tax**</td><td>No</td></tr><tr><td>`retail_price`</td><td>float</td><td>The retail price **including tax**</td><td>No</td></tr><tr><td>`quantity`</td><td>int</td><td>Quantity required for this price tier (default: 1)</td><td>No</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default)</td><td>No</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>When this price becomes active (e.g., 2023-09-01 09:29:41)</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>When this price expires</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the price</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-10" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-11" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Specification

<table border="1" id="bkmrk-name-type-descriptio-12" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.name`</td><td>string</td><td>The name of the specification group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification</td><td>`*`</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification</td><td>No</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-media) objects</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

<p class="callout info">This is only for `<1.0.0` version of `aerocargo/specifications`. See Specification Group for `1.x` structure.</p>

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio-13" style="border-collapse: collapse; width: 100%; height: 229.172px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 specification group</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the specification group</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`fields`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Field](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-specification-group-) objects</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`media`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Media](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-media) objects</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`settings`</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">A [Settings](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 46.5938px;">No</td></tr></tbody></table>

`*` At least one must be present.

<p class="callout info">This is only for `>=1.0.0` version of `aerocargo/specifications`. See Specification for `0.x` structure.</p>

### Specification Group Field

<table border="1" id="bkmrk-name-type-descriptio-14" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group field</td><td>`*`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group field</td><td>`*`</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification group field</td><td>No</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-media) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

`*` At least one must be present.

### Media

<table border="1" id="bkmrk-name-type-descriptio-15" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

### Upsell

<table border="1" id="bkmrk-name-type-descriptio-16" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.name`</td><td>string</td><td>The upsell group name</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/update-product-endpoint#bkmrk-attribute) objects that the upsell shows for</td><td>No</td></tr><tr><td>`models`</td><td>array</td><td>And array of models for the upsell</td><td>No</td></tr><tr><td>`skus`</td><td>array</td><td>And array of SKUs for the upsell</td><td>No</td></tr></tbody></table>

### Related Listing

<table border="1" id="bkmrk-name-type-descriptio-17" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the listing</td><td>Conditional `*`</td></tr><tr><td>`variant_id`</td><td>int</td><td>The id of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`sku`</td><td>string</td><td>The SKU of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`product_id`</td><td>int</td><td>The id of the product (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`model`</td><td>string</td><td>The model of the product (of the listing)</td><td>Conditional `*`</td></tr></tbody></table>

`*` At least one must be present, resolved in the order they are listed top-down.

## Example Requests

<details id="bkmrk-update-basic-product"><summary>Update Basic Product Details</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "name": "Detachable Sleeve Puffer Jacket v2",
    "manufacturer": "Burberry v2",
    "summary": "A lightweight puffer with removable sleeves.",
    "description": "This updated puffer jacket offers versatility with detachable sleeves, premium fill, and water-resistant fabric.",
    "active": true,
    "visible": true
}
```

</details><details id="bkmrk-add-categories-to-pr"><summary>Add Categories to Product</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "categories": [
        { 
            "name": "Mens > Jackets",
        },
        { 
            "name": "Winter Collection"
        }
    ]
}
```

</details><details id="bkmrk-add-tags-to-product-"><summary>Add Tags to Product</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "tags": [
        {
            "group": {
                "name": "Colour"
            },
            "name": "Indigo"
        },
        {
            "group": {
                "name": "Season"
            },
            "name": "Winter 2023"
        }
    ]
}
```

</details><details id="bkmrk-update-variant-by-sk"><summary>Update Variant by Sku</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "variants": [
        {
            "sku": "9021182-S",
            "stock_level": 50,
            "buyable": true,
            "tags": [
                {
                    "group": {
                        "name": "Style"
                    },
                    "name": "Casual"
                }
            ],
            "prices": [
                {
                    "price": 199.99,
                    "sale_price": 179.99,
                    "currency": "GBP"
                }
            ],
            "cost": {
                "amount": 350,
                "currency": "GBP"
            }
        }
    ]
}
```

</details><details id="bkmrk-update-images-put-%2Fa"><summary>Update Images</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "images": [
        {
            "src": "https://picsum.photos/seed/front/600/400",
            "alt": "Front view of detachable sleeve puffer jacket",
            "is_default": true,
            "position": 1
        },
        {
            "src": "https://picsum.photos/seed/back/600/400",
            "alt": "Back view of detachable sleeve puffer jacket",
            "position": 2
        }
    ]
}
```

</details><details id="bkmrk-update-product-seo-%26"><summary>Update Product SEO &amp; Settings</summary>

```
PUT /api/products/{id|model}
```

```json
{
    "seo": {
        "heading": "Detachable Sleeve Puffer Jacket",
        "page_title": "Men’s Detachable Sleeve Puffer Jacket | Burberry",
        "meta_description": "Shop the Burberry detachable sleeve puffer jacket – versatile winterwear with premium fill and removable sleeves.",
        "canonical": "https://shop.example.com/mens/detachable-sleeve-puffer",
        "noindex": false,
        "nofollow": false
    },
    "settings": {
        "_": {
            "featured": "true"
        },
        "shipping": {
            "oversized": "false"
        }
    }
}
```

</details><p class="callout info">You can use `PUT /api/products?model=model` if your model is numeric and might clash with an `id`.</p>

## Example Response  


```json
{
    "product": {
        "id": 1
    }
}
```

# Variants

# Create Variant Endpoint

## Structure

### Variant

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the variant</td><td>No</td></tr><tr><td>`sku`</td><td>string</td><td>The **unique** SKU for the variant</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the variant</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>Display name of the variant</td><td>No</td></tr><tr><td>`summary`</td><td>string</td><td>A short summary of the variant</td><td>No</td></tr><tr><td>`description`</td><td>string</td><td>A detailed description of the variant</td><td>No</td></tr><tr><td>`barcode`</td><td>string</td><td>The barcode/UPC/EAN of the variant</td><td>No</td></tr><tr><td>`buyable`</td><td>boolean</td><td>Whether the variant can be purchased</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the variant is visible in listings</td><td>No</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the variant is shippable</td><td>No</td></tr><tr><td>`discountable`</td><td>boolean</td><td>Whether discounts can be applied to this variant</td><td>No</td></tr><tr><td>`hide_when_no_stock`</td><td>boolean</td><td>Whether the variant should be hidden when out of stock</td><td>No</td></tr><tr><td>`infinite_stock`</td><td>boolean</td><td>Whether the variant has unlimited stock</td><td>No</td></tr><tr><td>`stock_level`</td><td>int</td><td>Current stock level</td><td>No</td></tr><tr><td>`stock_buffer`</td><td>int</td><td>The stock buffer</td><td>No</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group applied to the variant</td><td>No</td></tr><tr><td>`minimum_quantity`</td><td>int</td><td>Minimum quantity per purchase</td><td>No</td></tr><tr><td>`maximum_quantity`</td><td>int</td><td>Maximum quantity per purchase</td><td>No</td></tr><tr><td>`multiples_of`</td><td>int</td><td>Purchasable only in multiples of this number</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>Weight of the variant</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>Unit of weight (e.g., `kg`, `lb`)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>Volume of the variant</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>Unit of volume (e.g., `m^3`, `cm^3`)</td><td>No</td></tr><tr><td>`hs`</td><td>string</td><td>HS (Harmonized System) code for customs</td><td>No</td></tr><tr><td>`origin_country`</td><td>string</td><td>ISO country code of origin (e.g., `US`, `GB`)</td><td>No</td></tr><tr><td>`goods_description`</td><td>string</td><td>Description of goods for customs</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-attribute) objects</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`images`</td><td>array</td><td>An array of [Image](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-image) objects</td><td>No</td></tr><tr><td>`cost`</td><td>object</td><td>The [Cost Price](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-cost-price) of the variant</td><td>No</td></tr><tr><td>`prices`</td><td>array</td><td>An array of [Price](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-price) objects</td><td>Yes</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-additional-attribute) objects</td><td>No  
</td></tr><tr><td style="height: 46.5938px;">`specifications` `*`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of [Specification](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-specification) objects</td><td style="height: 46.5938px;">No</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr><td style="height: 29.7969px;">`upsells`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Upsell](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-upsell) objects</td><td style="height: 29.7969px;">No</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 59.5938px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td>`name`</td><td>string</td><td>The name of the attribute (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-tag) objects linked to the attribute</td><td>No</td></tr><tr><td>`group`</td><td>object</td><td>The [Attribute Group](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-attribute-group) of the attribute</td><td>Yes</td></tr></tbody></table>

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., "Size", "Colour")</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The [Tag Group](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-tag-group) of the tag</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., "Size" or "Colour"</td><td>Yes</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr><tr><td>`alt`</td><td>string</td><td>Alt text for accessibility and SEO</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether this is a default image</td><td>No</td></tr><tr><td>`position`</td><td>int</td><td>Sort order position of the image</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-attribute) objects that apply to this image</td><td>No</td></tr></tbody></table>

### Cost Price

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The cost price **including tax**</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default if not provided)</td><td>No</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`price`</td><td>float</td><td>The base price **including tax**</td><td>Yes</td></tr><tr><td>`sale_price`</td><td>float</td><td>The sale price **including tax**</td><td>No</td></tr><tr><td>`retail_price`</td><td>float</td><td>The retail price **including tax**</td><td>No</td></tr><tr><td>`quantity`</td><td>int</td><td>Quantity required for this price tier (default: 1)</td><td>No</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default)</td><td>No</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>When this price becomes active (e.g., 2023-09-01 09:29:41)</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>When this price expires</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the price</td><td>No</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```


### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Specification

<table border="1" id="bkmrk-name-type-descriptio-12" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.name`</td><td>string</td><td>The name of the specification group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification</td><td>`*`</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification</td><td>No</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-media) objects</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present, futhermore if the group doesn't exist and is to be created you must provide at least one field for it.

<p class="callout info">This is only for `<1.0.0` version of `aerocargo/specifications`. See [Specification Group](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-specification-group) for `1.x` structure.</p>

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio-13" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>`*`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group</td><td>`*`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-specification-group-) objects</td><td>Yes</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-media) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

`*` At least one must be present.

<p class="callout info">This is only for `>=1.0.0` version of `aerocargo/specifications`. See [Specification](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-specification-group-) for `0.x` structure.</p>

### Specification Group Field

<table border="1" id="bkmrk-name-type-descriptio-14" style="border-collapse: collapse; width: 100%; height: 257.172px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`value`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The value of the specification group field</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`media`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Media](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-media) objects</td><td style="height: 35.3984px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1953px;">No</td></tr></tbody></table>

`*` At least one must be present.

### Media

<table border="1" id="bkmrk-name-type-descriptio-15" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

### Upsell

<table border="1" id="bkmrk-name-type-descriptio-16" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.key`</td><td>string</td><td>The upsell group key</td><td>Yes</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/create-variant-endpoint#bkmrk-attribute) objects that the upsell shows for</td><td>No</td></tr><tr><td>`models`</td><td>array</td><td>And array of models for the upsell</td><td>No</td></tr><tr><td>`skus`</td><td>array</td><td>And array of SKUs for the upsell</td><td>No</td></tr></tbody></table>

## Example Request  


```
POST /api/products/{id|model}/variants
```

```
POST /api/products/variants?model=model
```

<p class="callout info">Using the first request syntax is advised, only use the second if/when the model is numeric, as if a matching id exists that would be resolved instead.</p>

## Example Response

```json
{
    "sku": "9021182-XS",
    "stock_level": "5",
    "prices": [
        {
            "currency": "GBP",
            "price": "790",
            "quantity": 1
        }
    ],
    "tax_group": "Taxable Product",
    "attributes": [
        {
            "group": {
                "name": "Size"
            },
            "name": "Extra Small",
            "tags": [
                {
                    "group": {
                        "name": "Size"
                    },
                    "name": "Extra Small"
                }
            ]
        }
    ],
    "stock_buffer": 0,
    "minimum_quantity": 1,
    "multiples_of": 1
}
```

# Update Variant Endpoint

## Structure

### Variant

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`sku`</td><td>string</td><td>The **unique** SKU for the variant</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the variant</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>Display name of the variant</td><td>No</td></tr><tr><td>`summary`</td><td>string</td><td>A short summary of the variant</td><td>No</td></tr><tr><td>`description`</td><td>string</td><td>A detailed description of the variant</td><td>No</td></tr><tr><td>`barcode`</td><td>string</td><td>The barcode/UPC/EAN of the variant</td><td>No</td></tr><tr><td>`buyable`</td><td>boolean</td><td>Whether the variant can be purchased</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>Whether the variant is visible in listings</td><td>No</td></tr><tr><td>`shippable`</td><td>boolean</td><td>Whether the variant is shippable</td><td>No</td></tr><tr><td>`discountable`</td><td>boolean</td><td>Whether discounts can be applied to this variant</td><td>No</td></tr><tr><td>`hide_when_no_stock`</td><td>boolean</td><td>Whether the variant should be hidden when out of stock</td><td>No</td></tr><tr><td>`infinite_stock`</td><td>boolean</td><td>Whether the variant has unlimited stock</td><td>No</td></tr><tr><td>`stock_level`</td><td>int</td><td>Current stock level</td><td>No</td></tr><tr><td>`stock_buffer`</td><td>int</td><td>The stock buffer</td><td>No</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group applied to the variant</td><td>No</td></tr><tr><td>`minimum_quantity`</td><td>int</td><td>Minimum quantity per purchase</td><td>No</td></tr><tr><td>`maximum_quantity`</td><td>int</td><td>Maximum quantity per purchase</td><td>No</td></tr><tr><td>`multiples_of`</td><td>int</td><td>Purchasable only in multiples of this number</td><td>No</td></tr><tr><td>`weight`</td><td>float</td><td>Weight of the variant</td><td>No</td></tr><tr><td>`weight_unit`</td><td>string</td><td>Unit of weight (e.g., `kg`, `lb`)</td><td>No</td></tr><tr><td>`volume`</td><td>float</td><td>Volume of the variant</td><td>No</td></tr><tr><td>`volume_unit`</td><td>string</td><td>Unit of volume (e.g., `m^3`, `cm^3`)</td><td>No</td></tr><tr><td>`hs`</td><td>string</td><td>HS (Harmonized System) code for customs</td><td>No</td></tr><tr><td>`origin_country`</td><td>string</td><td>ISO country code of origin (e.g., `US`, `GB`)</td><td>No</td></tr><tr><td>`goods_description`</td><td>string</td><td>Description of goods for customs</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-attribute) objects</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`images`</td><td>array</td><td>An array of [Image](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-image) objects</td><td>No</td></tr><tr><td>`cost`</td><td>object</td><td>The [Cost Price](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-cost-price) of the variant</td><td>No</td></tr><tr><td>`prices`</td><td>array</td><td>An array of [Price](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-price) objects</td><td>Yes</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-additional-attribute) objects</td><td>No  
</td></tr><tr><td style="height: 46.5938px;">`specifications` `*`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of [Specification](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-specification) objects</td><td style="height: 46.5938px;">No</td></tr><tr><td>`specification_groups` `*`</td><td>array</td><td>An array of [Specification Group](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-specification-group) objects</td><td>No</td></tr><tr><td style="height: 29.7969px;">`upsells`</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Upsell](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-upsell) objects</td><td style="height: 29.7969px;">No</td></tr></tbody></table>

`*` `specifications` is if using `<1.0.0` version of `aerocargo/specifications`, otherwise use `specification_groups`.

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 59.5938px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td>`name`</td><td>string</td><td>The name of the attribute (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-tag) objects linked to the attribute</td><td>No</td></tr><tr><td>`group`</td><td>object</td><td>The [Attribute Group](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-attribute-group) of the attribute</td><td>Yes</td></tr></tbody></table>

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., "Size", "Colour")</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., "Small" or "Red")</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The [Tag Group](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-tag-group) of the tag</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., "Size" or "Colour"</td><td>Yes</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr><tr><td>`alt`</td><td>string</td><td>Alt text for accessibility and SEO</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether this is a default image</td><td>No</td></tr><tr><td>`position`</td><td>int</td><td>Sort order position of the image</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-attribute) objects that apply to this image</td><td>No</td></tr></tbody></table>

### Cost Price

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The cost price **including tax**</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default if not provided)</td><td>No</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`price`</td><td>float</td><td>The base price **including tax**</td><td>Yes</td></tr><tr><td>`sale_price`</td><td>float</td><td>The sale price **including tax**</td><td>No</td></tr><tr><td>`retail_price`</td><td>float</td><td>The retail price **including tax**</td><td>No</td></tr><tr><td>`quantity`</td><td>int</td><td>Quantity required for this price tier (default: 1)</td><td>No</td></tr><tr><td>`currency`</td><td>string</td><td>Currency code (defaults to store default)</td><td>No</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>When this price becomes active (e.g., 2023-09-01 09:29:41)</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>When this price expires</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the price</td><td>No</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```


### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Specification

<table border="1" id="bkmrk-name-type-descriptio-12" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.name`</td><td>string</td><td>The name of the specification group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification</td><td>`*`</td></tr><tr><td>`value`</td><td>string</td><td>The value of the specification</td><td>No</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-media) objects</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present, futhermore if the group doesn't exist and is to be created you must provide at least one field for it.

<p class="callout info">This is only for `<1.0.0` version of `aerocargo/specifications`. See [Specification Group](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-specification-group) for `1.x` structure.</p>

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio-13" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>`*`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the specification group</td><td>`*`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-specification-group-) objects</td><td>Yes</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-media) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

`*` At least one must be present.

<p class="callout info">This is only for `>=1.0.0` version of `aerocargo/specifications`. See [Specification](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-specification-group-) for `0.x` structure.</p>

### Specification Group Field

<table border="1" id="bkmrk-name-type-descriptio-14" style="border-collapse: collapse; width: 100%; height: 257.172px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the specification group field</td><td style="height: 46.5938px;">`*`</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`value`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The value of the specification group field</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`media`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Media](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-media) objects</td><td style="height: 35.3984px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1953px;">No</td></tr></tbody></table>

`*` At least one must be present.

### Media

<table border="1" id="bkmrk-name-type-descriptio-15" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

### Upsell

<table border="1" id="bkmrk-name-type-descriptio-16" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`group.key`</td><td>string</td><td>The upsell group key</td><td>Yes</td></tr><tr><td>`attributes`</td><td>array</td><td>An array of [Attribute](https://support.aerocommerce.com/books/api/page/update-variant-endpoint/update-variant-endpoint#bkmrk-attribute) objects that the upsell shows for</td><td>No</td></tr><tr><td>`models`</td><td>array</td><td>And array of models for the upsell</td><td>No</td></tr><tr><td>`skus`</td><td>array</td><td>And array of SKUs for the upsell</td><td>No</td></tr></tbody></table>

## Example Request  


<details id="bkmrk-update-basic-variant"><summary>Update Basic Variant Details</summary>

```
PUT /api/products/{id|model}/variants/{id|sku}
```

```json
{
    "stock_level": 50,
    "buyable": true,
    "prices": [
        {
            "price": 199.99,
            "sale_price": 179.99,
            "currency": "GBP"
        }
    ],
    "cost": {
        "amount": 350,
        "currency": "GBP"
    }
}
```

</details><details id="bkmrk-add-tags-to-variant-"><summary>Add Tags to Variant</summary>

```
PUT /api/products/{id|model}/variants/{id|sku}
```

```json
{
    "tags": [
        {
            "group": { 
                "name": "Size"
            },
            "name": "Small"
        },
        {
            "group": { 
                "name": "Style"
            },
            "name": "Casual"
        }
    ]
}
```

</details><details id="bkmrk-add-images-to-varian"><summary>Add Images to Variant</summary>

```
PUT /api/products/{id|model}/variants/{id|sku}
```

```json
{
    "images": [
        {
            "src": "https://picsum.photos/seed/puffer-s/600/400",
            "alt": "Small size jacket, front view",
            "is_default": true,
            "position": 1,
            "attributes": [
                {
                    "name": "Small",
                    "group": {
                        "name": "Size"
                    }
                }
            ]
        }
    ]
}
```

<p class="callout info">Variant images must include at least one attribute, and each attribute must exactly match one of the variant’s attributes.</p>

</details><details id="bkmrk-add-additional-attri"><summary>Add Additional Attributes to Variant</summary>

```
PUT /api/products/{id|model}/variants/{id|sku}
```

```json
{
    "additional_attributes": [
        { 
            "key": "material", 
            "value": "100% leather"
        },
        { 
            "key": "lining", 
            "value": "Polyester"
        }
    ]
}
```

</details>## Example Response

```json
{
    "variant": {
        "id": 1
    }
}
```

# Manufacturers

# Manufacturer Index Endpoint

## Structure

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

## Example Request

```
GET /api/manufacturers?per_page=2
```

## Example Response

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

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

# View Manufacturer Endpoint

## Structure

### Manufacturer

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the manufacturer</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the manufacturer</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the manufacturer</td></tr><tr><td>`logo`</td><td>object</td><td>The logo of the manufacturer, see [Image](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-image)</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-tag) objects</td></tr><tr><td>`related_manufacturers`</td><td>array</td><td>The related manufacturers of the manufacturer, see [Related Manufacturers](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-related-manufacturer)</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-rule) objects</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-content) of the category</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-options) of the category</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-seo) of the manufacturer</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-additional-attribute) objects</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-settings) object with grouped key-value pairs</td></tr></tbody></table>

### Image

<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>`url`</td><td>string</td><td>The url of the image</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-tag-group)</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" 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>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td></tr></tbody></table>

### Related Manufacturers

<table border="1" id="bkmrk-name-type-descriptio-4" 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 manufacturer</td></tr><tr><td>`name`</td><td>sting</td><td>The name of the manufacturer</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-5" 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>`type`</td><td>string</td><td>The type of the rule</td></tr><tr><td>`requirement`</td><td>string</td><td>The requirement of the rule</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rule</td></tr><tr><td>`data`</td><td>object</td><td>The data for the rule, required keys vary based on `type` of the rule</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-manufacturer-endpoint#bkmrk-tag) objects for a `have_tags` rule</td></tr><tr><td>`data.manufacturers.*.id`</td><td>int</td><td>The manufacturer id for a `have_manufacturers` rule</td></tr><tr><td>`data.manufacturers.*.name`</td><td>string</td><td>The manufacturer name for a `have_manufacturers` rule</td></tr><tr><td>`data.price_list.id`</td><td>int</td><td>The price list id for an `in_price_list` rule</td></tr><tr><td>`data.price_list.name`</td><td>string</td><td>The price list name for an `in_price_list` rule</td></tr><tr><td>`data.category.id`</td><td>int</td><td>The category id for an `in_category` rule</td></tr><tr><td>`data.category.name`</td><td>string</td><td>The category name for an `in_category` rule</td></tr><tr><td>`data.days`</td><td>int</td><td>The days for a `published_within_days` rule</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start at date for a `published_within` rule</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end at date for a `published_within` rule</td></tr><tr><td>`data.min_price`</td><td>float</td><td>The min price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.max_price`</td><td>float</td><td>The max price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.currency`</td><td>string</td><td>The currency code for `price_between` rule</td></tr></tbody></table>

### Content

<table border="1" id="bkmrk-name-type-descriptio-6" 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>`summary`</td><td>string</td><td>The summary content</td></tr><tr><td>`description`</td><td>string</td><td>The description content</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small Image</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium Image</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large Image</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-7" 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>`categories.mode`</td><td>string</td><td>The category filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`categories.values`</td><td>array</td><td>The options for categories on the listings page</td></tr><tr><td>`categories.values.*.id`</td><td>int</td><td>The id of category</td></tr><tr><td>`categories.values.*.name`</td><td>string</td><td>The name of category</td></tr><tr><td>`filters.mode`</td><td>int</td><td>The facet filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. Manufacturer, Price, etc...</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-8" 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>`heading`</td><td>string</td><td>The SEO Heading</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-9" 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>`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>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
GET /api/manufacturers/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Burberry",
    "reference": null,
    "slug": "burberry",
    "logo": {
        "url": null
    },
    "content": {
        "summary": "Listing Page Summary Description",
        "description": "Listing Page Content Description",
        "small_image": {
            "url": null
        },
        "medium_image": {
            "url": null
        },
        "large_image": {
            "url": null
        }
    },
    "tags": [],
    "related_manufacturers": [
        {
            "id": 8,
            "name": "Aztech Mountain"
        }
    ],
    "rules": [],
    "options": {
        "categories": {
            "mode": "show_some",
            "values": [
                {
                    "id": 2,
                    "name": "Coats"
                }
            ]
        },
        "filters": {
            "mode": "show_some",
            "values": [
                {
                    "key": "t2",
                    "name": "Colour",
                    "collapsed": true
                },
                {
                    "key": "t1",
                    "name": "Size",
                    "collapsed": false
                },
                {
                    "key": "p",
                    "name": "Price",
                    "collapsed": false
                },
                {
                    "key": "m",
                    "name": "Manufacturer",
                    "collapsed": false
                },
                {
                    "key": "c",
                    "name": "Category",
                    "collapsed": false
                }
            ]
        },
        "sort_bys": [
            "model-az",
            "manufacturer-za"
        ],
        "per_page": 2
    },
    "seo": {
        "heading": "test heading",
        "page_title": "",
        "meta_description": "",
        "open_graph": "",
        "canonical": "",
        "noindex": 0,
        "nofollow": 0
    },
    "settings": [],
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

# Create Manufacturer Endpoint

## Structure

### Manufacturer

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the manufacturer</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td><td>Yes</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the manufacturer, if not present it is auto-generated from name</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the manufacturer</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the manufacturer, and/or (defaults to or if not provided)</td><td>No</td></tr><tr><td>`logo`</td><td>object</td><td>The logo of the manufacturer, see [Image](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-image)</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`related_manufacturers`</td><td>array</td><td>An array of related manufacturers (ids and/or names)</td><td>No</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-rule) objects</td><td>No</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-content) of the manufacturer</td><td>No</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-options) of the manufacturer</td><td>No</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-seo) of the manufacturer</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 111.789px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the tag (e.g., Small or Red)</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`group`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint#bkmrk-tag-group)</td><td style="height: 35.3984px;">Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/create-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
POST /api/manufacturers/
```

```json
{
    "name": "Burberry 2",
    "slug": "burberry-2",
    "content": {
        "summary": "Listing Page Summary Description",
        "description": "Listing Page Content Description"
    },
    "tags": [
        {
            "group": {
                "name": "Size"
            },
            "name": "Small"
        }
    ],
    "related_manufacturers": [
        1
    ],
    "rules": [
        [
            {
                "type": "have_tags",
                "requirement": "must",
                "logic": "or",
                "data": {
                    "tags": [
                        "size|small"
                    ]
                }
            },
            {
                "type": "in_category",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "category": 1
                }
            }
        ],
        [
            {
                "type": "in_price_list",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "price_list": 1
                }
            }
        ],
        [
            {
                "type": "price_between",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "min_price": 100,
                    "max_price": 200
                }
            },
            {
                "type": "reduced",
                "requirement": "must",
                "logic": "and"
            }
        ],
        [
            {
                "type": "published_within_days",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "days": "12"
                }
            },
        ]
    ],
    "options": {
        "categories": {
            "mode": "show_some",
            "values": [
                1
            ]
        },
        "filters": {
            "mode": "show_some",
            "values": [
                {
                    "name": "Price",
                    "collapsed": true
                },
                {
                    "name": "Manufacturer"
                }
            ]
        },
        "sort_bys": [
            "model-az",
            "manufacturer-za"
        ],
        "per_page": 2
    },
    "seo": {
        "heading": "test heading",
        "noindex": 0,
        "nofollow": 0
    },
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

## Example Response

```json
{
    "manufacturer": {
        "id": 1
    }
}
```

# Update Manufacturer Endpoint

## Structure

### Manufacturer

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td><td>No</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the manufacturer, if not present it is auto-generated from name</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the manufacturer</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the manufacturer, and/or (defaults to or if not provided)</td><td>No</td></tr><tr><td>`logo`</td><td>object</td><td>The logo of the manufacturer, see [Image](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-image)</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`related_manufacturers`</td><td>array</td><td>An array of related manufacturers (ids and/or names)</td><td>No</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-rule) objects</td><td>No</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-content) of the manufacturer</td><td>No</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-options) of the manufacturer</td><td>No</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-seo) of the manufacturer</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 111.789px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the tag (e.g., Small or Red)</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`group`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint#bkmrk-tag-group)</td><td style="height: 35.3984px;">Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/update-manufacturer-endpoint/update-manufacturer-endpoint/#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
PUT /api/manufacturers/{id|name}
```

```json
{
    "name": "Updated Burberry",
    "slug": "very-burberry",
    "content": {
        "description": "Updated Burberry"
    },
    "seo": {
        "heading": "Updated Burberry"
    },
    "tags": [
        {
            "name": "Green",
            "group": {
                "name": "Colour"
            }
        }
    ]
}
```

## Example Response

```json
{
    "manufacturer": {
        "id": 1
    }
}
```

# Delete Manufacturer Endpoint

## Example Request

```
DELETE /api/manufacturers/{id|name}
```

## Example Response

```
204 No Content
```

# Attribute Groups

# Attribute Group Index Endpoint

## Structure

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

## Example Request

```
GET /api/attribute-groups?per_page=2
```

## Example Response

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

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

# View Attribute Group Endpoint

## Structure

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 199.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;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the attribute group (e.g., Size or Colour)</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`display_as`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The display as of the attribute group (e.g.: dropdown, color\_swatches, image\_swatches, swatches)</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 reference of the attribute group</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`attributes`  
</td><td style="height: 29.7969px;">array</td><td style="height: 29.7969px;">An array of [Attribute](https://support.aerocommerce.com/books/api/page/view-attribute-group-endpoint#bkmrk-attribute) objects</td></tr></tbody></table>

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 89.3907px;"><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;">`name`  
</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The name of the attribute group (e.g., Size or Colour)</td></tr><tr style="height: 29.7969px;"><td>`display_name`</td><td>string</td><td>The display name of the attribute</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute group</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/view-attribute-group-endpoint#bkmrk-image) of the attribute</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-attribute-group-endpoint#bkmrk-tag) objects</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 94.9922px;"><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;">`name`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The name of the tag (e.g., Small or Red)</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`group`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The [Tag Group](https://support.aerocommerce.com/books/api/page/view-attribute-group-endpoint#bkmrk-tag-group) of the tag</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" 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>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-4" 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>`url`</td><td>string</td><td>The url of the image</td></tr></tbody></table>

## Example Request

```
GET /api/attribute-groups/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Size",
    "display_as": "dropdown",
    "reference": null,
    "attributes": [
        {
            "id": 1,
            "name": "Small",
            "display_name": "",
            "reference": null,
            "image": {
                "url": null
            },
            "tags": []
        }
    ]
}
```

# Create Attribute Group Endpoint

## Structure

### Attribute Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the attribute group</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., Size or Colour)</td><td>Yes</td></tr><tr><td>`display_as`</td><td>string</td><td>The display as of the attribute group (e.g.: dropdown, color\_swatches, image\_swatches, swatches)</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute group</td><td>No</td></tr><tr><td>`attributes`</td><td>array</td><td>The attributes of the attribute group, see [Attribute](https://support.aerocommerce.com/books/api/page/create-attribute-group-endpoint#bkmrk-attribute)</td><td>No</td></tr></tbody></table>

### Attribute

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the attribute</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`display_name`</td><td>string</td><td>The display name of the attribute</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/create-attribute-group-endpoint#bkmrk-image) of the attribute</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-attribute-group-endpoint#bkmrk-tag) objects</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/create-attribute-group-endpoint#bkmrk-tag-group)</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/attribute-groups/
```

```json
{
    "name": "Colour",
    "attributes": [
        {
            "name": "Blue",
            "reference": "blue"
        },
        {
            "name": "red"
        }
    ]
}
```

## Example Response

```json
{
    "attributeGroup": {
        "id": 1
    }
}
```

# Update Attribute Group Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute group (e.g., Size or Colour)</td><td>No</td></tr><tr><td>`display_as`</td><td>string</td><td>The display as of the attribute group (e.g.: dropdown, color\_swatches, image\_swatches, swatches)</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute group</td><td>No</td></tr></tbody></table>

## Example Request

```
PUT /api/attribute-groups/
```

```json
{
    "name": "Updated Size",
    "display_as": "swatches"
}
```

## Example Response

```json
{
    "attributeGroup": {
        "id": 1
    }
}
```

# Delete Attribute Group Endpoint

## Example Request

```
DELETE /api/attribute-groups/{id|name}
```

## Example Response

```
204 No Content
```

# Attributes

# Create Attribute Endpoint

## Structure

### Attribute

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the attribute</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`display_name`</td><td>string</td><td>The display name of the attribute</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/create-attribute-endpoint#bkmrk-image) of the attribute</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-attribute-endpoint#bkmrk-tag) objects</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/create-attribute-endpoint#bkmrk-tag-group)</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/attribute-groups/{id|name}/attributes
```

```json
{
    "name": "Medium",
    "display_name": "Medium"
}
```

## Example Response

```json
{
    "attribute": {
        "id": 1
    }
}
```

# Update Attribute Endpoint

## Structure

### Attribute

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the attribute (e.g., Small or Red)</td><td>No</td></tr><tr><td>`display_name`</td><td>string</td><td>The display name of the attribute</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the attribute</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/update-attribute-endpoint#bkmrk-image) of the attribute</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-attribute-endpoint#bkmrk-tag) objects</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/update-attribute-endpoint#bkmrk-tag-group)</td><td>Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

## Example Request

```
PUT /api/attribute-groups/{id|name}/attributes/{id|name}
```

```json
{
    "name": "Updated Small",
    "display_name": "Updated Small"
}
```

## Example Response

```json
{
    "attribute": {
        "id": 1
    }
}
```

# Delete Attribute Endpoint

## Example Request

```
DELETE /api/attribute-groups/{id|name}/attributes/{id|name}
```

## Example Response

```
204 No Content
```

# Categories

# Category Index Endpoint

## Structure

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

## Example Request

```
GET /api/categories?per_page=2
```

## Example Response

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

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

# View Category Endpoint

## Structure

### Category

<table border="1" id="bkmrk-name-type-descriptio-5" 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>`name`</td><td>string</td><td>The name of the category</td></tr><tr><td>`parent`</td><td>string</td><td>The parent of the category</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the category, if not present it is auto-generated from name</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the category</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the category, and/or (defaults to or if not provided)</td></tr><tr><td>`visible`</td><td>boolean</td><td>The visibility of the category (defaults to `true`)</td></tr><tr><td>`featured_image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-image) of the category</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-tag) objects</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-rule) objects</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-content) of the category</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-options) of the category</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-seo) of the category</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-additional-attribute) objects</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-settings) object with grouped key-value pairs</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`url`</td><td>string</td><td>The url of the image</td></tr></tbody></table>

### Tag

<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>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-tag-group)</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-3" 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>`type`</td><td>string</td><td>The type of the rule</td></tr><tr><td>`requirement`</td><td>string</td><td>The requirement of the rule</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rule</td></tr><tr><td>`data`</td><td>object</td><td>The data for the rule, required keys vary based on `type` of the rule</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-category-endpoint#bkmrk-tag) objects for a `have_tags` rule</td></tr><tr><td>`data.manufacturers.*.id`</td><td>int</td><td>The manufacturer id for a `have_manufacturers` rule</td></tr><tr><td>`data.manufacturers.*.name`</td><td>string</td><td>The manufacturer name for a `have_manufacturers` rule</td></tr><tr><td>`data.price_list.id`</td><td>int</td><td>The price list id for an `in_price_list` rule</td></tr><tr><td>`data.price_list.name`</td><td>string</td><td>The price list name for an `in_price_list` rule</td></tr><tr><td>`data.category.id`</td><td>int</td><td>The category id for an `in_category` rule</td></tr><tr><td>`data.category.name`</td><td>string</td><td>The category name for an `in_category` rule</td></tr><tr><td>`data.days`</td><td>int</td><td>The days for a `published_within_days` rule</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start at date for a `published_within` rule</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end at date for a `published_within` rule</td></tr><tr><td>`data.min_price`</td><td>float</td><td>The min price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.max_price`</td><td>float</td><td>The max price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.currency`</td><td>string</td><td>The currency code for `price_between` rule</td></tr></tbody></table>

### Content

<table border="1" id="bkmrk-name-type-descriptio-6" 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>`summary`</td><td>string</td><td>The summary content</td></tr><tr><td>`description`</td><td>string</td><td>The description content</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small Image</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium Image</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large Image</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-7" 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>`categories.mode`</td><td>string</td><td>The category filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`categories.values`</td><td>array</td><td>The options for categories on the listings page</td></tr><tr><td>`categories.values.*.id`</td><td>int</td><td>The id of category</td></tr><tr><td>`categories.values.*.name`</td><td>string</td><td>The name of category</td></tr><tr><td>`filters.mode`</td><td>int</td><td>The facet filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. Manufacturer, Price, etc...</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-8" 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>`heading`</td><td>string</td><td>The SEO Heading</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-9" 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>`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>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
GET /api/categories/{id|name|breadcrumb}
```

## Example Response

```json
{
    "id": 1,
    "name": "Mens",
    "parent": null,
    "reference": null,
    "slug": "mens",
    "featured_image": {
        "url": null
    },
    "content": {
        "summary": "",
        "description": "",
        "small_image": {
            "url": null
        },
        "medium_image": {
            "url": null
        },
        "large_image": {
            "url": null
        }
    },
    "tags": [],
    "rules": [],
    "options": {
        "categories": {
            "mode": "show_all",
            "values": []
        },
        "filters": {
            "mode": "show_all",
            "values": []
        },
        "sort_bys": [],
        "per_page": 24
    },
    "seo": {
        "heading": "",
        "page_title": "",
        "meta_description": "",
        "open_graph": "",
        "canonical": "",
        "noindex": null,
        "nofollow": null
    },
    "settings": [],
    "additional_attributes": []
}
```

# Create Category Endpoint

## Structure

### Category

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 689.531px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 for the category</td><td style="height: 29.7969px;">No</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 category</td><td style="height: 29.7969px;">Yes</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`parent`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The parent of the category</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`slug`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The slug of the category, if not present it is auto-generated from name</td><td style="height: 63.3906px;">No</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 reference of the category</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`logic`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The logic of the rules for the category, and/or (defaults to or if not provided)</td><td style="height: 63.3906px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`visible`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">The visibility of the category (defaults to `true`)</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`featured_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Image of the category</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`tags`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Tag](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-tag) objects</td><td style="height: 35.3984px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`rules`</td><td style="height: 52.1953px;">array</td><td style="height: 52.1953px;">An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-rule) objects</td><td style="height: 52.1953px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`content`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">The Listing Page [Content](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-content) of the category</td><td style="height: 52.1953px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`options`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">The Listing Page [Options](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-options) of the category</td><td style="height: 52.1953px;">No</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`seo`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The [SEO](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-seo) of the category</td><td style="height: 35.3984px;">No</td></tr><tr style="height: 57.7969px;"><td style="height: 57.7969px;">`additional_attributes`</td><td style="height: 57.7969px;">array</td><td style="height: 57.7969px;">An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-additional-attribute) objects</td><td style="height: 57.7969px;">No</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1953px;">No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 111.789px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the tag (e.g., Small or Red)</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`group`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-tag-group)</td><td style="height: 35.3984px;">Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/create-category-endpoint#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
POST /api/categories/
```

```json
{
    "name": "Mens",
    "slug": "mens",
    "parent": 1,
    "visible": false,
    "content": {
        "summary": "Listing Page Summary Description",
        "description": "Listing Page Content Description"
    },
    "tags": [
        {
            "group": {
                "name": "Size"
            },
            "name": "Small"
        }
    ],
    "rules": [
        [
            {
                "type": "have_tags",
                "requirement": "must",
                "logic": "or",
                "data": {
                    "tags": [
                        1
                    ]
                }
            },
            {
                "type": "in_category",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "category": 1
                }
            }
        ],
        [
            {
                "type": "in_price_list",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "price_list": 1
                }
            }
        ],
        [
            {
                "type": "price_between",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "min_price": 100,
                    "max_price": 200
                }
            },
            {
                "type": "reduced",
                "requirement": "must",
                "logic": "and"
            }
        ],
        [
            {
                "type": "published_within_days",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "days": "12"
                }
            },
            {
                "type": "have_manufacturers",
                "requirement": "must",
                "logic": "and",
                "data": {
                    "manufacturers": [
                        1
                    ]
                }
            }
        ]
    ],
    "options": {
        "categories": {
            "mode": "show_some",
            "values": [
                1
            ]
        },
        "filters": {
            "mode": "show_some",
            "values": [
                {
                    "name": "Price",
                    "collapsed": true
                },
                {
                    "name": "Manufacturer"
                }
            ]
        },
        "sort_bys": [
            "model-az",
            "manufacturer-za"
        ],
        "per_page": 2
    },
    "seo": {
        "heading": "test heading",
        "page_title": "test page title",
        "meta_description": "test meta description",
        "noindex": 0,
        "nofollow": 0
    },
    "additional_attributes": [
        {
            "key": "test_name",
            "value": "test_value"
        }
    ]
}
```

## Example Response

```json
{
    "category": {
        "id": 1
    }
}
```

# Update Category Endpoint

## Structure

### Category

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the category</td><td>No</td></tr><tr><td>`parent`</td><td>string</td><td>The parent of the category</td><td>No</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the category, if not present it is auto-generated from name</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the category</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the category, and/or (defaults to or if not provided)</td><td>No</td></tr><tr><td>`visible`</td><td>boolean</td><td>The visibility of the category (defaults to `true`)</td><td>No</td></tr><tr><td>`featured_image`</td><td>object</td><td>The Image of the category</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-tag) objects</td><td>No</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-rule) objects</td><td>No</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-content) of the category</td><td>No</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-options) of the category</td><td>No</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-seo) of the category</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 111.789px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the tag (e.g., Small or Red)</td><td style="height: 46.5938px;">Yes</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`group`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/update-category-endpoint#bkmrk-tag-group)</td><td style="height: 35.3984px;">Yes</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/update-category-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/update-category-endpoint/#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/update-category-endpoint/#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
PUT /api/categories/{id|name|breadcrumb}
```

```json
{
    "name": "Updated Mens",
    "slug": "mens-mens",
    "content": {
        "description": "Updated Mens"
    },
    "seo": {
        "heading": "Updated Mens"
    },
    "tags": [
        {
            "name": "Green",
            "group": {
                "name": "Colour"
            }
        }
    ]
}
```

## Example Response

```json
{
    "category": {
        "id": 1
    }
}
```

# Delete Category Endpoint

## Example Request

```
DELETE /api/categories/{id|name|breadcrumb}
```

## Example Response

```
204 No Content
```

# Tag Groups

# Tag Group Index Endpoint

## Structure

See [<span class="s1">View Tag Group Endpoint</span>](https://support.aerocommerce.com/books/api/page/view-tag-group-endpoint) for the structure of the tag group payload inside the data array.

## Example Request

```
GET /api/tag-groups?per_page=2
```

## Example Response

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

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

# View Tag Group Endpoint

## Structure

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 188.18px;"><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;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the tag group (e.g., Size or Colour)</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 reference of the tag group</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`show_in_filters`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the tag group shows in filters on listings page</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`tags`</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Tag](https://support.aerocommerce.com/books/api/page/view-tag-group-endpoint#bkmrk-tag) objects</td></tr></tbody></table>

### Tag

<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>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the tag, if not present it is auto-generated from name</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag</td></tr><tr><td>`image`</td><td>object</td><td>The image of the tag, see [Image](https://support.aerocommerce.com/books/api/page/view-tag-group-endpoint#bkmrk-image)</td></tr><tr><td>`has_slug`</td><td>boolean</td><td>Whether the tag has a slug or not</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`url`</td><td>string</td><td>The url of the image</td></tr></tbody></table>

## Example Request

```
GET /api/tag-groups/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Size",
    "reference": null,
    "show_in_filters": true,
    "tags": [
        {
            "id": 1,
            "name": "Small",
            "reference": null,
            "slug": "small",
            "image": {
                "url": null
            },
            "has_slug": true
        }
    ]
}
```

# Create Tag Group Endpoint

## Structure

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the tag group</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag group</td><td>No</td></tr><tr><td>`show_in_filters`</td><td>boolean</td><td>Whether the tag group shows in filters on listings page (defaults to `true`)</td><td>No</td></tr><tr><td>`tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/create-tag-group-endpoint#bkmrk-tag) objects</td><td>No</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the tag</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td><td>Yes</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the tag, if not present it is auto-generated from name (unless `has_slug` is `false`)</td><td>Conditional</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/create-tag-group-endpoint#bkmrk-image) of the tag</td><td>No</td></tr><tr><td>`has_slug`</td><td>boolean</td><td>Whether the tag has a slug or not (defaults to `false`, unless `slug` is provided)</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/tag-groups/
```

```json
{
    "name": "Colour",
    "show_in_filters": false,
    "tags": [
        {
            "name": "Blue",
            "slug": "blueeee",
            "reference": "blue"
        },
        {
            "name": "red",
            "has_slug": false
        }
    ]
}
```

## Example Response

```json
{
    "tagGroup": {
        "id": 1
    }
}
```

# Update Tag Group Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 59.5938px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag group</td><td>No</td></tr><tr><td>`show_in_filters`</td><td>boolean</td><td>Whether the tag group shows in filters on listings page</td><td>No</td></tr></tbody></table>

## Example Request

```
PUT /api/tag-groups/{id|name}
```

```json
{
    "name": "Updated Size",
    "show_in_filters": false
}
```

## Example Response

```json
{
    "tagGroup": {
        "id": 1
    }
}
```

# Delete Tag Group Endpoint

## Example Request

```
DELETE /api/tag-groups/{id|name}
```

## Example Response

```
204 No Content
```

# Tags

# Create Tag Endpoint

## Structure

### Tag

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the tag</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag</td><td>Yes</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the tag, if not present it is auto-generated from name</td><td>Conditional</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/create-tag-endpoint#bkmrk-image) of the tag</td><td>No</td></tr><tr><td>`has_slug`</td><td>boolean</td><td>Whether the tag has a slug or not (defaults to `false` unless `slug` is provided)</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/tag-groups/{id|name}/tags
```

```json
{
    "name": "Medium",
    "slug": "med-ium"
}
```

## Example Response

```
{
    "tag": {
        "id": 1
    }
}
```

# Update Tag Endpoint

## Structure

### Tag

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag</td><td>No</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the tag</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the tag</td><td>No</td></tr><tr><td>`image`</td><td>object</td><td>The [Image](https://support.aerocommerce.com/books/api/page/update-tag-endpoint#bkmrk-image) of the tag</td><td>No</td></tr><tr><td>`has_slug`</td><td>boolean</td><td>Whether the tag has a slug or not</td><td>No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

## Example Request

```
PUT /api/tag-groups/{id|name}/tags/{id|name}
```

```json
{
    "name": "Medium",
    "slug": "med-ium"
}
```

## Example Response

```json
{
    "tag": {
        "id": 1
    }
}
```

# Delete Tag Endpoint

## Example Request

```
DELETE /api/tag-groups/{id|name}/tags/{id|name}
```

## Example Response

```
204 No Content
```

# Collections

# Collection Index Endpoint

## Structure

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

## Example Request

```
GET /api/collections?per_page=2
```

## Example Response

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

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

# View Collection Endpoint

## Structure

### Collection

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the collection</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the collection</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the collection</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the collection</td></tr><tr><td>`rules`</td><td>array</td><td>The listing page rules of the collection, see [Rule](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-rule)</td></tr><tr><td>`content`</td><td>object</td><td>The listing page content of the collection, see [Content](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-content)</td></tr><tr><td>`options`</td><td>object</td><td>The listing page options of the collection, see [Options](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-options)</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-seo) of the collection</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-additional-attribute) objects</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-settings) object with grouped key-value pairs</td></tr></tbody></table>

### Image

<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>`url`</td><td>string</td><td>The url of the image</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-tag-group)</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-3" 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>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-5" 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>`type`</td><td>string</td><td>The type of the rule</td></tr><tr><td>`requirement`</td><td>string</td><td>The requirement of the rule</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rule</td></tr><tr><td>`data`</td><td>object</td><td>The data for the rule, required keys vary based on `type` of the rule</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of [Tag](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-tag) objects for a `have_tags` rule</td></tr><tr><td>`data.manufacturers.*.id`</td><td>int</td><td>The manufacturer id for a `have_manufacturers` rule</td></tr><tr><td>`data.manufacturers.*.name`</td><td>string</td><td>The manufacturer name for a `have_manufacturers` rule</td></tr><tr><td>`data.price_list.id`</td><td>int</td><td>The price list id for an `in_price_list` rule</td></tr><tr><td>`data.price_list.name`</td><td>string</td><td>The price list name for an `in_price_list` rule</td></tr><tr><td>`data.category.id`</td><td>int</td><td>The category id for an `in_category` rule</td></tr><tr><td>`data.category.name`</td><td>string</td><td>The category name for an `in_category` rule</td></tr><tr><td>`data.days`</td><td>int</td><td>The days for a `published_within_days` rule</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start at date for a `published_within` rule</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end at date for a `published_within` rule</td></tr><tr><td>`data.min_price`</td><td>float</td><td>The min price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.max_price`</td><td>float</td><td>The max price **including tax**, in whole units (e.g. pounds not pence) for `price_between` rule</td></tr><tr><td>`data.currency`</td><td>string</td><td>The currency code for `price_between` rule</td></tr></tbody></table>

### Content

<table border="1" id="bkmrk-name-type-descriptio-6" 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>`summary`</td><td>string</td><td>The summary content</td></tr><tr><td>`description`</td><td>string</td><td>The description content</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small [Image](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-image)</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium [Image](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-image)</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large [Image](https://support.aerocommerce.com/books/api/page/view-collection-endpoint#bkmrk-image)</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-7" 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>`categories.mode`</td><td>string</td><td>The category filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`categories.values`</td><td>array</td><td>The options for categories on the listings page</td></tr><tr><td>`categories.values.*.id`</td><td>int</td><td>The id of category</td></tr><tr><td>`categories.values.*.name`</td><td>string</td><td>The name of category</td></tr><tr><td>`filters.mode`</td><td>int</td><td>The facet filters mode (e.g., show\_all/hide\_all/show\_some)</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. Manufacturer, Price, etc...</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-8" 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>`heading`</td><td>string</td><td>The SEO Heading</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-9" 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>`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>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
GET /api/collections/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Sale",
    "reference": null,
    "slug": "sale",
    "published_at": "2025-01-08T12:28:14.000000Z",
    "content": {
        "summary": "Combination Summary",
        "description": "Combination Description",
        "small_image": {
            "url": null
        },
        "medium_image": {
            "url": null
        },
        "large_image": {
            "url": null
        }
    },
    "rules": [],
    "options": {
        "categories": {
            "mode": "show_all",
            "values": []
        },
        "filters": {
            "mode": "show_all",
            "values": []
        },
        "sort_bys": [],
        "per_page": 24
    },
    "seo": {
        "heading": "SEO Heading",
        "page_title": "SEO Page Title",
        "meta_description": "SEO Meta Description",
        "open_graph": "",
        "canonical": "",
        "noindex": 0,
        "nofollow": 0
    },
    "settings": [],
    "additional_attributes": []
}
```

# Create Collection Endpoint

## Structure

### Collection

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the collection</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the collection</td><td>Yes</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the collection, if not present it is auto-generated from name</td><td>No</td></tr><tr><td>`reference`</td><td>string</td><td>The reference of the collection</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>The logic of the rules for the collection, and/or (defaults to or if not provided)</td><td>No</td></tr><tr><td>`published_at`</td><td>timestamp</td><td>The published at of the collection</td><td>No</td></tr><tr><td>`rules`</td><td>array</td><td>An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-rule) objects</td><td>No</td></tr><tr><td>`content`</td><td>object</td><td>The Listing Page [Content](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-content) of the collection</td><td>No</td></tr><tr><td>`options`</td><td>object</td><td>The Listing Page [Options](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-options) of the collection</td><td>No</td></tr><tr><td>`seo`</td><td>object</td><td>The [SEO](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-seo) of the collection</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr><tr><td style="height: 52.1953px;">`settings`</td><td style="height: 52.1953px;">object</td><td style="height: 52.1953px;">A [Settings](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1953px;">No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/create-collection-endpoint#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
POST /api/collections/
```

```json
{
  "name": "Sale 2",
  "slug": "sale-2",
  "content": {
    "summary": "Listing Page Summary Description",
    "description": "Listing Page Content Description"
  },
  "rules": [
    [
      {
        "type": "have_tags",
        "requirement": "must",
        "logic": "or",
        "data": {
          "tags": [
            "size|small"
          ]
        }
      },
      {
        "type": "in_category",
        "requirement": "must",
        "logic": "and",
        "data": {
          "category": 1
        }
      }
    ],
    [
      {
        "type": "in_price_list",
        "requirement": "must",
        "logic": "and",
        "data": {
          "price_list": 1
        }
      }
    ],
    [
      {
        "type": "price_between",
        "requirement": "must",
        "logic": "and",
        "data": {
          "min_price": 100,
          "max_price": 200
        }
      },
      {
        "type": "reduced",
        "requirement": "must",
        "logic": "and"
      }
    ],
    [
      {
        "type": "have_manufacturers",
        "requirement": "must",
        "logic": "and",
        "data": {
          "manufacturers": [
            "Burberry"
          ]
        }
      },
      {
        "type": "published_within",
        "requirement": "must",
        "logic": "and",
        "data": {
          "start_at": "2025-09-03T06:52:00.000000Z",
          "end_at": "2025-09-20T06:52:00.000000Z"
        }
      }
    ]
  ],
  "options": {
    "categories": {
      "mode": "show_some",
      "values": [
        1
      ]
    },
    "filters": {
      "mode": "show_some",
      "values": [
        {
          "name": "Price",
          "collapsed": true
        },
        {
          "name": "Manufacturer"
        }
      ]
    },
    "sort_bys": [
      "model-az",
      "manufacturer-za"
    ],
    "per_page": 2
  },
  "seo": {
    "heading": "test heading",
    "page_title": "",
    "meta_description": "",
    "open_graph": "",
    "canonical": "",
    "noindex": 0,
    "nofollow": 0
  },
  "additional_attributes": [
    {
      "key": "test_name",
      "value": "test_value"
    }
  ]
}
```

## Example Response

```json
{
    "collection": {
        "id": 1
    }
}
```

# Update Collection Endpoint

## Structure

### Collection

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 577.719px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 collection</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`slug`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The slug of the collection, if not present it is auto-generated from name</td><td style="height: 63.3906px;">No</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 reference of the collection</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`logic`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The logic of the rules for the collection, and/or (defaults to or if not provided)</td><td style="height: 63.3906px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`published_at`</td><td style="height: 46.5938px;">timestamp</td><td style="height: 46.5938px;">The published at of the collection</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`rules`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of Listing Page [Rule](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-rule) objects</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`content`</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">The Listing Page [Content](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-content) of the collection</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`options`</td><td style="height: 46.5938px;">object</td><td style="height: 46.5938px;">The Listing Page [Options](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-options) of the collection</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`seo`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The [SEO](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-seo) of the collection</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`additional_attributes`</td><td style="height: 46.5938px;">array</td><td style="height: 46.5938px;">An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-additional-attribute) objects</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">`settings`</td><td style="height: 52.1875px;">object</td><td style="height: 52.1875px;">A [Settings](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td style="height: 52.1875px;">No</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td></tr></tbody></table>

### Rule

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`type`</td><td>string</td><td>Rule type. Allowed values: `in_category`, `in_price_list`, `have_manufacturers`, `have_tags`, `price_between`, `reduced`, `published_within_days`, `published_within`</td><td>Yes</td></tr><tr><td>`requirement`</td><td>string</td><td>Requirement for the rule. Allowed values: `must`, `must_not`. Defaults to `must`</td><td>No</td></tr><tr><td>`logic`</td><td>string</td><td>How this rule combines with others. Allowed values: `and`, `or`. Defaults to `or`</td><td>No</td></tr><tr><td>`data`</td><td>object</td><td>Rule-specific data (see below). Keys vary depending on type</td><td>Yes</td></tr><tr><td>`data.tags`</td><td>array</td><td>An array of Tag ids (or names formatted as group|name). Required if `type = have_tags`</td><td>Conditional</td></tr><tr><td>`data.manufacturers`</td><td>array</td><td>An array of manufacturer ids (or names). Required if `type = have_manufacturers`</td><td>Conditional</td></tr><tr><td>`data.price_list`</td><td>string</td><td>Price list id (or name). Required if `type = in_price_list`</td><td>Conditional</td></tr><tr><td>`data.category`</td><td>string</td><td>Category id (or name/breadcrumb, e.g., Mens &gt; Coats). Required if `type = in_category`</td><td>Conditional</td></tr><tr><td>`data.days`</td><td>int</td><td>Number of days. Required if `type = published_within_days`</td><td>Conditional</td></tr><tr><td>`data.start_at`</td><td>timestamp</td><td>The start date. Required if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.end_at`</td><td>timestamp</td><td>The end date. Optional if `type = published_within`</td><td>Conditional</td></tr><tr><td>`data.min_price`</td><td>float</td><td>Minimum price (including tax) in store’s default currency, whole units only (e.g. pounds, not pence). Required if `type = price_between`</td><td>Conditional</td></tr><tr><td>`data.max_price`</td><td>float</td><td>Maximum price (including tax) in store’s default currency, whole units only. Required if `type = price_between`</td><td>Conditional</td></tr></tbody></table>

<p class="callout info"> The `rules` are nested within arrays to achieve grouping, see `rules` in Example Request for clarity</p>

### Content

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 184.375px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`summary`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The summary content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`description`</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The description content</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`small_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Small [Image](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`medium_image`</td><td style="height: 29.7969px;">object</td><td style="height: 29.7969px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-image)</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">`large_image`</td><td style="height: 35.3906px;">object</td><td style="height: 35.3906px;">The Large [Image](https://support.aerocommerce.com/books/api/page/update-collection-endpoint#bkmrk-image)</td><td style="height: 35.3906px;">No</td></tr></tbody></table>

### Options

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`categories.mode`</td><td>string</td><td>Categories filter display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`categories.values`</td><td>array</td><td>An array of category ids (or names/breadcrumbs, e.g. Mens &gt; Coats) to show. Required if `categories.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.mode`</td><td>int</td><td>Facet filters display mode. Allowed values: `show_all`, `hide_all`, `show_some`. Default: `show_all`</td><td>No</td></tr><tr><td>`filters.values`</td><td>array</td><td>The options for facet filters on the listings page. Required if `filters.mode = show_some`</td><td>Conditional</td></tr><tr><td>`filters.values.*.name`</td><td>string</td><td>The name of the facet filter, e.g. `Category`, `Price`, etc...</td><td>Yes</td></tr><tr><td>`filters.values.*.collapsed`</td><td>boolean</td><td>Whether to collapse the facet filter or not</td><td>Yes</td></tr><tr><td>`sort_bys`</td><td>array</td><td>An array of the applied sorts on the listings page (e.g., name-az, name-za, price-low, price-high, etc...)</td><td>No</td></tr><tr><td>`per_page`</td><td>int</td><td>The per page of the listings page (defaults to 24)</td><td>No</td></tr></tbody></table>

### SEO

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`heading`</td><td>string</td><td>The SEO Heading</td><td>No</td></tr><tr><td>`page_title`</td><td>string</td><td>The SEO Page Title</td><td>No</td></tr><tr><td>`meta_description`</td><td>string</td><td>The SEO Meta Description</td><td>No</td></tr><tr><td>`canonical`</td><td>string</td><td>The SEO Canonical</td><td>No</td></tr><tr><td>`noindex`</td><td>boolean</td><td>The SEO No Index</td><td>No</td></tr><tr><td>`nofollow`</td><td>boolean</td><td>The SEO No Follow</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
PUT /api/collections/{id|name}
```

```json
{
    "name": "Updated Sale",
    "slug": "big-sale",
    "content": {
        "description": "Updated Sale"
    },
    "seo": {
        "heading": "Updated Sale"
    }
}

```

## Example Response

```json
{
    "collection": {
        "id": 1
    }
}
```

# Delete Collection Endpoint

## Example Request

```
DELETE /api/collections/{id|name}
```

## Example Response

```
204 No Content
```

# Customers

# Customer Index Endpoint

## Structure

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

## Filters

<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>`emails`</td><td>Only return customers with specific emails</td><td>`?emails=test@gmail.com,example@gmail.com`</td></tr><tr><td>`names`</td><td>Only return customers with specific names</td><td>`?names=Test,Another Test`</td></tr><tr><td>`groups`</td><td>Only return customers with specific groups</td><td>`?groups=VIP,Retail`</td></tr></tbody></table>

## Example Request

```
GET /api/customers?per_page=2
```

## Example Response

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

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

# View Customer Endpoint

## Structure

### Customer

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the customer</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer</td></tr><tr><td>`email`</td><td>string</td><td>The email of the customer</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date that the customer was created at</td></tr><tr><td>`group`</td><td>object</td><td>The group the customer belongs to, see [Group](https://support.aerocommerce.com/books/api/page/view-customer-endpoint#bkmrk-group)</td></tr><tr><td>`addresses`</td><td>array</td><td>An array of [Address](https://support.aerocommerce.com/books/api/page/view-customer-endpoint#bkmrk-address) objects</td></tr><tr><td>`tax_group`</td><td>object</td><td>The [Tax Group](https://support.aerocommerce.com/books/api/page/view-customer-endpoint#bkmrk-tax-group) of the customer</td></tr><tr><td>`additional_attributes`</td><td>object</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-customer-endpoint#bkmrk-additional-attribute) objects</td></tr></tbody></table>

### Group

<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 customer group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer group</td></tr><tr><td>`tax_group`</td><td>object</td><td>The tax group of the customer group, see [Tax Group](https://support.aerocommerce.com/books/api/page/view-customer-endpoint#bkmrk-tax-group)</td></tr></tbody></table>

### Address

<table border="1" id="bkmrk-name-type-descriptio-2" 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>`name`</td><td>string</td><td>The name of the address</td></tr><tr><td>`first_name`</td><td>string</td><td>The first name for the address</td></tr><tr><td>`last_name`</td><td>string</td><td>The last name for the address</td></tr><tr><td>`company`</td><td>string</td><td>The company for the address</td></tr><tr><td>`mobile`</td><td>string</td><td>The mobile number for the address</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the address</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the address</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the address</td></tr><tr><td>`city`</td><td>string</td><td>The city for the address</td></tr><tr><td>`county`</td><td>string</td><td>The county for the address</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the address</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the address</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the address</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the address</td></tr><tr><td>`eori_number`</td><td>string</td><td>The EORI number for the address</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether the address is default</td></tr></tbody></table>

### Tax Group

<table border="1" id="bkmrk-name-type-descriptio-3" 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 customer tax group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer tax group</td></tr></tbody></table>

### Additional Attributes

<table border="1" id="bkmrk-name-type-descriptio-4" 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>`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 Request

```
GET /api/customers/{id|email}
```

## Example Response

```json
{
    "id": 1,
    "name": "test test",
    "email": "test@gmail.com",
    "created_at": "2025-06-27T13:00:47.000000Z",
    "group": {
        "id": 1,
        "name": "test",
        "tax_group": {
            "id": 1,
            "name": "Retail Customer"
        }
    },
    "addresses": [
        {
            "id": 1,
            "name": null,
            "first_name": "test",
            "last_name": "test",
            "company": "test",
            "mobile": null,
            "phone": null,
            "line_1": "test",
            "line_2": null,
            "city": "test",
            "county": "Test",
            "zone": null,
            "postcode": "te57 10l",
            "country": "GB",
            "reference": null,
            "eori_number": null,
            "is_default": 0
        },
        {
            "id": 2,
            "name": null,
            "first_name": "test",
            "last_name": "test",
            "company": "test",
            "mobile": null,
            "phone": null,
            "line_1": "test",
            "line_2": null,
            "city": "test",
            "county": null,
            "zone": null,
            "postcode": "te57 10l",
            "country": "GB",
            "reference": null,
            "eori_number": null,
            "is_default": 1
        }
    ],
    "tax_group": null,
    "additional_attributes": []
}
```

# Create Customer Endpoint

## Structure

### Customer

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the customer</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer</td><td>Yes</td></tr><tr><td>`email`</td><td>string</td><td>The email of the customer</td><td>Yes</td></tr><tr><td>`password`</td><td>string</td><td>The plain-text password of the customer</td><td>Conditional `*`</td></tr><tr><td>`password_hash`</td><td>string</td><td>The hashed password of the customer</td><td>Conditional `*`</td></tr><tr><td>`group`</td><td>string</td><td>The group name of the customer</td><td>No</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group name of the customer</td><td>No</td></tr><tr><td>`addresses`</td><td>array</td><td>The addresses of the customer, see [Address](https://support.aerocommerce.com/books/api/page/create-customer-endpoint#bkmrk-address)</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>The additional attributes of the customer, see [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-customer-endpoint#bkmrk-additional-attribute)</td><td>No</td></tr></tbody></table>

`*` One of password or password\_hash must be provided. Using password\_hash is recommended. Ensure the hashing algorithm matches the store’s configuration (usually bcrypt).

### Address

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the address</td><td>No</td></tr><tr><td>`first_name`</td><td>string</td><td>The first name for the address</td><td>Yes</td></tr><tr><td>`last_name`</td><td>string</td><td>The last name for the address</td><td>Yes</td></tr><tr><td>`company`</td><td>string</td><td>The company for the address</td><td>No</td></tr><tr><td>`mobile`</td><td>string</td><td>The mobile number for the address</td><td>No</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the address</td><td>No</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the address</td><td>Yes</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the address</td><td>No</td></tr><tr><td>`city`</td><td>string</td><td>The city for the address</td><td>Yes</td></tr><tr><td>`county`</td><td>string</td><td>The county for the address</td><td>No</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the address, required for some countries (e.g., US, AU, etc)</td><td>Conditional</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the address, required for some countries (e.g., GB, US, etc)</td><td>Conditional</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the address</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the address</td><td>No</td></tr><tr><td>`eori_number`</td><td>string</td><td>The EORI number for the address</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether the address is default</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/customers
```

```json
{
    "name": "Test",
    "email": "test@gmail.com",
    "password_hash": "$2y$10$0QFHb4QU0wAsaskZPQv0Re72Xa2KXrWt5YR32O5aBxIwc0c41bbwm",
    "group": "Group Name",
    "addresses": [
        {
            "name": "API Address",
            "first_name": "test",
            "last_name": "test",
            "company": "test",
            "mobile": null,
            "phone": null,
            "line_1": "test",
            "line_2": null,
            "city": "test",
            "county" : "Test",
            "zone": null,
            "postcode": "te57 10l",
            "country": "GB",
            "reference": null,
            "eori_number": null,
            "is_default": true
        }
    ],
    "additional_attributes": [
        {
            "key": "api",
            "value": "true"
        }
    ]
}
```

## Example Response

```json
{
    "customer": {
        "id": 1
    }
}
```

# Update Customer Endpoint

## Structure

### Customer

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the customer</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer</td><td>No</td></tr><tr><td>`email`</td><td>string</td><td>The email of the customer</td><td>No</td></tr><tr><td>`group`</td><td>string</td><td>The group name of the customer</td><td>No</td></tr><tr><td>`tax_group`</td><td>string</td><td>The tax group name of the customer</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>The additional attributes of the customer, see [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-customer-endpoint/update-customer-endpoint#bkmrk-additional-attribute)</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

## Example Request

```
PUT /api/customers/{id|email}
```

```json
{
    "name": "Test",
    "email": "test@gmail.com",
    "group": "Group Name",
    "additional_attributes": [
        {
            "key": "last-api-update",
            "value": "2023-09-01 09:29:41"
        }
    ]
}
```

## Example Response

```json
{
    "customer": {
        "id": 1
    }
}
```

# Addresses

# Create Address Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the address</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the address</td><td>No</td></tr><tr><td>`first_name`</td><td>string</td><td>The first name for the address</td><td>Yes</td></tr><tr><td>`last_name`</td><td>string</td><td>The last name for the address</td><td>Yes</td></tr><tr><td>`company`</td><td>string</td><td>The company for the address</td><td>No</td></tr><tr><td>`mobile`</td><td>string</td><td>The mobile number for the address</td><td>No</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the address</td><td>No</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the address</td><td>Yes</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the address</td><td>No</td></tr><tr><td>`city`</td><td>string</td><td>The city for the address</td><td>Yes</td></tr><tr><td>`county`</td><td>string</td><td>The county for the address</td><td>No</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the address, required for some countries (e.g., US, AU, etc)</td><td>Conditional</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the address, required for some countries (e.g., GB, US, etc)</td><td>Conditional</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the address</td><td>Yes</td></tr><tr><td>`reference`</td><td>string</td><td>The **unique** reference for the address</td><td>No</td></tr><tr><td>`eori_number`</td><td>string</td><td>The EORI number for the address</td><td>No</td></tr><tr><td>`is_default`</td><td>boolean</td><td>Whether the address is default</td><td>No</td></tr></tbody></table>

## Example Request

```
POST /api/customers/{id}/addresses
```

```json
{
    "name": "API Address",
    "first_name": "test",
    "last_name": "test",
    "company": "test",
    "mobile": null,
    "phone": null,
    "line_1": "test",
    "line_2": null,
    "city": "test",
    "county": "Test",
    "zone": null,
    "postcode": "te57 10l",
    "country": "GB",
    "reference": null,
    "eori_number": null,
    "is_default": true
}
```

## Example Response

```json
{
    "address": {
        "id": 1
    }
}
```

# Update Address Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</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 for the address</td><td style="height: 29.7969px;">No</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 address</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`first_name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The first name for the address</td><td style="height: 46.5938px;">No</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 address</td><td style="height: 29.7969px;">No</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 address</td><td style="height: 29.7969px;">No</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 address</td><td style="height: 46.5938px;">No</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 address</td><td style="height: 46.5938px;">No</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 address</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`line_2`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The second line for the address</td><td style="height: 46.5938px;">No</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 address</td><td style="height: 29.7969px;">No</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 address</td><td style="height: 29.7969px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`zone`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The zone code for the address, required for some countries (e.g., US, AU, etc)</td><td style="height: 63.3906px;">No</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">`postcode`</td><td style="height: 63.3906px;">string</td><td style="height: 63.3906px;">The postcode for the address, required for some countries (e.g., GB, US, etc)</td><td style="height: 63.3906px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`country`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The country code for the address</td><td style="height: 46.5938px;">No</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 address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`eori_number`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The EORI number for the address</td><td style="height: 46.5938px;">No</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`is_default`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the address is default</td><td style="height: 46.5938px;">No</td></tr></tbody></table>

## Example Request

```
PUT /api/customers/{id}/addresses/{id}
```

```json
{
    "name": "API Address Updated",
    "first_name": "test2",
    "county": "Test 2"
}
```

## Example Response

```json
{
    "address": {
        "id": 1
    }
}
```

# Delete Address Endpoint

## Example Request

```
DELETE /api/customers/{id}/addresses/{id}
```

## Example Response

```
204 No Content
```

# Payment Methods

# Payment Method Index Endpoint

## Structure

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

## Example Request

```
GET /api/payment-methods?per_page=2
```

## Example Response

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

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

# View Payment Method Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 216.172px;"><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 payment method</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`name`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The name of the payment method</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`driver`</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The driver for the payment method</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">`available`</td><td style="height: 46.5938px;">boolean</td><td style="height: 46.5938px;">Whether the payment method is available for use</td></tr></tbody></table>

## Example Request

```
GET /api/payment-methods/{id}
```

## Example Response

```json
{
    "id": 1,
    "name": "Cash",
    "driver": "cash",
    "available": true
}
```

# Shipping Methods

# Shipping Method Index Endpoint

## Structure

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

## Example Request

```
GET /api/shipping-methods?per_page=2
```

## Example Response

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

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

# View Shipping Method Endpoint

## Structure

### Shipping Method

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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><tr><td>`available`</td><td>boolean</td><td>Whether the shipping method is available for use</td></tr><tr><td>`rates`</td><td>array</td><td>An array of [Rate](https://support.aerocommerce.com/books/api/page/view-shipping-method-endpoint#bkmrk-rate) objects</td></tr></tbody></table>

### Rate

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 rate</td></tr><tr><td>`currency`</td><td>string</td><td>ISO currency code of the shipping rate (e.g., GBP)</td></tr><tr><td>`min_price`</td><td>float</td><td>Minimum cart total price for this rate to apply</td></tr><tr><td>`max_price`</td><td>float</td><td>Maximum cart total price for this rate to apply (nullable = no limit)</td></tr><tr><td>`min_weight`</td><td>float</td><td>Minimum total weight for this rate to apply</td></tr><tr><td>`max_weight`</td><td>float</td><td>Maximum total weight for this rate to apply (nullable = no limit)</td></tr><tr><td>`min_volume`</td><td>float</td><td>Minimum total volume for this rate to apply</td></tr><tr><td>`max_volume`</td><td>float</td><td>Maximum total volume for this rate to apply (nullable = no limit)</td></tr><tr><td>`price`</td><td>float</td><td>The cost of shipping, expressed in the specified currency’s smallest units</td></tr></tbody></table>

## Example Request

```
GET /api/shipping-methods/{id}
```

## Example Response

```json
{
    "id": 2,
    "name": "Standard",
    "available": true,
    "rates": [
        {
            "id": 2,
            "currency": "GBP",
            "min_price": 1000,
            "max_price": null,
            "min_weight": 0,
            "max_weight": null,
            "min_volume": 0,
            "max_volume": null,
            "price": 12300
        }
    ]
}
```

# Locations

# Location Index Endpoint

## Structure

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

## Example Request

```
GET /api/locations?per_page=2
```

## Example Response

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

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

# View Location Endpoint

## Structure

### Location

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 for the location</td></tr><tr><td>`name`</td><td>string</td><td>The name of the location</td></tr><tr><td>`email`</td><td>string</td><td>The email of the location</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the location</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the location</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the location</td></tr><tr><td>`city`</td><td>string</td><td>The city for the location</td></tr><tr><td>`county`</td><td>string</td><td>The county for the location</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the location, required for some countries (e.g., US, AU, etc)</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the location, required for some countries (e.g., GB, US, etc)</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the location</td></tr><tr><td>`latitude`</td><td>float</td><td>The latitude for the location</td></tr><tr><td>`longitude`</td><td>float</td><td>The longitude for the location</td></tr><tr><td>`opening_hours`</td><td>object</td><td>See [Opening Hours](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-opening-hours)</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-additional-attribute) objects</td></tr></tbody></table>

### Opening Hours

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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>`sunday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`monday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`tuesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`wednesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`thursday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`friday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`saturday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr><tr><td>`overrides`</td><td>object</td><td>See [Overrides](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-overrides)</td></tr></tbody></table>

### Time

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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>`start`</td><td>time</td><td>The start of the time range</td></tr><tr><td>`end`</td><td>time</td><td>The end of the time range</td></tr></tbody></table>

### Overrides

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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>`date`</td><td>date</td><td>The date the override is for</td></tr><tr><td>`label`</td><td>string</td><td>The label for the override</td></tr><tr><td>`times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/view-location-endpoint#bkmrk-time) objects</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 Request

```
GET /api/locations/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Aero Commerce",
    "email": null,
    "phone": null,
    "latitude": null,
    "longitude": null,
    "line_1": "28-32 Albert Rd",
    "line_2": null,
    "city": "Middlesbrough",
    "county": null,
    "zone": null,
    "postcode": "TS1 1QD",
    "country": "GB",
    "opening_hours": {
        "sunday": {
            "times": []
        },
        "monday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "tuesday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "wednesday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "thursday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "friday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "saturday": {
            "times": []
        },
        "overrides": [
            {
                "date": "2025-12-25",
                "label": "Christmas Day",
                "times": []
            },
            {
                "date": "2025-08-25",
                "label": "Bank Holiday",
                "times": []
            }
        ]
    },
    "additional_attributes": []
}
```

# Create Location Endpoint

## Structure

### Location

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the location</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the location</td><td>Yes</td></tr><tr><td>`email`</td><td>string</td><td>The email of the location</td><td>No</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the location</td><td>No</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the location</td><td>Yes</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the location</td><td>No</td></tr><tr><td>`city`</td><td>string</td><td>The city for the location</td><td>Yes</td></tr><tr><td>`county`</td><td>string</td><td>The county for the location</td><td>No</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the location, required for some countries (e.g., US, AU, etc)</td><td>Conditional</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the location, required for some countries (e.g., GB, US, etc)</td><td>Conditional</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the location</td><td>Yes</td></tr><tr><td>`latitude`</td><td>float</td><td>The latitude for the location</td><td>No</td></tr><tr><td>`longitude`</td><td>float</td><td>The longitude for the location</td><td>No</td></tr><tr><td>`opening_hours`</td><td>object</td><td>See [Opening Hours](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-opening-hours)</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr></tbody></table>

### Opening Hours

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`sunday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`monday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`tuesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`wednesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`thursday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`friday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`saturday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`overrides`</td><td>object</td><td>See [Overrides](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-overrides)</td><td>No</td></tr></tbody></table>

### Time

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`start`</td><td>time</td><td>The start of the time range</td><td>Yes</td></tr><tr><td>`end`</td><td>time</td><td>The end of the time range</td><td>Yes</td></tr></tbody></table>

### Overrides

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`date`</td><td>date</td><td>The date the override is for</td><td>Yes</td></tr><tr><td>`label`</td><td>string</td><td>The label for the override</td><td>No</td></tr><tr><td>`times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/create-location-endpoint#bkmrk-time) objects</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/locations/
```

```json
{
    "name": "Aero Commerce",
    "line_1": "28-32 Albert Rd",
    "city": "Middlesbrough",
    "postcode": "TS1 1QD",
    "country": "GB",
    "opening_hours": {
        "monday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "tuesday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "wednesday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "thursday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "friday": {
            "times": [
                {
                    "start": "07:00",
                    "end": "12:00"
                },
                {
                    "start": "12:30",
                    "end": "15:00"
                }
            ]
        },
        "overrides": [
            {
                "date": "2025-12-25",
                "label": "Christmas Day"
            },
            {
                "date": "2025-08-25",
                "label": "Bank Holiday"
            }
        ]
    }
}
```

## Example Response

```json
{
    "location": {
        "id": 1
    }
}
```

# Update Location Endpoint

## Structure

### Location

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the location</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the location</td><td>No</td></tr><tr><td>`email`</td><td>string</td><td>The email of the location</td><td>No</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the location</td><td>No</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the location</td><td>No</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the location</td><td>No</td></tr><tr><td>`city`</td><td>string</td><td>The city for the location</td><td>No</td></tr><tr><td>`county`</td><td>string</td><td>The county for the location</td><td>No</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the location, required for some countries (e.g., US, AU, etc)</td><td>No</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the location, required for some countries (e.g., GB, US, etc)</td><td>No</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the location</td><td>No</td></tr><tr><td>`latitude`</td><td>float</td><td>The latitude for the location</td><td>No</td></tr><tr><td>`longitude`</td><td>float</td><td>The longitude for the location</td><td>No</td></tr><tr><td>`opening_hours`</td><td>object</td><td>See [Opening Hours](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-opening-hours)</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr></tbody></table>

### Opening Hours

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`sunday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`monday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`tuesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`wednesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`thursday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`friday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`saturday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`overrides`</td><td>object</td><td>See [Overrides](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-overrides)</td><td>No</td></tr></tbody></table>

### Time

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`start`</td><td>time</td><td>The start of the time range</td><td>Yes</td></tr><tr><td>`end`</td><td>time</td><td>The end of the time range</td><td>Yes</td></tr></tbody></table>

### Overrides

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`date`</td><td>date</td><td>The date the override is for</td><td>Yes</td></tr><tr><td>`label`</td><td>string</td><td>The label for the override</td><td>No</td></tr><tr><td>`times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr></tbody></table>

### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

## Example Request

```
PUT /api/locations/{id|name}
```

```json
{
    "opening_hours": {
        "monday": {
            "times": [
                {
                    "start": "09:00",
                    "end": "12:30"
                },
                {
                    "start": "13:00",
                    "end": "17:00"
                }
            ]
        },
        "overrides": [
            {
                "date": "2025-12-26",
                "label": "Boxing Day",
                "times": []
            }
        ]
    },
}
```

## Example Response

```json
{
    "location": {
        "id": 1
    }
}
```

# Flags

# Flag Index Endpoint

## Structure

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

## Example Request

```
GET /api/flags?per_page=2
```

## Example Response

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

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

# View Flag Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 flag</td></tr><tr><td>`name`</td><td>string</td><td>The **unique** name for the flag</td></tr><tr><td>`color`</td><td>hexcode</td><td>The colour of the flag (format ##RRGGBB)</td></tr><tr><td>`created_at`</td><td>timestamp</td><td>The date the flag was created</td></tr></tbody></table>

## Example Request

```
GET /api/flags/{id|name}
```

## Example Response

```json
{
    "id": 1,
    "name": "Flag",
    "color": "#7f3434",
    "created_at": "2025-06-30T08:14:27.000000Z"
}
```

# Create Flag Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the flag</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the flag</td><td>Yes</td></tr><tr><td>`color`</td><td>hexcode</td><td>The color of the flag (format ##RRGGBB)</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/flags/
```

```json
{
    "name": "API Flag",
    "color": "#000000",
}
```

## Example Response

```json
{
    "flag": {
        "id": 1
    }
}
```

# Update Flag Endpoint

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the flag</td><td>No</td></tr><tr><td>`color`</td><td>hexcode</td><td>The color of the flag (format ##RRGGBB)</td><td>No</td></tr></tbody></table>

## Example Request

```
PUT /api/flags/{id|name}
```

```json
{
    "name": "API Flag Updated",
    "color": "#A1B2C3",
}
```

## Example Response

```json
{
    "flag": {
        "id": 1
    }
}
```

# Delete Flag Endpoint

## Example Request

```
DELETE /api/flags/{id|name}
```

## Example Response

```
204 No Content
```

# Price Lists

# Price List Index Endpoint

## Structure

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

## Example Request

```
GET /api/price-lists?per_page=2
```

## Example Response

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

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

# View Price List Endpoint

## Structure

### Price List

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 price list</td></tr><tr><td>`name`</td><td>string</td><td>The name of the price list</td></tr><tr><td>`applies_to`</td><td>string</td><td>The applies to of the price list (e.g., everyone, not-customers, customers, groups)</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at of the price list</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at of the price list</td></tr><tr><td>`entries`</td><td>array</td><td>An array of [Entry](https://support.aerocommerce.com/books/api/page/view-price-list-endpoint#bkmrk-entry) objects</td></tr><tr><td>`customer_groups`</td><td>array</td><td>An array of [Customer Group](https://support.aerocommerce.com/books/api/page/view-price-list-endpoint#bkmrk-customer-group) objects</td></tr></tbody></table>

### Entry

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 price list entry</td></tr><tr><td>`for`</td><td>string</td><td>What the entry applies to (e.g., all\_products, all\_products\_unless\_reduced, product, variant, category, tag, manufacturer)</td></tr><tr><td>`target`</td><td>string</td><td>Identifier of the target (if applicable) — e.g. product id, variant id, category id, etc...</td></tr><tr><td>`type`</td><td>string</td><td>Type of price adjustment (e.g., fixed\_price, fixed\_price\_decrease, fixed\_price\_increase, percentage\_decrease, percentage\_increase)</td></tr><tr><td>`price`</td><td>object</td><td>The [Price](https://support.aerocommerce.com/books/api/page/view-price-list-endpoint#bkmrk-price) object (only present when `type` is *fixed* based)</td></tr><tr><td>`percentage`</td><td>float</td><td>Percentage value (only present when `type` is *percentage* based)</td></tr><tr><td>`for_price`</td><td>string</td><td>Which price the entry affects (e.g., sale\_price, base\_price, rrp, cost\_price)</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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>`amount`</td><td>float</td><td>The price **including tax**, in whole units (e.g., `10` = `£10`)</td></tr><tr><td>`currency`</td><td>string</td><td>The currency for the price (e.g., GBP)</td></tr></tbody></table>

### Customer Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 customer group</td></tr><tr><td>`name`</td><td>string</td><td>The name of the customer group</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at for the customer group</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at for the customer group</td></tr></tbody></table>

## Example Request

```
GET /api/price-lists/{id}
```

## Example Response

```json
{
  "id": 1,
  "name": "API Test",
  "applies_to": "everyone",
  "start_at": null,
  "end_at": null,
  "entries": [
    {
      "id": 1,
      "for": "all_products",
      "target": null,
      "type": "fixed_price",
      "price": {
        "amount": 10,
        "currency": "GBP"
      },
      "for_price": "base_price"
    },
    {
      "id": 2,
      "for": "all_products_unless_reduced",
      "target": null,
      "type": "fixed_price_decrease",
      "price": {
        "amount": 10,
        "currency": "GBP"
      },
      "for_price": "base_price"
    },
    {
      "id": 3,
      "for": "product",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "id": 4,
      "for": "variant",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "id": 5,
      "for": "category",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "id": 6,
      "for": "tag",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "id": 7,
      "for": "manufacturer",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    }
  ],
  "customer_groups": []
}
```

# Create Price List

## Structure

### Price List

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the price list</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the price list</td><td>Yes</td></tr><tr><td>`applies_to`</td><td>string</td><td>The applies to of the price list (everyone, not-customers, customers, groups)</td><td>Yes</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at of the price list</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at of the price list</td><td>No</td></tr><tr><td>`entries`</td><td>array</td><td>An array of [Entry](https://support.aerocommerce.com/books/api/page/create-price-list#bkmrk-entry) objects</td><td>No</td></tr><tr><td>`customer_groups`</td><td>array</td><td>An array of [Customer Group](https://support.aerocommerce.com/books/api/page/create-price-list#bkmrk-customer-group) objects (only required when `applies_to` = "groups")</td><td>No</td></tr></tbody></table>

### Entry

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the entry</td><td>No</td></tr><tr><td>`for`</td><td>string</td><td>What the entry applies to (e.g., all\_products, all\_products\_unless\_reduced, product, variant, category, tag, manufacturer)</td><td>Yes</td></tr><tr><td>`target`</td><td>string</td><td>Identifier of the target (e.g., id corresponding to the `for` or model for product, or sku for variant or name for category/tag/manufacturer)</td><td>Conditional</td></tr><tr><td>`type`</td><td>string</td><td>Type of the price adjustment (e.g., fixed\_price, fixed\_price\_decrease, fixed\_price\_increase, percentage\_decrease, percentage\_increase)</td><td>Yes</td></tr><tr><td>`price`</td><td>object</td><td>The [Price](https://support.aerocommerce.com/books/api/page/create-price-list#bkmrk-price) object (not required when `type` is *percentage* based)</td><td>Conditional</td></tr><tr><td>`percentage`</td><td>float</td><td>The percentage of the price list entry (only required when `type` is *percentage* based)</td><td>Conditional</td></tr><tr><td>`for_price`</td><td>string</td><td>Which price the entry affects (e.g., sale\_price, base\_price, rrp, cost\_price)</td><td>Yes</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The price **including tax**, in whole units (e.g., `10` = `£10`)</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>The currency for the price (e.g., GBP)</td><td>Yes</td></tr></tbody></table>

### Customer Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the customer group</td><td>Yes</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at for the customer group</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at for the customer group</td><td>No</td></tr></tbody></table>

## Example Request

```
POST /api/price-lists
```

```json
{
  "id": 1,
  "name": "API Test",
  "applies_to": "everyone",
  "entries": [
    {
      "for": "all_products",
      "type": "fixed_price",
      "price": {
        "amount": 10,
        "currency": "GBP"
      },
      "for_price": "base_price"
    },
    {
      "for": "all_products_unless_reduced",
      "type": "fixed_price_decrease",
      "price": {
        "amount": 10,
        "currency": "GBP"
      },
      "for_price": "base_price"
    },
    {
      "for": "product",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "for": "variant",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "for": "category",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "for": "tag",
      "target": 1, 
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    },
    {
      "for": "manufacturer",
      "target": 1,
      "type": "percentage_decrease",
      "percentage": 10,
      "for_price": "sale_price"
    }
  ],
  "customer_groups": []
}
```

## Example Response

```json
{
    "priceList": {
        "id": 1
    }
}
```

# Update Price List

## Structure

### Price List

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the price list</td><td>No</td></tr><tr><td>`applies_to`</td><td>string</td><td>The applies to of the price list (everyone, not-customers, customers, groups)</td><td>No</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at of the price list</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at of the price list</td><td>No</td></tr><tr><td>`customer_groups`</td><td>array</td><td>An array of [Customer Group](https://support.aerocommerce.com/books/api/page/update-price-list/update-price-list#bkmrk-customer-group) objects (only required when `applies_to` = "groups")</td><td>No</td></tr></tbody></table>

### Customer Group

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the customer group</td><td>Yes</td></tr><tr><td>`start_at`</td><td>timestamp</td><td>The start at for the customer group</td><td>No</td></tr><tr><td>`end_at`</td><td>timestamp</td><td>The end at for the customer group</td><td>No</td></tr></tbody></table>

## Example Request

```
PUT /api/price-lists/{id}
```

```json
{
    "name": "API Test Updated",
    "applies_to": "customers"
}
```

## Example Response

```json
{
    "priceList": {
        "id": 1
    }
}
```

# Price List Entries

# Create Price List Entry Endpoint

## Structure

### Price List Entry

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the entry</td><td>No</td></tr><tr><td>`for`</td><td>string</td><td>What the entry applies to (e.g., all\_products, all\_products\_unless\_reduced, product, variant, category, tag, manufacturer)</td><td>Yes</td></tr><tr><td>`target`</td><td>string</td><td>Identifier of the target (e.g., id corresponding to the `for` or model for product, or sku for variant or name for category/tag/manufacturer)</td><td>Conditional</td></tr><tr><td>`type`</td><td>string</td><td>Type of the price adjustment (e.g., fixed\_price, fixed\_price\_decrease, fixed\_price\_increase, percentage\_decrease, percentage\_increase)</td><td>Yes</td></tr><tr><td>`price`</td><td>object</td><td>The [Price](https://support.aerocommerce.com/books/api/page/create-price-list-entry-endpoint#bkmrk-price) object (not required when `type` is *percentage* based)</td><td>Conditional</td></tr><tr><td>`percentage`</td><td>float</td><td>The percentage of the price list entry (only required when `type` is *percentage* based)</td><td>Conditional</td></tr><tr><td>`for_price`</td><td>string</td><td>Which price the entry affects (e.g., sale\_price, base\_price, rrp, cost\_price)</td><td>Yes</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The price **including tax**, in whole units (e.g. pounds not pence)</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>The currency for the price, e.g. GBP</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/price-lists/{id}/entries
```

```json
{
    "for": "variant",
    "target": "sku",
    "type": "percentage_decrease",
    "percentage": 20,
    "for_price": "base_price"
}
```

## Example Response

```json
{
    "priceListEntry": {
        "id": 1
    }
}
```

# Update Price List Entry Endpoint

## Structure

### Price List Entry

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the entry</td><td>No</td></tr><tr><td>`for`</td><td>string</td><td>What the entry applies to (e.g., all\_products, all\_products\_unless\_reduced, product, variant, category, tag, manufacturer)</td><td>No</td></tr><tr><td>`target`</td><td>string</td><td>Identifier of the target (e.g., id corresponding to the `for` or model for product, or sku for variant or name for category/tag/manufacturer)</td><td>No</td></tr><tr><td>`type`</td><td>string</td><td>Type of the price adjustment (e.g., fixed\_price, fixed\_price\_decrease, fixed\_price\_increase, percentage\_decrease, percentage\_increase)</td><td>No</td></tr><tr><td>`price`</td><td>object</td><td>The [Price](https://support.aerocommerce.com/books/api/page/create-price-list-entry-endpoint#bkmrk-price) object (not when `type` is *percentage* based)</td><td>No</td></tr><tr><td>`percentage`</td><td>float</td><td>The percentage of the price list entry (only when `type` is *percentage* based)</td><td>No</td></tr><tr><td>`for_price`</td><td>string</td><td>Which price the entry affects (e.g., sale\_price, base\_price, rrp, cost\_price)</td><td>No</td></tr></tbody></table>

### Price

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`amount`</td><td>float</td><td>The price **including tax**, in whole units (e.g. pounds not pence)</td><td>Yes</td></tr><tr><td>`currency`</td><td>string</td><td>The currency for the price, e.g. GBP</td><td>Yes</td></tr></tbody></table>

## Example Request

```
PUT /api/price-lists/{id}/entries/{id}
```

```json
{
    "for": "product",
    "target": "model",
    "type": "percentage_decrease",
    "percentage": 20
}
```

## Example Response

```json
{
    "priceListEntry": {
        "id": 1
    }
}
```

# Specification Groups

# Specification Group Index Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/specifications` is installed.</p>

## Structure

See [View Specification Group](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint) for the structure of the specification group payloads inside the `data` array.

## Example Request

```
GET /api/specification-groups?per_page=2
```

## Example Response

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

<p class="callout info">See [View Specification Group](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint) for the structure of the specification group payloads inside the `data` array.</p>

# View Specification Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/specifications` is installed.</p>

## Structure

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name for the specification group</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the specification group</td><td>`>=1.0.0`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint#bkmrk-field) objects</td><td>`>=0.1.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint#bkmrk-media) objects</td><td>`>=0.3.2`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>`>=1.0.0`</td></tr></tbody></table>

### Field

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the field</td><td>`>=0.1.0`</td></tr><tr><td>`presets`</td><td>array</td><td>An array of strings to use as preset options</td><td>`>=0.1.0`</td></tr><tr><td>`default`</td><td>string</td><td>The default value for the field, note: `_p:0` means the first preset</td><td>`>=0.1.0`</td></tr><tr><td>`prefix`</td><td>string</td><td>The prefix for the field</td><td>`>=0.1.0`</td></tr><tr><td>`suffix`</td><td>string</td><td>The suffix for the field</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the field</td><td>`>=1.0.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint#bkmrk-media) objects</td><td>`>=1.0.0`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/view-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>`>=1.0.0`</td></tr></tbody></table>

### Media

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><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 media</td></tr><tr><td>`slug`</td><td>string</td><td>The slug of the media</td></tr><tr><td>`disk`</td><td>string</td><td>The disk used to store the media</td></tr><tr><td>`path`</td><td>string</td><td>The path of the media on the disk</td></tr><tr><td>`title`</td><td>string</td><td>The title of the media</td></tr><tr><td>`type`</td><td>string</td><td>The mimetype of the media</td></tr><tr><td>`extension`</td><td>string</td><td>The file extension of the media</td></tr><tr><td>`size`</td><td>int</td><td>The file size of the media in bytes</td></tr><tr><td>`meta`</td><td>object</td><td>The meta data of the media</td></tr><tr><td>`source`</td><td>string</td><td>The source file name of the media</td></tr><tr><td>`is_protected`</td><td>bool</td><td>Whether the media is protected</td></tr></tbody></table>

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
GET /api/specification-groups/{id}
```

## Example Response

```json
{
    "id": 1,
    "name": "API Test",
    "fields": [
        {
            "name": "Field 1",
            "presets": ["A", "B", "C"],
            "default": "D",
            "prefix": "prefix",
            "suffix": "suffix",
            "media": [],
            "settings": {
                "test": {
                    "test": 123
                }
            }
        }
    ],
    "media": [],
    "settings": {
        "test": {
            "test": 456
        }
    }
}
```

# Create Specification Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/specifications` is installed.</p>

## Structure

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name for the specification group</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the specification group</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/create-specification-group-endpoint#bkmrk-field) objects</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/create-specification-group-endpoint#bkmrk-media) objects</td><td>No</td><td>`>=0.3.2`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/create-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td><td>`>=1.0.0`</td></tr></tbody></table>

### Field

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the field</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`presets`</td><td>array</td><td>An array of strings to use as preset options</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`default`</td><td>string</td><td>The default value for the field, note: \_p:0 means the first preset</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`prefix`</td><td>string</td><td>The prefix for the field</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`suffix`</td><td>string</td><td>The suffix for the field</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the field</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/create-specification-group-endpoint#bkmrk-media) objects</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/create-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td><td>`>=1.0.0`</td></tr></tbody></table>

### Media

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
POST /api/specification-groups/
```

```json
{
    "name": "API Test",
    "fields": [
        {
            "name": "Field 1",
            "presets": ["A", "B", "C"],
            "default": "D",
            "prefix": "prefix",
            "suffix": "suffix",
            "media": [
                {
                    "id": 1
                }
            ],
            "settings": {
                "test": {
                    "test": "123"
                }
            }
        }
    ],
    "media": [
        {
            "id": 1
        }
    ],
    "settings": {
        "test": {
            "test": "456"
        }
    }
}
```

## Example Response

```json
{
    "specificationGroup": {
        "id": 1
    }
}
```

# Update Specification Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/specifications` is installed.</p>

## Structure

### Specification Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the specification group</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name for the specification group</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the specification group</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`fields`</td><td>array</td><td>An array of [Field](https://support.aerocommerce.com/books/api/page/update-specification-group-endpoint/update-specification-group-endpoint#bkmrk-field) objects</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-specification-group-endpoint/update-specification-group-endpoint#bkmrk-media) objects</td><td>No</td><td>`>=0.3.2`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-specification-group-endpoint/update-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td><td>`>=1.0.0`</td></tr></tbody></table>

### Field

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`name`</td><td>string</td><td>The name of the field</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`presets`</td><td>array</td><td>An array of strings to use as preset options</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`default`</td><td>string</td><td>The default value for the field, note: \_p:0 means the first preset</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`prefix`</td><td>string</td><td>The prefix for the field</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`suffix`</td><td>string</td><td>The suffix for the field</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`sort`</td><td>int</td><td>The sort for the field</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`media`</td><td>array</td><td>An array of [Media](https://support.aerocommerce.com/books/api/page/update-specification-group-endpoint/update-specification-group-endpoint#bkmrk-media) objects</td><td>No</td><td>`>=1.0.0`</td></tr><tr><td>`settings`</td><td>object</td><td>A [Settings](https://support.aerocommerce.com/books/api/page/update-specification-group-endpoint/update-specification-group-endpoint#bkmrk-settings) object with grouped key-value pairs</td><td>No</td><td>`>=1.0.0`</td></tr></tbody></table>

### Media

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the media</td><td>`*`</td></tr><tr><td>`source`</td><td>string</td><td>The source of the media, e.g. test.png</td><td>`*`</td></tr></tbody></table>

`*` At least one must be present.

### Settings

Settings are grouped as key-value pairs.

- Use "\_" for ungrouped settings.
- Each group contains its own object of key-value pairs.

```json
{
    "settings": {
        "_": {
            "no_group": "value"
        },
        "group": {
            "key": "value"
        }
    }
}
```

## Example Request

```
PUT /api/specification-groups/{id}
```

```json
{
    "name": "API Test",
    "fields": [
        {
            "id": 1,
            "name": "Field 1 Updated",
            "presets": ["D", "E", "F"],
            "default": "G"
        }
    ]
}
```

## Example Response

```json
{
    "specificationGroup": {
        "id": 1
    }
}
```

# Upsell Groups

# Upsell Group Index Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/upsells` is installed.</p>

## Structure

See [<span class="s1">View Upsell Group Endpoint</span>](https://support.aerocommerce.com/books/api/page/view-upsell-group-endpoint) for the structure of the upsell group payload inside the `data` array.

## Example Request

```
GET /api/upsell-groups?per_page=2
```

## Example Response

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

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

# View Upsell Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/upsells` is installed.</p>

## Structure

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the upsell group</td></tr><tr><td>`name`</td><td>string</td><td>The name for the upsell group</td></tr></tbody></table>

## Example Request

```
GET /api/upsell-groups/{key}
```

## Example Response

```json
{
    "key": "api-test",
    "name": "API Test"
}
```

# Create Upsell Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/upsells` is installed.</p>

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>int</td><td>The key of the upsell group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name for the upsell group</td><td>Yes</td></tr></tbody></table>

## Example Request

```
POST /api/upsell-groups/
```

```json
{
    "key": "api-test",
    "name": "API Test",
}
```

## Example Response

```json
{
    "upsellGroup": {
        "key": "api-test"
    }
}
```

# Update Upsell Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/upsells` is installed.</p>

## Structure

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>int</td><td>The key of the upsell group</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name for the upsell group</td><td>No</td></tr></tbody></table>

## Example Request

```
PUT /api/upsell-groups/{key}
```

```json
{
    "name": "API Test Updated",
}
```

## Example Response

```json
{
    "upsellGroup": {
        "key": "api-test"
    }
}
```

# Listing Collection Groups

# Listing Collection Group Index

<p class="callout warning">This endpoint is only available if `aerocargo/listing-collections` is installed.</p>

## Structure

See [<span class="s1">View Listing Collection Group Endpoint</span>](https://support.aerocommerce.com/books/api/page/view-listing-collection-group-endpoint) for the structure of the listing collection group payload inside the data array.

## Example Request

```
GET /api/listing-collection-groups?per_page=2
```

## Example Response

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

# View Listing Collection Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/listing-collections` is installed.</p>

## Structure

### Listing Collection Group

<table border="1" id="bkmrk-name-type-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>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the listing collection group</td></tr><tr><td>`name`</td><td>string</td><td>The name for the listing collection group</td></tr><tr><td>`listings`</td><td>array</td><td>An array of [Listing](https://support.aerocommerce.com/books/api/page/view-listing-collection-group-endpoint#bkmrk-listing) objects</td></tr></tbody></table>

### Listing

<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 listing</td></tr><tr><td>`product_id`</td><td>int</td><td>The id of the product linked to the listing</td></tr><tr><td>`sort`</td><td>int</td><td>The sort of the listing within the group</td></tr></tbody></table>

## Example Request

```
GET /api/listing-collection-groups/{key}
```

## Example Response

```json
{
    "key": "api",
    "name": "API Test",
    "listings": [
        {
            "id": 1,
            "product_id": 1
        }
    ]
}
```

# Create Listing Collection Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/listing-collections` is installed.</p>

## Structure

### Listing Collection Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the listing collection group</td><td>Yes</td></tr><tr><td>`name`</td><td>string</td><td>The name for the listing collection group</td><td>Yes</td></tr><tr><td>`listings`</td><td>array</td><td>An array of [Listing](https://support.aerocommerce.com/books/api/page/create-listing-collection-group-endpoint#bkmrk-listing) objects</td><td> No</td></tr></tbody></table>

### Listing

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the listing</td><td>Conditional `*`</td></tr><tr><td>`variant_id`</td><td>int</td><td>The id of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`sku`</td><td>string</td><td>The SKU of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`product_id`</td><td>int</td><td>The id of the product (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`model`</td><td>string</td><td>The model of the product (of the listing)</td><td>Conditional `*`</td></tr></tbody></table>

`*` At least one must be present, resolved in the order they are listed top-down.

## Example Request

```
POST /api/listing-collection-groups/
```

```json
{
    "key": "api",
    "name": "API Test",
    "listings": [
        {
          "id": 1
        }
    ]
}
```

## Example Response

```json
{
    "listingCollectionGroup": {
        "key": "api"
    }
}
```

# Update Listing Collection Group Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/listing-collections` is installed.</p>

## Structure

### Listing Collection Group

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the listing collection group</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name for the listing collection group</td><td>No</td></tr><tr><td>`listings`</td><td>array</td><td>An array of [Listing](https://support.aerocommerce.com/books/api/page/update-listing-collection-group-endpoint/update-listing-collection-group-endpoint#bkmrk-listing) objects</td><td> No</td></tr></tbody></table>

### Listing

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the listing</td><td>Conditional `*`</td></tr><tr><td>`variant_id`</td><td>int</td><td>The id of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`sku`</td><td>string</td><td>The SKU of the variant (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`product_id`</td><td>int</td><td>The id of the product (of the listing)</td><td>Conditional `*`</td></tr><tr><td>`model`</td><td>string</td><td>The model of the product (of the listing)</td><td>Conditional `*`</td></tr></tbody></table>

`*` At least one must be present, resolved in the order they are listed top-down.

## Example Request

```
PUT /api/listing-collection-groups/{key}
```

```json
{
    "name": "API Test Updated",
    "listings": [
        {
            "id": 2
        }
    ]
}
```

## Example Response

```json
{
    "listingCollectionGroup": {
        "key": "api"
    }
}
```

# Stock

# Update Stock Endpoint

## Structure

<table border="1" id="bkmrk-name-type-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><col style="width: 0.0009311%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>  
</td></tr><tr><td>`*.sku`</td><td>string</td><td>The SKU of the variant</td><td>Yes</td></tr><tr><td>`*.stock_level`</td><td>int</td><td>The new stock\_level of the variant</td><td>Yes</td></tr><tr><td>`*.stock_action`</td><td>string</td><td>The stock action (e.g., set, add, remove &amp; multiply). Defaults to set</td><td>No</td></tr></tbody></table>

## Example Request

```
POST /api/stock
```

## Example Response

```json
[
    {
        "sku": "ABC123",
        "stock_level": 23
    },
    {
        "sku": "DEF456",
        "stock_level": 3,
        "stock_action": "add"
    },
    {
        "sku": "GHI789",
        "stock_level": 1,
        "stock_action": "remove"
    },
    {
        "sku": "JKL101",
        "stock_level": 2,
        "stock_action": "multiply"
    }
]
```

# Size Guides

# Size Guide Index Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/size-guides` is installed.</p>

## Structure

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

## Example Request

```
GET /api/size-guides?per_page=2
```

## Example Response

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

# View Size Guide Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/size-guides` is installed.</p>

## Structure

### Size Guide  


<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</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 size guide</td><td style="height: 29.7969px;">`>=0.1.0`</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`type`  
</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The type of the size guide</td><td style="height: 29.7969px;">`>=2.0.0`  
</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 for the size guide</td><td style="height: 29.7969px;">`>=0.1.0`</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">`heading`  
</td><td style="height: 29.7969px;">string</td><td style="height: 29.7969px;">The heading of the size guide</td><td style="height: 29.7969px;">`>=0.1.0`</td></tr><tr style="height: 28.7969px;"><td style="height: 28.7969px;">`view`  
</td><td style="height: 28.7969px;">string</td><td style="height: 28.7969px;">The view of the size guide</td><td style="height: 28.7969px;">`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide</td><td>`>=2.0.0`  
</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`small_image`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The Small [Image](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-image)</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`medium_image`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The Medium [Image](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-image)</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`large_image`</td><td style="height: 35.3984px;">object</td><td style="height: 35.3984px;">The Large [Image](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-image)</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`products`  
</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Product](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-product) objects</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 52.1953px;"><td style="height: 52.1953px;">`manufacturers`  
</td><td style="height: 52.1953px;">array</td><td style="height: 52.1953px;">An array of [Manufacturer](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-manufacturer) objects</td><td style="height: 52.1953px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`categories`  
</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Category](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-category) objects</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`tags`  
</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Tag](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-tag) objects</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr><tr style="height: 35.3984px;"><td style="height: 35.3984px;">`groups`  
</td><td style="height: 35.3984px;">array</td><td style="height: 35.3984px;">An array of [Group](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-group) objects</td><td style="height: 35.3984px;">`>=0.1.0`</td></tr></tbody></table>

### Group

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide group</td><td>`>=0.1.0`</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>`>=0.1.0`</td></tr><tr><td>`sections`  
</td><td>array</td><td>An array of [Section](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-section) objects</td><td>`>=0.1.0`</td></tr></tbody></table>

### Section

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide section</td><td>`>=0.1.0`</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide section</td><td>`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide section</td><td>`>=0.1.0`</td></tr></tbody></table>

### Product

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the product</td><td>`>=0.1.0`</td></tr><tr><td>`model`  
</td><td>string</td><td>The model of the product</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the product</td><td>`>=0.1.0`</td></tr></tbody></table>

### Manufacturer

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the manufacturer</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the manufacturer</td><td>`>=0.1.0`</td></tr></tbody></table>

### Category

<table border="1" id="bkmrk-name-type-descriptio-5" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the category</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the category</td><td>`>=0.1.0`</td></tr><tr><td>`breadcrumb`  
</td><td>string</td><td>The breadcrumb for the category</td><td>`>=0.1.0`</td></tr></tbody></table>

### Tag

<table border="1" id="bkmrk-name-type-descriptio-6" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the tag</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag (e.g., Small or Red)</td><td>`>=0.1.0`</td></tr><tr><td>`group`</td><td>object</td><td>The tag group, see [Tag Group](https://support.aerocommerce.com/books/api/page/view-size-guide-endpoint#bkmrk-tag-group)</td><td>`>=0.1.0`</td></tr></tbody></table>

### Tag Group

<table border="1" id="bkmrk-name-type-descriptio-7" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the tag group</td><td>`>=0.1.0`</td></tr><tr><td>`name`</td><td>string</td><td>The name of the tag group (e.g., Size or Colour)</td><td>`>=0.1.0`</td></tr></tbody></table>


### Image

<table border="1" id="bkmrk-name-type-descriptio-8" style="border-collapse: collapse; width: 100%; height: 477.765px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></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><td style="height: 29.7969px;">**Version**  
</td></tr><tr><td>`url`</td><td>string</td><td>The url of the image</td><td>`>=0.1.0`</td></tr></tbody></table>


## Example Request

```
GET /api/size-guides/{id}
```

## Example Response

<details id="bkmrk-example---version-1."><summary>Example - Version 1.x</summary>

```json
{
    "id": 1,
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "small_image": {
        "url": null
    },
    "medium_image": {
        "url": null
    },
    "large_image": {
        "url": null
    },
    "products": [],
    "manufacturers": [
        {
            "id": 1,
            "name": "Burberry"
        }
    ],
    "categories": [
        {
            "id": 1,
            "name": "Coats",
            "breadcrumb": "Mens » Coats"
        }
    ],
    "tags": [
        {
            "id": 1,
            "name": "Blue",
            "group": {
                "id": 1,
                "name": "Colour"
            }
        }
    ],
    "groups": [
        {
            "id": 1,
            "heading": "Group Heading",
            "sections": [
                {
                    "id": 1,
                    "heading": "Section Heading",
                    "content": "Section Content"
                }
            ]
        }
    ]
}
```

</details><details id="bkmrk-example---version-2."><summary>Example - Version 2.x</summary>

```json
{
    "id": 1,
    "type": "rich_text",
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "content": "Section Content",
    "small_image": {
        "url": null
    },
    "medium_image": {
        "url": null
    },
    "large_image": {
        "url": null
    },
    "products": [],
    "manufacturers": [
        {
            "id": 1,
            "name": "Burberry"
        }
    ],
    "categories": [
        {
            "id": 1,
            "name": "Coats",
            "breadcrumb": "Mens » Coats"
        }
    ],
    "tags": [
        {
            "id": 1,
            "name": "Blue",
            "group": {
                "id": 1,
                "name": "Colour"
            }
        }
    ],
    "groups": []
}
```

</details>

# Create Size Guide Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/size-guides` is installed.</p>

## Structure

### Size Guide

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide</td><td>No</td><td>`>=0.1.0`  
</td></tr><tr><td>`type`  
</td><td>string</td><td>The type of the size guide</td><td>No</td><td>`>=2.0.0`  
</td></tr><tr><td>`name`</td><td>string</td><td>The name for the size guide</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`view`  
</td><td>string</td><td>The view of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide</td><td>If `type` is `rich_text`</td><td>`>=2.0.0`</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`products`  
</td><td>array</td><td>An array of product ids or models</td><td>Conditional `*`</td><td>`>=0.1.0`</td></tr><tr><td>`manufacturers`  
</td><td>array</td><td>An array of manufacturer ids or names</td><td>Conditional `*`</td><td>`>=0.1.0`</td></tr><tr><td>`categories`  
</td><td>array</td><td>An array of category ids or breadcrumbs</td><td>Conditional `*`</td><td>`>=0.1.0`</td></tr><tr><td>`tags`  
</td><td>array</td><td>An array of tag ids or names</td><td>Conditional `*`</td><td>`>=0.1.0`</td></tr><tr><td>`groups`  
</td><td>array</td><td>An array of [Group](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-group) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

**Valid Types:** `image`, `rich_text` &amp; `legacy` (resolved from payload structure if not provided).

`*` Either `products` is required or `manufacturers` and/or `categories` and/or `tags` are.

### Group

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide group</td><td>No</td><td>`>=0.1.0`  
</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`sections`  
</td><td>array</td><td>An array of [Section](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-section) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

### Section

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide section</td><td>No</td><td>`>=0.1.0`  
</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide section</td><td>Yes</td><td>`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide section</td><td>Yes</td><td>`>=0.1.0`</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td><td>`>=0.1.0`  
</td></tr></tbody></table>


## Example Request

<details id="bkmrk-example---version-1."><summary>Example - Version 1.x</summary>

```
POST /api/size-guides/
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ],
    "groups": [
        {
            "heading": "Group Heading",
            "sections": [
                {
                    "heading": "Section Heading",
                    "content": "Section Content"
                }
            ]
        }
    ]
}
```

</details><details id="bkmrk-example---version-2."><summary>Example - Version 2.x</summary>

```
POST /api/size-guides/
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "content": "Section Content",
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ]
}
```

<p class="callout info">Because `content` is present, the type is automatically resolved as `rich_text`.</p>

</details>## Example Response

```json
{
    "sizeGuide": {
        "id": 1
    }
}
```

# Update Size Guide Endpoint

<p class="callout warning">This endpoint is only available if `aerocargo/size-guides` is installed.</p>

## Structure

### Size Guide

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`type`  
</td><td>string</td><td>The type of the size guide</td><td>No</td><td>`>=2.0.0`  
</td></tr><tr><td>`name`</td><td>string</td><td>The name for the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`view`  
</td><td>string</td><td>The view of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`content`  
</td><td>string</td><td>The content of the size guide</td><td>No</td><td>`>=2.0.0`</td></tr><tr><td>`small_image`</td><td>object</td><td>The Small [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`medium_image`</td><td>object</td><td>The Medium [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`large_image`</td><td>object</td><td>The Large [Image](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-image)</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`products`  
</td><td>array</td><td>An array of product ids or models</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`manufacturers`  
</td><td>array</td><td>An array of manufacturer ids or names</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`categories`  
</td><td>array</td><td>An array of category ids or breadcrumbs</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`tags`  
</td><td>array</td><td>An array of tag ids or names</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`groups`  
</td><td>array</td><td>An array of [Group](https://support.aerocommerce.com/books/api/page/create-size-guide-endpoint#bkmrk-group) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

**Valid Types:** `image`, `rich_text` &amp; `legacy` (resolved from payload structure if not provided).

### Group

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id of the size guide group</td><td>No</td><td>`>=0.1.0`  
</td></tr><tr><td>`heading`  
</td><td>string</td><td>The heading of the size guide</td><td>No</td><td>`>=0.1.0`</td></tr><tr><td>`sections`  
</td><td>array</td><td>An array of [Section](https://support.aerocommerce.com/books/api/page/update-size-guide-endpoint#bkmrk-section) objects</td><td>No</td><td>`>=0.1.0`</td></tr></tbody></table>

### Section

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td style="height: 46.5938px;">`id`</td><td style="height: 46.5938px;">int</td><td style="height: 46.5938px;">The id of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`  
</td></tr><tr><td style="height: 46.5938px;">`heading`  
</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The heading of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`</td></tr><tr><td style="height: 46.5938px;">`content`  
</td><td style="height: 46.5938px;">string</td><td style="height: 46.5938px;">The content of the size guide section</td><td style="height: 46.5938px;">No</td><td>`>=0.1.0`</td></tr></tbody></table>

### Image

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col><col style="width: 20.0238%;"></col></colgroup><tbody><tr><td>**Name**  
</td><td>**Type**  
</td><td>**Description**  
</td><td>**Required**  
</td><td>**Version**  
</td></tr><tr><td>`src`</td><td>string</td><td>The source url of the image</td><td>Yes</td><td>`>=0.1.0`  
</td></tr></tbody></table>


## Example Request

<details id="bkmrk-example---version-1."><summary>Example - Version 1.x</summary>

```
PUT /api/size-guides/{id}
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ],
    "groups": [
        {
            "heading": "Group Heading",
            "sections": [
                {
                    "heading": "Section Heading",
                    "content": "Section Content"
                }
            ]
        }
    ]
}
```

</details><details id="bkmrk-example---version-2."><summary>Example - Version 2.x</summary>

```
PUT /api/size-guides/{id}
```

```json
{
    "name": "API Test",
    "heading": "Test",
    "view": "test",
    "content": "Section Content"
    "products": [],
    "manufacturers": [
        "Burberry"
    ],
    "categories": [
        "Mens > Coats"
    ],
    "tags": [
        "Blue"
    ]
}
```

</details>## Example Response

```json
{
    "sizeGuide": {
        "id": 1
    }
}
```