> For the complete documentation index, see [llms.txt](https://docs.violet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violet.io/ecom-platforms/spree.md).

# Spree Commerce

Spree Commerce is an open-source Ruby on Rails ecommerce framework with a JSON:API-style REST API. Violet integrates using OAuth2 client credentials.

## Connection

Merchants provide a **Client ID** and **Client Secret** from an OAuth application configured in their Spree store. The OAuth application must be created with the `admin write` scope.

Merchants also provide their **Store URL** — the base URL of their Spree instance.

## Webhooks

Webhooks are registered automatically via the Spree API after a merchant connects. Violet listens for order and product lifecycle events. All Violet-originated orders are tagged with `channel = "Violet"` so that event processing can correctly identify Violet-placed orders.

## API Format

Spree responses follow JSON:API conventions, using `included` arrays for related resources. Violet handles this format transparently.

## Notable Behavior

* **Discounts**: Discount codes are not supported for Violet-submitted orders on Spree. Custom discount amounts are also not supported at this time.
* **Checkout flow**: Spree uses an explicit multi-step checkout flow. Violet manages this flow internally during order submission.
* **Product data**: Spree uses `taxons` for product categorization.

***

> **Looking for Vendo?** [Vendo](/ecom-platforms/vendo.md) is a hosted variant of Spree with a near-identical integration. See the Vendo page for any differences.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.violet.io/ecom-platforms/spree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
