API

General

General

What are the available endpoints?

Orders

Method Endpoint Permission Description
GET /api/orders orders.index List orders
GET /api/orders/{id} orders.view Get an order
POST /api/orders orders.store Create an order
POST /api/orders/{id}/flags/{id} orders.flags.store Attach a flag
DELETE /api/orders/{id}/flags/{id} orders.flags.delete Remove a flag
POST /api/orders/{id}/comments orders.comments.store Add a comment

You can pass the order reference in place of id.

You can pass the flag name in place of the id.

Fulfillments

Method Endpoint Permission Description
POST /api/orders/{id}/fulfillments fulfillments.store Create a fulfillment
DELETE /api/orders/{id}/fulfillments/{id} fulfillments.delete Cancel a fulfillment

You can pass the order reference in place of id.

You can pass the fulfillment reference in place of id.

Order Statuses

Method Endpoint Permission Description
GET /api/order-statuses order-statuses.index List order statuses
GET /api/order-statuses/{id} order-statuses.view Get an order status

Products

Method Endpoint Permission Description
GET /api/products products.index List products
GET /api/products/search products.search Search products
GET /api/products/{id} products.view Get a product
POST /api/products products.store Create a product
PUT /api/products/{id} products.update Update a product

You can pass the product model in place of id.

The search route allows for filtering at document level rather than eloquent level.

Variants

Method Endpoint Permission Description
POST /api/products/{id}/variants variants.store Create a variant
PUT /api/products/{id}/variants/{id} variants.update Update a variant

You can pass the product model in place of id.

You can pass the variant sku in place of id.

Manufacturers

Method Endpoint Permission Description
GET /api/manufacturers manufacturers.index List manufacturers
GET /api/manufacturers/{id} manufacturers.view Get a manufacturer
POST /api/manufacturers manufacturers.store Create a manufacturer
PUT /api/manufacturers/{id} manufacturers.update Update a manufacturer
DELETE /api/manufacturers/{id} manufacturers.delete Delete a manufacturer

You can pass the manufacturer name in place of id.

Attribute Groups

Method Endpoint Permission Description
GET /api/attribute-groups attribute-groups.index List attribute groups
GET /api/attribute-groups/{id} attribute-groups.view Get an attribute group
POST /api/attribute-groups attribute-groups.store Create an attribute group
PUT /api/attribute-groups/{id} attribute-groups.update Update an attribute group
DELETE /api/attribute-groups/{id} attribute-groups.delete Delete an attribute group

You can pass the attribute group name in place of id.

Attributes

Method Endpoint Permission Description
POST /api/attribute-groups/{id}/attributes attributes.store Create an attribute
PUT /api/attribute-groups/{id}/attributes/{id} attributes.update Update an attribute
DELETE /api/attribute-groups/{id}/attributes/{id} attributes.delete Delete an attribute

You can pass the attribute group name in place of id.

You can pass the attribute name in place of id.

Categories

Method Endpoint Permission Description
GET /api/categories categories.index List categories
GET /api/categories/{id} categories.view Get a category
POST /api/categories categories.store Create a category
PUT /api/categories/{id} categories.update Update a category
DELETE /api/categories/{id} categories.delete Delete a category

You can pass the category name or breadcrumb in place of id.

Tag Groups

Method Endpoint Permission Description
GET /api/tag-groups tag-groups.index List tag groups
GET /api/tag-groups/{id} tag-groups.view Get a tag group
POST /api/tag-groups tag-groups.store Create a tag group
PUT /api/tag-groups/{id} tag-groups.update Update a tag group
DELETE /api/tag-groups/{id} tag-groups.delete Delete a tag group

You can pass the tag group name in place of id.

Tags

Method Endpoint Permission Description
POST /api/tag-groups/{id}/tags tags.store Create a tag
PUT /api/tag-groups/{id}/tags/{id} tags.update Update a tag
DELETE /api/tag-groups/{id}/tags/{id} tags.delete Delete a tag

You can pass the tag group name in place of id.

You can pass the tag name in place of id.

Collections

Method Endpoint Permission Description
GET /api/collections collections.index List collections
GET /api/collections/{id} collections.view Get a collection
POST /api/collections collections.store Create a collection
PUT /api/collections/{id} collections.update Update a collection
DELETE /api/collections/{id} collections.delete Delete a collection

