Skip to main content
POST
cURL recipe

Authorizations

Authorization
string
header
required

Authorization: Bearer

Body

application/json
payment_type
enum<string>
required

REQUIRED: exact lowercase cod or card — never normalized, never defaulted. card charges your saved card synchronously for the server-computed total and needs per-key enablement (card_not_enabled) plus a reusable saved card on file (card_not_on_file). See https://mart.ps/api/docs#payments.

Available options:
cod,
card
Example:

"cod"

partner_reference
string
required

Your own order id and the idempotency key, stored and matched byte-for-byte. Letters, digits, dot, underscore, hyphen; max 64 characters; surrounding whitespace is rejected, never trimmed; unique per key. Identity is judged on a canonical form — https://mart.ps/api/docs#idempotency.

Maximum string length: 64
Example:

"100245"

shipping_address
object
required
products
object[]
required

Order is significant: error details reference the line index.

Required array length: 1 - 200 elements
free_shipping
boolean
default:false

true = you absorb the delivery fee (needs your group's permission — free_shipping_not_allowed otherwise; free_shipping_not_covered when your margin cannot cover the fee, exact coverage passing). Rejected with card_free_shipping_not_allowed on card orders. See https://mart.ps/api/docs#orders.

Response

The order would be accepted, and this is what it would cost and earn. Point-in-time verdict — nothing was created or reserved.

status
enum<string>
required
Available options:
success
status_code
integer
required
Example:

200

message
string
required
Example:

"OK"

data
object
required

One key named after the resource (products / product / states / categories / attributes / order / validation).

meta
object | null
required
error
object | null
required