Skip to content

YaMitra API

The API lets your other software (accounting, online shop, warehouse…) read and write your YaMitra data. It is part of the Enterprise plan.

Create a key in YaMitra: Settings → Connections → API.

Authentication

Send the key in the Authorization header. Requests and responses are JSON; field names are snake_case; amounts are decimal strings in euros.

curl https://yamitra.ram0nes.com/api/v1/products?per_page=50 \ -H "Authorization: Bearer ymk_…"

Lists come in pages: { "data": [...], "page": 1, "per_page": 50, "total": 1234 }.

Endpoints

GET/api/v1/products

Products, sorted by SKU.

Query: q (search name, SKU or barcode), updated_since (ISO date-time), page, per_page (max 200)

POST/api/v1/products

Creates or updates up to 500 products by SKU, with the same checks as a spreadsheet import. Plan limits apply to new products.

{ "products": [ { "sku": "TOM-01", "name": "Tomate grappe", "unit": "kg", "price": 2.4, "vat_rate": 0.055, "barcode": "3256540000017" } ] }

GET/api/v1/customers

Customers, sorted by code.

Query: q, page, per_page

GET/api/v1/orders

Orders, newest first.

Query: status (pending, confirmed, prepared, delivered, invoiced, cancelled), since (updated since), page, per_page

GET/api/v1/orders/{id or number}

One order, with its lines.

POST/api/v1/orders

Creates an order for a customer (by code) with products (by SKU). Prices come from the catalogue and the customer's discount. status: "confirmed" (default) or "pending" (to review).

{ "customer_code": "C00012", "delivery_date": "2026-10-07", "customer_reference": "PO-55", "lines": [ { "sku": "TOM-01", "quantity": 12.5 } ] }

GET/api/v1/invoices

Invoices and credit notes, newest first.

Query: since, page, per_page

GET/api/v1/invoices/{id or number}

One invoice, with its lines.

GET/api/v1/stock

Stock per product, and per warehouse (by_warehouse).

Query: page, per_page

Errors

Errors come as { "error": "code", "message": "what to do" } with these statuses:

  • 400invalid_query / invalid_body: a parameter or field is wrong (the message says which).
  • 401unauthorized: missing, unknown or revoked key.
  • 402subscription_inactive: the company's subscription is paused.
  • 403plan: the API needs the Enterprise plan.
  • 404not_found.
  • 409no_database: the company has not connected its database yet.
  • 422customer_not_found, product_not_found, customer_blocked…: the order can't be created as sent.
  • 429too_many_requests: more than 120 calls in a minute with this key.