> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/developer-tools/site-api/ecommerce.md).

# eCommerce

## Orders

## GET /ecommerce/orders

> Retrieve an overview list of all eCommerce orders from your website

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/orders":{"get":{"tags":["eCommerce - Orders"],"summary":"Retrieve an overview list of all eCommerce orders from your website","parameters":[{"name":"per_page","in":"query","description":"Number of items to retrieve, maximum of 500","schema":{"type":"integer"}},{"name":"sort_type","in":"query","description":"Field by which to sort the results","schema":{"type":"string"}},{"name":"sort_order","in":"query","description":"Order of results","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","description":"Page to retrieve number, to be used with per_page","schema":{"type":"integer"}},{"name":"exclude","in":"query","description":"Comma-separated parts to leave out of each order, for smaller responses: ordered_products (the Ordered Products field), properties (the raw properties object; its fields are still at the top level of each order). Ignored by System Files versions before it was added.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## GET /ecommerce/orders/{id}

> Retrieve all data about an individual eCommerce order

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/orders/{id}":{"get":{"tags":["eCommerce - Orders"],"summary":"Retrieve all data about an individual eCommerce order","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the eCommerce order","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"404":{"description":"Not Found - eCommerce order does not exist"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## GET /ecommerce/orders/user/{userID}

> Retrieve all eCommerce order data about an individual CRM user

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/orders/user/{userID}":{"get":{"tags":["eCommerce - Orders"],"summary":"Retrieve all eCommerce order data about an individual CRM user","parameters":[{"name":"userID","in":"path","required":true,"description":"The ID of the user","schema":{"type":"string"}},{"name":"exclude","in":"query","description":"Comma-separated parts to leave out of each order, for smaller responses: ordered_products (the Ordered Products field), properties (the raw properties object; its fields are still at the top level of each order). Ignored by System Files versions before it was added.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## Products

## GET /ecommerce/products

> Retrieve all products

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/products":{"get":{"tags":["eCommerce - Products"],"summary":"Retrieve all products","parameters":[{"name":"per_page","in":"query","description":"Number of items to retrieve, maximum of 500","schema":{"type":"integer"}},{"name":"sort_type","in":"query","description":"Field by which to sort the results","schema":{"type":"string"}},{"name":"sort_order","in":"query","description":"Order of results","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","description":"Page to retrieve number, to be used with per_page","schema":{"type":"integer"}},{"name":"exclude","in":"query","description":"Comma-separated parts to leave out of each product, for smaller and faster responses: attributes (the product's attributes and their options - not looked up at all), properties (the raw properties object; its fields are still at the top level of each product). Ignored by System Files versions before it was added.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## GET /ecommerce/products/{id}

> Retrieve all data about an individual product

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/products/{id}":{"get":{"tags":["eCommerce - Products"],"summary":"Retrieve all data about an individual product","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the Product","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"404":{"description":"Not Found - Product does not exist"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## PUT /ecommerce/products/{id}

> Update a Product

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/products/{id}":{"put":{"tags":["eCommerce - Products"],"summary":"Update a Product","parameters":[{"name":"id","in":"path","required":true,"description":"The Product Item ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Your Products custom fields as a JSON object. When updating Attributes and Attribute Options, if you do not provide an ID then a new item will be made. Providing a valid ID will update the existing item. For more information on Product Database structure, please see <a href=\"https://developers.siteglide.com/database-structure\" target=\"_blank\" rel=\"noopener nofollow\">this document</a>","content":{"application/json":{"schema":{"type":"object","required":["name","enabled"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"enabled":{"type":"string"},"weighting":{"type":"string"},"expiry_date":{"type":"string"},"release_date":{"type":"string"},"category_array":{"type":"array","items":{"type":"object"}},"secure_zone_array":{"type":"array","items":{"type":"object"}},"module_field_14/product_1":{"type":"string"},"module_field_14/product_2":{"type":"string"},"module_field_14/product_3":{"type":"string"},"module_field_14/product_4":{"type":"string"},"module_field_14/product_5":{"type":"string"},"module_field_14/product/inventory/1":{"type":"string"},"module_field_14/product/inventory/2":{"type":"string"},"module_field_14/product/inventory/3":{"type":"string"},"module_field_14/product/price/aud/1":{"type":"string"},"module_field_14/product/price/aud/2":{"type":"string"},"module_field_14/product/price/cad/1":{"type":"string"},"module_field_14/product/price/cad/2":{"type":"string"},"module_field_14/product/price/eur/1":{"type":"string"},"module_field_14/product/price/eur/2":{"type":"string"},"module_field_14/product/price/gbp/1":{"type":"string"},"module_field_14/product/price/gbp/2":{"type":"string"},"module_field_14/product/price/nzd/1":{"type":"string"},"module_field_14/product/price/nzd/2":{"type":"string"},"module_field_14/product/price/usd/1":{"type":"string"},"module_field_14/product/price/usd/2":{"type":"string"},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"string"},"module_field_14/product_attribute_option_2":{"type":"string"},"module_field_14/product_attribute_option_3":{"type":"string"},"module_field_14/product_attribute_option_4":{"type":"string"},"module_field_14/product_attribute_option_6":{"type":"string"},"module_field_14/product_attribute_option/price/aud/1":{"type":"string"},"module_field_14/product_attribute_option/price/aud/2":{"type":"string"},"module_field_14/product_attribute_option/price/cad/1":{"type":"string"},"module_field_14/product_attribute_option/price/cad/2":{"type":"string"},"module_field_14/product_attribute_option/price/eur/1":{"type":"string"},"module_field_14/product_attribute_option/price/eur/2":{"type":"string"},"module_field_14/product_attribute_option/price/gbp/1":{"type":"string"},"module_field_14/product_attribute_option/price/gbp/2":{"type":"string"},"module_field_14/product_attribute_option/price/nzd/1":{"type":"string"},"module_field_14/product_attribute_option/price/nzd/2":{"type":"string"},"module_field_14/product_attribute_option/price/usd/1":{"type":"string"},"module_field_14/product_attribute_option/price/usd/2":{"type":"string"},"module_field_14/product_attribute_option/inventory/1":{"type":"string"}}}}}}}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request - The API could not understand the request due to invalid syntax."},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## POST /ecommerce/products/create