You can pass the collection name in place of id.

Customers

Method Endpoint Permission Description
GET /api/customers customers.index List customers
GET /api/customers/{id} customers.view Get a customer
POST /api/customers customers.store Create a customer
PUT /api/customers/{id} customers.update Update a customer

Addresses

Method Endpoint Permission Description
POST /api/customers/{id}/addresses addresses.store Create an address
PUT /api/customers/{id}/addresses/{id} addresses.update Update an address
DELETE /api/customers/{id}/addresses/{id} addresses.delete Delete an address

Payment Methods

Method Endpoint Permission Description
GET /api/payment-methods payment-methods.index List payment methods
GET /api/payment-methods/{id} payment-methods.view Get a payment method

Shipping Methods

Method Endpoint Permission Description
GET /api/shipping-methods shipping-methods.index List shipping methods
GET /api/shipping-methods/{id} shipping-methods.view Get a shipping method

Locations

Method Endpoint Permission Description
GET /api/locations locations.index List locations
GET /api/locations/{id} locations.view Get a location
POST /api/locations locations.store Create a location
PUT /api/locations/{id} locations.update Update a location

You can pass the location name in place of id.

Flags

Method Endpoint Permission Description
GET /api/flags flags.index List flags
GET /api/flags/{id} flags.view Get a flag
POST /api/flags flags.store Create a flag
PUT /api/flags/{id} flags.update Update a flag
DELETE /api/flags/{id} flags.delete Delete a flag

You can pass the flag name in place of id.

Price Lists

Method Endpoint Permission Description
GET /api/price-lists price-lists.index List price lists
GET /api/price-lists/{id} price-lists.view Get a price list
POST /api/price-lists price-lists.store Create a price list
PUT /api/price-lists/{id} price-lists.update Update a price list

Price List Entries

Method Endpoint Permission Description
POST /api/price-lists/{id}/entries price-list-entries.store Create a price list entry
PUT /api/price-lists/{id}/entries/{id} price-list-entries.update Update a price list entry

Specification Groups

Method Endpoint Permission Description
GET /api/specification-groups specification-groups.index List specification groups
GET /api/specification-groups/{id} specification-groups.view Get a specification group
POST /api/specification-groups specification-groups.store Create a specification group
PUT /api/specification-groups/{id} specification-groups.update Update a specification group

Must have installed aerocargo/specifications for these endpoints to work.

Upsell Groups

Method Endpoint Permission Description
GET /api/upsell-groups upsell-groups.index List upsell groups
GET /api/upsell-groups/{key} upsell-groups.view Get an upsell group
POST /api/upsell-groups upsell-groups.store Create an upsell group
PUT /api/upsell-groups/{key} upsell-groups.update Update an upsell group

Must have installed aerocargo/upsells for these endpoints to work.

Listing Collection Groups

Method Endpoint Permission Description
GET /api/listing-collection-groups listing-collection-groups.index List listing collection groups
GET /api/listing-collection-groups/{key} listing-collection-groups.view Get a listing collection group
POST /api/listing-collection-groups listing-collection-groups.store Create a listing collection group
PUT /api/listing-collection-groups/{key} listing-collection-groups.update Update a listing collection group

Must have installed aerocargo/listing-collections for these endpoints to work.

Stock

Method Endpoint Permission Description
POST /api/stock stock.update Bulk update variant stock
General

What conventions does the API use?

Attribute Conventions

Relationship Conventions

Price Conventions

Date Conventions

Pagination Conventions

Parameter
Description
Example
page The page number (default: 1) ?page=2
per_page The number of results per page (default: 24, max: 96) ?per_page=48
ids Comma-separated list of IDs to fetch ?ids=1,2,5
min_updated_at The min updated at for a product ?min_updated_at=2023-08-30%2010:35:05
max_updated_at The max updated at for a product ?max_updated_at=2023-08-30%2010:35:05

The min_updated_at and max_updated_at parameters are only supported by index endpoints.

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

Image Factory Conventions

Parameter
Description
Example
image_factory_width Output image width ?image_factory_width=200
image_factory_height Output image height ?image_factory_height=200
image_factory_options Comma-seperated options ?image_factory_options=flip,greyscale

If any of these query parameters are present in the GET requests, Image Factory will be applied.

General

What responses does the API return?

