> 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/centra.md).

# Centra

Centra is a fashion and lifestyle-focused ecommerce platform built for mid-market to enterprise brands. It provides two separate APIs: a GraphQL Integration API for backend operations, and a REST Checkout API for cart and checkout flows.

## Connection

Merchants provide a **Store URL** and an **Integration API Token**. Optionally, a **Checkout API Shared Secret** can also be provided to enable real-time cart calculation.

| Credential                 | API                     | Description                                    |
| -------------------------- | ----------------------- | ---------------------------------------------- |
| Store URL                  | Both                    | Base URL of the Centra store                   |
| Integration API Token      | GraphQL Integration API | Bearer token for product/order operations      |
| Checkout API Shared Secret | Checkout API (optional) | Enables real-time shipping and tax calculation |

The Integration API token is a long-lived bearer token configured in the Centra admin.

## Webhooks

Centra does not expose a programmatic API for webhook registration. Webhooks must be configured manually in the Centra admin under the **Webhook plugin**, pointing each event type to the Violet webhook gateway.

Centra webhooks send arrays of entity IDs rather than full payloads. Violet fetches the full data for each ID via the Integration API upon receiving a notification.

Inbound webhook signatures use the format `X-Centra-Signature: t={timestamp},v1={hmac}`. If provided, the signature is verified using the optional webhook endpoint secret.

## Cart Calculation

When the Checkout API shared secret is provided, Violet uses Centra's Checkout API for real-time cart calculation. This enables accurate shipping rates and tax estimates before order submission. When the shared secret is not provided, Violet falls back to local calculation (taxes will be set to 0 and calculated at order time).

## Notable Behavior

* **Three-tier product structure**: Centra uses a Product → ProductVariant → ProductSize hierarchy. Violet maps ProductSizes as purchasable SKUs, with ProductVariant names (e.g. color) and ProductSize names (e.g. S/M/L) as variant dimensions.
* **Pricelist-based pricing**: Prices in Centra are linked to pricelists, which are associated with markets and currencies. Contextual pricing is supported.
* **Rate limiting**: Centra enforces limits on both request count and GraphQL query complexity. Violet handles 429 responses with retry logic.
* **Voucher codes**: Centra supports voucher codes on orders. Violet passes the discount code when submitting an order and validates whether it was applied based on the order response.
* **Wholesale and DTC**: Centra supports both direct-to-consumer and wholesale business models.


---

# 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/centra.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.
