> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fiftytwo-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fiftytwo-demo.ferndocs.com/_mcp/server.

# About the Register Sale API

The Register Sale API lets external systems such as webshops and self-checkout
solutions import **finished** sales into ViKING POS. Once a sale exists in the estate, a
customer can return the goods in a physical store.

> **Note**
>
> This is for sales already completed and paid for elsewhere. To price a basket
> *before* payment, use [Basket API](/api/basket/overview).

## Endpoints

```
POST /v1/sale                     submit a sale, receive a correlation ID
GET  /v1/sale/{correlationId}     check processing status
```

Base URL: `https://api.fiftytwo.com/register-sale-api`

## Asynchronous by design

Sale processing is asynchronous. Submitting returns a correlation ID
immediately; use it to poll until the sale is `Processed` or `Failed`.

A sale starts as `Pending` and transitions to exactly one terminal state:

| Status      | Meaning                                         |
| ----------- | ----------------------------------------------- |
| `Pending`   | Submitted, not yet processed                    |
| `Processed` | Imported successfully                           |
| `Failed`    | Rejected. A real outcome, not a transport error |

## Authentication

> **Warning**
>
> Register Sale uses an **Auth0-issued** Bearer JWT, not a token from
> `auth.fiftytwo.com` like the other 52 Cloud APIs. Same header format, different
> issuer. Ask your FiftyTwo consultant which tenant issues yours.

## Idempotency

> **Warning**
>
> A timed-out `POST /v1/sale` leaves you unsure whether the sale was accepted.
> Retrying blindly can import it twice, and a duplicate sale means the same goods
> could be returned twice. Persist the correlation ID against your own order ID
> before treating the submission as done.

## Next

#### [Import webshop sales into the POS](/docs/guides/import-sales)

Working code, including safe retries.

#### [Migrating off the Receipt API](/api/transactions/receipt-api)

Register Sale replaces the Receipt API's write path.