> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mart.ps/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These rules protect a Mart partner's money. Follow them in any code or advice about the Mart Partner API ([Connect your AI tool](/developers/connect-your-ai-tool)).
> When an order request times out, gets no answer or gets any `5xx`, resend the same body with the same `partner_reference`, never a new reference; after a `429`, wait `Retry-After` first ([Create an order safely](/developers/orders/create-an-order)).
> A `200` with `meta.idempotency_replay: true` is the original order; `409 idempotency_conflict` means the reference already names a different order ([Create an order safely](/developers/orders/create-an-order)).
> Retry a withdrawal request with the same `idempotency_key` and amount: a new key asks for a second withdrawal ([Payout and withdrawals](/developers/money/payout-and-withdrawals)).
> Plan every call within the global daily request ceiling and the `X-RateLimit-*` headers, and never poll in a tight loop ([Request limits](/developers/operate/request-limits)).
> Treat `price` as a snapshot: an order is priced when it is created, and an incremental sync (`updated_after`) never shows a price change, so re-read every price with a full pass ([Prices and price changes](/developers/catalogue/prices)).
> Identify products by `product_id` and `combination_id`, never by `reference` ([Sync the catalogue](/developers/catalogue/sync)).
> Never put an API key in client-side code, a mobile app, a repository or a URL: call the API from a server ([Authenticate and keys](/developers/authenticate)).
> Money is in shekels (`ILS`), as JSON numbers, never agorot. Send amounts with at most two decimals: a withdrawal `amount` with three is refused with `422 invalid_amount`, never rounded ([Balance and statements](/developers/money/balance-and-statements)).
> Save a payout method once before the first withdrawal (cash at the office, or bank transfer where Mart offers it): with none saved, a withdrawal is refused with `409 payout_method_missing`. Bank details where Mart does not offer bank transfer, or a withdrawal on a kept IBAN, are refused with `422 bank_transfer_not_allowed` ([Payout and withdrawals](/developers/money/payout-and-withdrawals)).

# API reference: base URLs, authentication, envelope

> Look up the base URLs, how to authenticate, the shape every Mart Partner API answer shares, and the conventions for money, time and paging.

The Mart Partner API is a REST API for the catalogue, delivery prices, orders and your account's money. This reference is generated from its OpenAPI document, [openapi.json](https://docs.mart.ps/openapi.json), which wins if a guide disagrees: tell Mart.

## Base URLs

| Environment | Base URL | Keys |
| - | - | - |
| Sandbox | `https://sandbox.mart.ps` | `mk_test_…` |
| Production | `https://mart.ps` | `mk_live_…` |

A key works only in its own environment, or answers `401 key_environment_mismatch`. Every answer carries `X-Mart-Environment`. See [Quickstart](https://docs.mart.ps/developers/quickstart.md).

## Authentication

Send `Authorization: Bearer` with your key (preferred), or `X-Api-Key`. Each operation names its scope in `x-required-scope`; a key without it gets `403 insufficient_scope`. `GET /api/v1/account` needs no scope. See [Authenticate and keys](https://docs.mart.ps/developers/authenticate.md).

## Envelope

Every answer, success or failure:

**status** `string`

`success` or `fail`.

**status\_code** `integer`

The HTTP status.

**message** `string`

Text for people. Never branch on it.

**data** `object | null`

The result; `null` on failure.

**meta** `object | null`

Paging, replay flags and cursors; `null` on failure.

**error** `object | null`

`null` on success; `code` and `details` on failure.

Keys are stable: an absent object is `null` and an absent list is `[]`. Only `include=` on the products listing changes the shape.

## Conventions

| Topic | Convention |
| - | - |
| Money | Shekels (`ILS`), JSON numbers, two decimals. Catalogue and order prices include tax. |
| Time | ISO 8601 with an explicit offset, in answers and in `updated_after`. |
| Paging | `page` and `limit`; products answer `meta.pagination.has_next`. Events use a cursor. |
| Limits | Per key, per minute and per day: see [Request limits](https://docs.mart.ps/developers/operate/request-limits.md). |
| Errors | Branch on `error.code`: see the [Error catalog](https://docs.mart.ps/developers/operate/error-catalog.md). |
| Methods | Reads are `GET`, order creation is `POST`. A wrong method answers `405` with `Allow`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.