Code
Scenario
200 Success The request was processed successfully.
201 Created
One (or multiple) resources were created.
400 Bad Request 
Cannot process request due to client error.
401 Unauthorised
Invalid bearer token provided.
404 Not Found
Endpoint not found.
422 Unprocessable Content
Payload failed validation.
500 Internal Server Error

Examples

200 Success
GET /api/orders/{id}
{
    "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
{
    "order": {
        "id": 15
    }
}
400 Bad Request
GET /api/orders/{id}
{
    "message": "Missing order ID"
}
401 Unauthorised
GET /api/orders/{id}
{
    "message": "Unauthorized: Bearer token missing."
}
404 Not Found
GET /api/orders/{id}
{
    "message": "The requested order with ID {id} could not be found."
}
422 Unprocessable Content
POST /api/orders
{
    "message": "The given data was invalid.",
    "errors": {
        "currency": ["The currency field is required."]
    }
}
500 Internal Server Error
{
    "message": "Exception message..."
}

 

 

Orders

Orders

Order Index Endpoint

This endpoint retrieves a paginated list of all orders

Structure

See Order View Endpoint for the structure of the order payload inside the data array.


Scopes

Name
Description
Example
visible Only return visible orders (those which have been ordered) ?scope=visible
outstanding Only return outstanding orders ?scope=outstanding
completed Only return completed orders ?scope=completed
incomplete Only return incomplete orders ?scope=incomplete
express Only return express orders ?scope=express
standard Only return standard orders ?scope=standard

Filters

Name
Description
Example
reference Only return orders with specific references ?references=ABC123,DEF456
statuses Only return orders with specific status ids or names ?statuses=1,On Hold
states Only return orders with specific states ?states=dispatched,returned
customers Only return orders with specific customers (by id or email) ?customers=1,test@gmail.com
emails Only return orders for specific emails ?emails=test@gmail.com
channels Only return orders for specific channels ?channels=web,api
flags Only return orders for specific flags (by id, name, or name|value) ?flags=1,abc,def|123

GET /api/orders?per_page=2&min_ordered_at=2023-08-30%2010:36:23
{
    "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
}

See Order View Endpoint for the structure of the order payload inside the data array.

Orders

Order View Endpoint

This endpoint retrieves a single order by id or reference.

Structure

Order
Name
Type
Description
reference string The unique reference for the order
status object The Order Status of the order (null if none)
customer object The Customer of the order (null if none)
email string The email of the customer that placed the order
subtotal.amount float The subtotal of the order excluding tax
subtotal.tax float The subtotal tax for the order
shipping.amount float The shipping of the order excluding tax
shipping.tax float The shipping tax for the order
discount.amount float The discount of the order excluding tax
discount.tax float The discount tax for the order
surcharge.amount float The surcharge of the order excluding tax
surcharge.tax float The surcharge tax for the order
currency string The currency code of the order
shipping_method object The Shipping Method of the order (null if none)
shipping_address object The Shipping Address of the order (null if none)
billing_address object The Billing Address of the order (null if none)
ordered_at timestamp When the order was ordered
deliver_on timestamp When the order should be delivered
items array An array of Order Item objects
payments array An array of Payment objects
fulfillments array An array of Fulfillment objects
returns array An array of Return objects
comments array An array of Comment objects
additional_attributes array An array of Additional Attribute objects
Order Status
Name
Type
Description
id int The id of the order status
name string The name of the order status
state string The state of the order status

Valid states: cancelled, on_hold, successful, complete, processing, closed, partially_dispatched, dispatched, partially_returned, returned

Customer
Name
Type
Description
id int The id of the customer
name string The name of the customer
email string The email of the customer
Shipping Method
Name
Type
Description
id int The id of the shipping method
name string The name of the shipping method
Shipping Address
Name
Type
Description
first_name string The first name for the shipping address
last_name string The last name for the shipping address
company string The company for the shipping address
mobile string The mobile number for the shipping address
phone string The phone number for the shipping address
line_1 string The first line for the shipping address
line_2 string The second line for the shipping address
city string The city for the shipping address
county string The county for the shipping address
zone string The zone code for the shipping address
postcode string The postcode for the shipping address
country string The country code for the shipping address
reference string The unique reference for the shipping address
eori_number string The EORI number for the shipping address
Billing Address
Name
Type
Description
first_name string The first name for the billing address
last_name string The last name for the billing address
company string The company for the billing address
mobile string The mobile number for the billing address
phone string The phone number for the billing address
line_1 string The first line for the billing address
line_2 string The second line for the billing address
city string The city for the billing address
county string The county for the billing address
zone string The zone code for the billing address
postcode string The postcode for the billing address
country string The country code for the billing address
reference string The unique reference for the billing address
eori_number string The EORI number for the billing address
Order Item
Name
Type
Description
id int The id of the order item
variant_id int The variant id of the buyable (not set if the buyable is not a variant)
product_id int The product id of the buyable
buyable_type string The buyable type of the order item
buyable_id int The buyable id of the order item
name string The name for the order item
url string The url for the order item
sku string The sku for the order item
reference string The unique reference for the order item
manufacturer object The Manufacturer for the order item (null if none)
image.url string The image url for the order item
shippable boolean Whether the order item is shippable
quantity int The quantity for the order item
returned_quantity int The quantity returned for the order item
price.amount float The unit price of the order item excluding tax
price.tax float The unit tax for the order item
discount.amount float The total discount of the order item excluding tax
discount.tax float The total discount tax for the order item
full_price.amount float The unit full price (including extras) of the order item excluding tax
full_price.tax float The unit full tax (including extras) for the order item
cost_price.amount float The unit cost price of the order item excluding tax
cost_price.currency string The currency code for the cost price
weight float The weight for the order item
weight_unit float The weight unit for the order item, defaults to stores normalized
weight unit
volume float The volume for the order item
volume_unit float The volume unit for the order item, defaults to stores normalized
volume unit
hs string The HS code for the order item
origin_country string The origin country code for the order item
goods_description string The goods description for the order item
Manufacturer
Name
Type
Description
id int The id of the manufacturer
name string The name of the manufacturer
Payment
Name
Type
Description
id int The id of the payment
method object The Payment Method for the payment
reference string The reference for the payment
state string The state of the payment
amount float The total amount for the payment
currency string The currency code for the payment
captured_at timestamp The date the payment was captured
Payment Method
Name
Type
Description
id int The id of the payment method
name string The name of the payment method
driver string The driver of the payment method
Fulfillment
Name
Type
Description
id int The id of the order return
method object The Fulfillment Method for the fulfillment
reference string The reference of the fulfillment
state string The state of the fulfillment
mobile string The mobile number for the fulfillment
phone string The phone number for the fulfillment
tracking_code string The tracking code for the fulfillment
tracking_url string The tracking url for the fulfillment
weight float The weight for the fulfillment
weight_unit string The weight unit for the fulfillment, defaults to stores normalized
weight unit
volume float The volume for the order item
volume_unit string The volume unit for the fulfillment, defaults to stores normalized
volume unit
delivery_note string The delivery note for the fulfillment
created_at timestamp The date the fulfillment was made
items array An array of Fulfillment Items objects
Fulfillment Method
Name
Type
Description
id int The id of the fulfillment method
name string The name of the fulfillment method
driver string The driver of the fulfillment method
Fulfillment Items
Name
Type
Description
id int The id of the order item that was fulfilled
quantity int The quantity of the order item that was fulfilled
Return
Name
Type
Description
id int The id of the order return
reason string The reason for the return - null if no reason given
created_at timestamp The date the return was made
items array An array of Return Item objects
Return Item
Name
Type
Description
id int The id of the order item that was returned
quantity int The quantity of the order item that was returned
exchanged_for_id int The id of the order item that the item was returned for (null if the item was not exchanged)
Comment
Name
Type
Description
admin object The Admin who commented
message string The comment message
customer_facing boolean Whether the comment is customer facing
created_at timestamp The date the comment was created
Admin
Name
Type
Description
id int The id of the admin
name string The name of the admin
email string The email of the admin
Additional Attribute
Name
Type
Description
key string The key of the additional attribute
value string The value of the additional attribute

Example Requests

Unfulfilled & Unreturned Order
GET /api/orders/{id|reference}
{
    "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"
        }
    ]
}
Fulfilled Order
GET /api/orders/{id|reference}
{
    "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": []
}
Returned Order (Exchange)
GET /api/orders/{id|reference}
{
    "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": []
}
Returned Order (Refund)
GET /api/orders/{id|reference}
{
    "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": []
}