Skip to main content
POST
Update purchase

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Headers

Idempotency-Key
string

Unique key for the operation, 1 to 255 characters (a UUID, for example). Repeating the same key with the same body within 24 hours returns the original response instead of running it again.

Path Parameters

purchase_id
string
required

Public purchase ID.

Pattern: ^pur_[A-Za-z0-9_-]+$

Body

application/json

Send at least one field. Only what you send changes.

payment_status
enum<string>

paid counts the purchase as a sale and adds it to the customer's totals; refunded or voided takes a paid purchase out of the sales and the totals.

Available options:
pending,
authorized,
paid,
refunded,
voided
status
enum<string>

The order's status in your system.

Available options:
open,
closed,
cancelled
shipping_status
enum<string>
Available options:
unfulfilled,
fulfilled,
shipped,
delivered
order_number
string

The order number the customer sees, such as 1042.

Required string length: 1 - 191

Response

Purchase updated.

object
string
required
Allowed value: "purchase"
id
string
required
Pattern: ^pur_[A-Za-z0-9_-]+$
customer_id
string
required
Pattern: ^cus_[A-Za-z0-9_-]+$
purchase_value_in_cents
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
external_id
string

The order's ID in the system it came from: the store, or your own system for purchases created through the API.

order_id_on_integration_platform
string
order_number
string
platform
string
status
string
payment_status
string
shipping_status
string
currency
string
Example:

"BRL"

subtotal_amount_in_cents
integer
total_amount_in_cents
integer
discount_in_cents
integer
shipping_cost_customer_in_cents
integer
coupons
object[]
attributed_flow_ids
string[]
deprecated

Deprecated legacy field retained for compatibility. When present, always returns an empty array; execution attribution is unavailable in this field.

Pattern: ^flw_[A-Za-z0-9_-]+$
utm_source
string
utm_medium
string
utm_campaign
string
utm_content
string
utm_term
string