curl --request PUT \
--url https://api.rootfi.dev/v4/payments/orders/{id} \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"status": "PENDING",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"item_id": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
]
}
'{
"rootfi_id": 157,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.000Z",
"rootfi_company_id": 1089,
"platform_id": "123456",
"rootfi_deleted_at": "2023-11-07T05:31:56Z",
"platform_unique_id": "<string>",
"raw_data": {},
"data_hash": "<string>",
"contact_id": "<string>",
"currency_id": "<string>",
"status": "PENDING",
"payment_status": "DRAFT",
"total_amount": 123,
"total_discount": 123,
"total_tax": 123,
"created_at": "<string>",
"updated_at": "<string>",
"invoice_id": "<string>",
"invoice_ids": [
"<string>"
],
"line_items": [
{
"rootfi_id": 123,
"item_id": "<string>",
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"tax_amount": 123,
"discount_amount": 123,
"total_amount": 123
}
],
"transactions": [
{
"rootfi_id": 123,
"platform_id": "<string>",
"type": "PAYMENT",
"amount": 123,
"currency_id": "<string>",
"status": "DRAFT",
"payment_method_type": "CARD",
"gateway": "<string>",
"description": "<string>",
"created_at": "<string>"
}
]
}Update an existing order.
curl --request PUT \
--url https://api.rootfi.dev/v4/payments/orders/{id} \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"status": "PENDING",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"item_id": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
]
}
'{
"rootfi_id": 157,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.000Z",
"rootfi_company_id": 1089,
"platform_id": "123456",
"rootfi_deleted_at": "2023-11-07T05:31:56Z",
"platform_unique_id": "<string>",
"raw_data": {},
"data_hash": "<string>",
"contact_id": "<string>",
"currency_id": "<string>",
"status": "PENDING",
"payment_status": "DRAFT",
"total_amount": 123,
"total_discount": 123,
"total_tax": 123,
"created_at": "<string>",
"updated_at": "<string>",
"invoice_id": "<string>",
"invoice_ids": [
"<string>"
],
"line_items": [
{
"rootfi_id": 123,
"item_id": "<string>",
"description": "<string>",
"quantity": 123,
"unit_amount": 123,
"tax_amount": 123,
"discount_amount": 123,
"total_amount": 123
}
],
"transactions": [
{
"rootfi_id": 123,
"platform_id": "<string>",
"type": "PAYMENT",
"amount": 123,
"currency_id": "<string>",
"status": "DRAFT",
"payment_method_type": "CARD",
"gateway": "<string>",
"description": "<string>",
"created_at": "<string>"
}
]
}| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The rootfi_id or platform_id of the order |
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | No | Order status (pending, processing, completed) |
| line_items | array | No | Updated line items (replaces existing) |
Order updated successfully
V4 Order model with embedded transactions.
The unique ID we assign for that data's information
157
The date at which RootFi first synced this data
"2024-01-22T05:07:31.465Z"
The latest date at which RootFi updated this data
"2024-01-22T05:07:31.000Z"
The ID of the company in the accounting platform
1089
An unique custom RootFi ID made from platform's unique_id.
"123456"
The date at which the data was deleted in the accounting platform
The ID of the data in the accounting platform.
A JSON containing fields that you can directly get from the accounting platform.
The hash of the data
Reference to the Contact.
ISO 4217 currency code.
Current order status (PENDING, PROCESSING, COMPLETED, CANCELED, ON_HOLD, UNKNOWN).
PENDING, PROCESSING, COMPLETED, CANCELED, ON_HOLD, UNKNOWN Payment state of the order (DRAFT, PENDING, PAID, PARTIALLY_PAID, FAILED, REFUNDED, PARTIALLY_REFUNDED, VOIDED, UNKNOWN).
DRAFT, PENDING, PAID, PARTIALLY_PAID, FAILED, REFUNDED, PARTIALLY_REFUNDED, VOIDED, UNKNOWN Total order amount.
Total discount amount.
Total tax amount.
Original creation timestamp from platform (ISO 8601).
Last update timestamp from platform (ISO 8601).
Reference to the primary Invoice.
References to all related invoices.
Items included in this order.
Show child attributes
All payment transactions for this order.
Show child attributes