Skip to main content
PUT
/
ecommerce
/
orders
/
{id}
Update Order
curl --request PUT \
  --url https://api.rootfi.dev/v4/ecommerce/orders/{id} \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "data": [
    {
      "customer_id": "<string>",
      "currency_id": "<string>",
      "order_number": "<string>",
      "status": "pending",
      "payment_status": "pending",
      "fulfillment_status": "unfulfilled",
      "total_amount": 123,
      "total_discount": 123,
      "total_tax": 123,
      "shipping_amount": 123,
      "created_at": "<string>",
      "updated_at": "<string>",
      "line_items": [
        {
          "rootfi_id": 123,
          "item_id": "<string>",
          "variant_id": "<string>",
          "name": "<string>",
          "description": "<string>",
          "quantity": 123,
          "unit_amount": 123,
          "tax_amount": 123,
          "discount_amount": 123,
          "total_amount": 123
        }
      ],
      "addresses": [
        {
          "rootfi_id": 123,
          "platform_id": "<string>",
          "type": "billing",
          "street": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        }
      ],
      "fulfillments": [
        {
          "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>",
          "order_id": "<string>",
          "name": "<string>",
          "status": "pending",
          "shipment_status": "label_printed",
          "estimated_delivery_date": "<string>",
          "actual_delivery_date": "<string>",
          "weight": 123,
          "weight_unit": "<string>",
          "addresses": [
            {
              "rootfi_id": 123,
              "platform_id": "<string>",
              "type": "billing",
              "street": "<string>",
              "city": "<string>",
              "state": "<string>",
              "postal_code": "<string>",
              "country": "<string>"
            }
          ],
          "line_items": [
            {
              "rootfi_id": 123,
              "line_item_id": "<string>",
              "quantity": 123
            }
          ],
          "tracking_info": {
            "number": "<string>",
            "company": "<string>",
            "url": "<string>",
            "status": "<string>"
          },
          "created_at": "<string>",
          "updated_at": "<string>"
        }
      ],
      "transactions": [
        {
          "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>",
          "type": "PAYMENT",
          "order_id": "<string>",
          "contact_id": "<string>",
          "currency_id": "<string>",
          "amount": 123,
          "status": "DRAFT",
          "payment_method_type": "CARD",
          "gateway": "<string>",
          "gateway_transaction_id": "<string>",
          "original_transaction_id": "<string>",
          "description": "<string>",
          "reason": "CUSTOMER_REQUEST",
          "created_at": "<string>",
          "updated_at": "<string>"
        }
      ]
    }
  ]
}
'
{
  "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>",
  "customer_id": "<string>",
  "currency_id": "<string>",
  "order_number": "<string>",
  "status": "pending",
  "payment_status": "pending",
  "fulfillment_status": "unfulfilled",
  "total_amount": 123,
  "total_discount": 123,
  "total_tax": 123,
  "shipping_amount": 123,
  "created_at": "<string>",
  "updated_at": "<string>",
  "line_items": [
    {
      "rootfi_id": 123,
      "item_id": "<string>",
      "variant_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "quantity": 123,
      "unit_amount": 123,
      "tax_amount": 123,
      "discount_amount": 123,
      "total_amount": 123
    }
  ],
  "addresses": [
    {
      "rootfi_id": 123,
      "platform_id": "<string>",
      "type": "billing",
      "street": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal_code": "<string>",
      "country": "<string>"
    }
  ],
  "fulfillments": [
    {
      "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>",
      "order_id": "<string>",
      "name": "<string>",
      "status": "pending",
      "shipment_status": "label_printed",
      "estimated_delivery_date": "<string>",
      "actual_delivery_date": "<string>",
      "weight": 123,
      "weight_unit": "<string>",
      "addresses": [
        {
          "rootfi_id": 123,
          "platform_id": "<string>",
          "type": "billing",
          "street": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        }
      ],
      "line_items": [
        {
          "rootfi_id": 123,
          "line_item_id": "<string>",
          "quantity": 123
        }
      ],
      "tracking_info": {
        "number": "<string>",
        "company": "<string>",
        "url": "<string>",
        "status": "<string>"
      },
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ],
  "transactions": [
    {
      "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>",
      "type": "PAYMENT",
      "order_id": "<string>",
      "contact_id": "<string>",
      "currency_id": "<string>",
      "amount": 123,
      "status": "DRAFT",
      "payment_method_type": "CARD",
      "gateway": "<string>",
      "gateway_transaction_id": "<string>",
      "original_transaction_id": "<string>",
      "description": "<string>",
      "reason": "CUSTOMER_REQUEST",
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ]
}
Update an existing order in the e-commerce platform. Only provided fields will be updated.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe rootfi_id or platform_id of the order to update

Request Body

FieldTypeRequiredDescription
statusstringNoOrder status (pending, processing, shipped, delivered, canceled)
payment_statusstringNoPayment state of the order
fulfillment_statusstringNoShipping/delivery state of the order
line_itemsarrayNoArray of line item objects
shipping_addressobjectNoShipping address object
billing_addressobjectNoBilling address object
See Order Overview for complete field details.

Authorizations

api_key
string
header
required

Path Parameters

id
string
required

The rootfi_id or platform_id of the order

Body

application/json
data
ecommerceOrdersFields · object[]
required

The data of the orders endpoint

Response

Order updated successfully

V4 Order object with embedded fulfillments and transactions

rootfi_id
number<double>
required

The unique ID we assign for that data's information

Example:

157

rootfi_created_at
string<date-time>
required

The date at which RootFi first synced this data

Example:

"2024-01-22T05:07:31.465Z"

rootfi_updated_at
string<date-time>
required

The latest date at which RootFi updated this data

Example:

"2024-01-22T05:07:31.000Z"

rootfi_company_id
number<double>
required

The ID of the company in the accounting platform

Example:

1089

platform_id
string
required

An unique custom RootFi ID made from platform's unique_id.

Example:

"123456"

rootfi_deleted_at
string<date-time> | null

The date at which the data was deleted in the accounting platform

platform_unique_id
string | null

The ID of the data in the accounting platform.

raw_data
object

A JSON containing fields that you can directly get from the accounting platform.

data_hash
string | null

The hash of the data

customer_id
string | null

Reference to the Contact who placed this order

currency_id
string | null

ISO 4217 currency code for all monetary amounts

order_number
string | null

Human-readable order number (e.g., "ORD-2024-001")

status
enum<string> | null

Overall status of the order

Available options:
pending,
processing,
completed,
canceled,
on_hold,
unknown
payment_status
enum<string> | null

Payment state of the order

Available options:
pending,
paid,
partially_paid,
refunded,
partially_refunded,
voided,
unknown
fulfillment_status
enum<string> | null

Shipping/delivery state of the order

Available options:
unfulfilled,
partially_fulfilled,
fulfilled,
returned,
unknown
total_amount
number<double> | null

Final total amount including tax and shipping

total_discount
number<double> | null

Total discount amount applied to this order

total_tax
number<double> | null

Total tax amount charged

shipping_amount
number<double> | null

Shipping and handling charges

created_at
string | null

Original creation timestamp from platform (ISO 8601)

updated_at
string | null

Last update timestamp from platform (ISO 8601)

line_items
ecommerceV4LineItemObject · object[] | null

Individual items included in this order

addresses
ecommerceV4AddressObject · object[] | null

Shipping and billing addresses for this order

fulfillments
ecommerceFulFillmentsObject · object[] | null

Complete fulfillment records including tracking information

transactions
ecommerceTransactionObject · object[] | null

All payment and refund transactions associated with this order