> Create a Product

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/ecommerce/products/create":{"post":{"tags":["eCommerce - Products"],"summary":"Create a Product","requestBody":{"required":true,"description":"Your Products custom fields as a JSON object. For more information on Product Database structure, please see <a href=\"https://developers.siteglide.com/database-structure\" target=\"_blank\" rel=\"noopener nofollow\">this document</a>","content":{"application/json":{"schema":{"type":"object","required":["name","enabled"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"enabled":{"type":"string"},"weighting":{"type":"string"},"expiry_date":{"type":"string"},"release_date":{"type":"string"},"category_array":{"type":"array","items":{"type":"object"}},"secure_zone_array":{"type":"array","items":{"type":"object"}},"module_field_14/product_1":{"type":"string"},"module_field_14/product_2":{"type":"string"},"module_field_14/product_3":{"type":"string"},"module_field_14/product_4":{"type":"string"},"module_field_14/product_5":{"type":"string"},"module_field_14/product/inventory/1":{"type":"string"},"module_field_14/product/inventory/2":{"type":"string"},"module_field_14/product/inventory/3":{"type":"string"},"module_field_14/product/price/aud/1":{"type":"string"},"module_field_14/product/price/aud/2":{"type":"string"},"module_field_14/product/price/aud/3":{"type":"string"},"module_field_14/product/price/aud/4":{"type":"string"},"module_field_14/product/price/cad/1":{"type":"string"},"module_field_14/product/price/cad/2":{"type":"string"},"module_field_14/product/price/cad/3":{"type":"string"},"module_field_14/product/price/cad/4":{"type":"string"},"module_field_14/product/price/eur/1":{"type":"string"},"module_field_14/product/price/eur/2":{"type":"string"},"module_field_14/product/price/eur/3":{"type":"string"},"module_field_14/product/price/eur/4":{"type":"string"},"module_field_14/product/price/gbp/1":{"type":"string"},"module_field_14/product/price/gbp/2":{"type":"string"},"module_field_14/product/price/gbp/3":{"type":"string"},"module_field_14/product/price/gbp/4":{"type":"string"},"module_field_14/product/price/nzd/1":{"type":"string"},"module_field_14/product/price/nzd/2":{"type":"string"},"module_field_14/product/price/nzd/3":{"type":"string"},"module_field_14/product/price/nzd/4":{"type":"string"},"module_field_14/product/price/usd/1":{"type":"string"},"module_field_14/product/price/usd/2":{"type":"string"},"module_field_14/product/price/usd/3":{"type":"string"},"module_field_14/product/price/usd/4":{"type":"string"},"attributes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"string"},"module_field_14/product_attribute_option_2":{"type":"string"},"module_field_14/product_attribute_option_3":{"type":"string"},"module_field_14/product_attribute_option_4":{"type":"string"},"module_field_14/product_attribute_option_6":{"type":"string"},"module_field_14/product_attribute_option/price/aud/1":{"type":"string"},"module_field_14/product_attribute_option/price/aud/2":{"type":"string"},"module_field_14/product_attribute_option/price/cad/1":{"type":"string"},"module_field_14/product_attribute_option/price/cad/2":{"type":"string"},"module_field_14/product_attribute_option/price/eur/1":{"type":"string"},"module_field_14/product_attribute_option/price/eur/2":{"type":"string"},"module_field_14/product_attribute_option/price/gbp/1":{"type":"string"},"module_field_14/product_attribute_option/price/gbp/2":{"type":"string"},"module_field_14/product_attribute_option/price/nzd/1":{"type":"string"},"module_field_14/product_attribute_option/price/nzd/2":{"type":"string"},"module_field_14/product_attribute_option/price/usd/1":{"type":"string"},"module_field_14/product_attribute_option/price/usd/2":{"type":"string"},"module_field_14/product_attribute_option/inventory/1":{"type":"string"}}}}}}}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request - The API could not understand the request due to invalid syntax."},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```
