Skip to main content
POST
/
ecommerce
/
products
Create a Product
curl --request POST \
  --url https://api.rootfi.dev/v4/ecommerce/products \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "company_id": 123,
  "data": [
    {
      "name": "John Doe",
      "description": "John Doe",
      "status": "ACTIVE",
      "created_at": "2024-01-22T05:07:31.465Z",
      "updated_at": "2024-01-22T05:07:31.000Z"
    }
  ]
}
'
{
  "data": {
    "rootfi_id": 157,
    "rootfi_deleted_at": null,
    "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_1",
    "platform_unique_id": "123456",
    "name": "John Doe",
    "description": "John Doe",
    "status": "ACTIVE",
    "created_at": "2024-01-22T05:07:31.465Z",
    "updated_at": "2024-01-22T05:07:31.000Z"
  }
}
Deprecation Notice: The Products endpoint is maintained for backward compatibility. New integrations should use the Items endpoint which provides embedded Variants support.
Create a new product in the e-commerce platform. This endpoint is maintained for backward compatibility. For new integrations, use the Items endpoint.

Request Body

FieldTypeRequiredDescription
company_idintegerYesThe rootfi_company_id to associate this product with
dataarrayYesArray of product objects to create
data[].namestringYesProduct name
data[].descriptionstringNoProduct description
data[].skustringNoStock keeping unit (SKU)
data[].statusstringNoProduct status (active, inactive, archived). Defaults to active
See Product Overview for complete field details.

Authorizations

api_key
string
header
required

Body

application/json
company_id
integer
required

The ID of the company in the accounting platform

data
ecommerceProductsFields · object[]
required

The data of the products endpoint

run_async
boolean | null

Run the request asynchronously

Response

data
ecommerceProductObject · object

The data of the products endpoint

sync_id
string | null

The sync id of the request