https://api.clakta.com/v1/orders/{orderId}Update an existing order. `orderId` is your own order ID (the value sent as `orderId` when the order was created) and the owning project is resolved from the `projectId` field in the request body.
Send only the fields you want to change: `status`, `paymentMethod`, `platform`, `currency`, `totalPrice`, `createdAt`, `approvedDate` and `refundedAt` are all optional, but at least one must be present. `approvedDate` and `refundedAt` are nullable. Send `null` to clear a date that was set before.
Marking an order as `paid` stamps its approved date, and marking it as `refunded` stamps its refund date, each the first time it happens, never overwriting a date that is already set. Sending `approvedDate` or `refundedAt` yourself always takes precedence over that.
`totalPrice` is a decimal in the order currency (`10.4` for $10.40) and is stored in that currency's smallest unit. Because decimal and zero-decimal currencies are stored at different scales, send `totalPrice` together with `currency` whenever you move an order between the two (e.g. USD to JPY).
The order's attribution (its `customer`, `products` and `tracking`) is resolved when the order is created and cannot be changed here.
Envía tu clave de API como bearer token en la cabecera Authorization.
Consulta Autenticación para saber cómo crear una clave de API y definir sus permisos.
orderIdThe order ID in your own system.
projectIdThe project ID (e.g. proj_xxx) or slug that owns the order
statusThe new order status (e.g. refunded)
Valores admitidos:paidpendingrejectedrefundedcanceled
paymentMethodThe new payment method
Valores admitidos:credit_carddebit_cardpixboletopaypalapple_paygoogle_paysamsung_paystripe_linkother
platformThe new platform (e.g. shopify, woocommerce, etc.). Send `null` to clear it
currencyThe new currency in ISO 4217 format (e.g. USD, EUR, BRL, etc.). Send `totalPrice` alongside it when moving between a decimal and a zero-decimal currency (e.g. USD to JPY), since the two are stored at different scales
totalPriceThe new total order price in floating point number (e.g. 10.4 for $10.40), quoted in the order currency after this update is applied
createdAtThe new order date
approvedDateThe new order approved date. Send `null` to clear it. When omitted, moving an order to `paid` stamps this automatically the first time it happens
refundedAtThe new order refunded at. Send `null` to clear it. When omitted, moving an order to `refunded` stamps this automatically the first time it happens
The updated order
messageA confirmation message.
data