> 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

Overview of Violet's Spree Commerce integration for channel developers

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
