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"
}
}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"
}
}| Field | Type | Required | Description |
|---|---|---|---|
| company_id | integer | Yes | The rootfi_company_id to associate this product with |
| data | array | Yes | Array of product objects to create |
| data[].name | string | Yes | Product name |
| data[].description | string | No | Product description |
| data[].sku | string | No | Stock keeping unit (SKU) |
| data[].status | string | No | Product status (active, inactive, archived). Defaults to active |