https://api.clakta.com/v1/ordersRecord a new order for a project. The owning project is resolved from the `projectId` field in the request body. Orders count towards your team's monthly order limit.
The required fields are `projectId`, `orderId`, `paymentMethod`, `status`, `totalPrice`, `products`, and `name`, `email` and `ip` on `customer`. Everything else — `platform`, the remaining personal fields and the whole `tracking` object — is optional, so send what your storefront actually captured. An order with no `tracking` is recorded as unattributed, and one with no `platform` is stored and returned with `platform: null`.
Projects using the `privacy_friendly` tracking mode must omit every personal field from `customer` and send only `ip` and `userAgent` — the order is then attached to an anonymous visitor derived from a server-computed daily session hash.
Send `totalPrice` and each product `price` as a decimal in the order currency (`10.4` for $10.40). Clakta stores and returns them in the smallest unit of that currency, so `10.4` USD comes back as `1040`, while a zero-decimal currency such as JPY is kept whole — `1040` in, `1040` out.
Send your API key as a bearer token in the Authorization header.
See Authentication for how to create and scope an API key.
projectIdThe project ID (e.g. proj_xxx) or slug that owns the order
orderIdThe order ID in your system
platformThe platform (e.g. shopify, woocommerce, etc.). Optional — an order sent without it is recorded with no platform
paymentMethodThe payment method
Allowed values:credit_carddebit_cardpixboletopaypalapple_paygoogle_paysamsung_paystripe_linkother
statusThe status
Allowed values:paidpendingrejectedrefundedcanceled
currencyThe currency in ISO 4217 format (e.g. USD, BRL, etc.) - defaults to the project currency if not provided
totalPriceThe total order price in floating point number (e.g. 10.4 for $10.40). Send the amount as a person would read it — Clakta stores it in the smallest unit of the order currency, so zero-decimal currencies such as JPY are kept whole (1040 stays 1040, not 104000)
productstrackingdefault: {}The attribution parameters captured on your storefront. Every parameter is optional — an order sent without them is recorded as unattributed
createdAtThe order created at, defaults to the current date
approvedDateThe order approved date
refundedAtThe order refunded at
customerThe customer. Every field is optional: send `id` or `email` to attach the order to a known customer, or omit both and it is attached to an anonymous visitor resolved from the browser session
The created order
messageA confirmation message.
data