MobiariDocs
Admin APIOrders

Record a counter sale

POST
/stores/{store_id}/orders/manual

Creates a numbered order with its lines, reserves stock (queuing production for made-to-order lines) and records the payment, in one transaction.

Every method but pix_qr records an in-person payment: the order is paid / captured at once and orders.paid fires. pix_qr creates a real PIX charge through the store's gateway and returns its QR code; the order stays pending until the gateway confirms, and if the charge cannot be created the order is cancelled and its stock released.

Emits the orders.created webhook.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/orders/manual" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "quantity": 0,        "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6"      }    ],    "payment_method": "cash"  }'
{
  "change_cents": 0,
  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  "order_number": "string",
  "pix": null,
  "shipping_cents": 0,
  "total_cents": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}