curl --request POST \
--url https://api.rootfi.dev/v3/accounting/items \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"company_id": 1,
"data": [
{
"name": "Rootfi Test Item",
"description": "Rootfi Test Item",
"type": "INVENTORY",
"code": "1234567890",
"quantity_on_hand": 0,
"bill_item": {
"account_id": "123456",
"unit_price": 100
},
"invoice_item": {
"account_id": "123456",
"unit_price": 100
}
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.items.create({
company_id: 1,
data: [
{
name: "Rootfi Test Item",
description: "Rootfi Test Item",
type: "INVENTORY",
code: "1234567890",
quantity_on_hand: 0,
bill_item: {
account_id: "123456",
unit_price: 100,
},
invoice_item: {
account_id: "123456",
unit_price: 100,
},
},
],
});
{
"data": {
"rootfi_id": 32302,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-24T11:12:00.315Z",
"rootfi_updated_at": "2024-01-24T11:12:00.000Z",
"rootfi_company_id": 1109,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"name": "Brian Vega",
"description": null,
"updated_at": "2023-12-08T00:00:00.000Z",
"status": "ACTIVE",
"bill_item": {
"tax_id": "123456",
"account_id": "123456",
"unit_price": 123.45,
"description": "Test Item"
},
"code": "9837",
"invoice_item": {
"tax_id": "123456",
"account_id": "123456",
"unit_price": 123.45,
"description": "Test Item"
},
"is_bill_item": true,
"is_invoice_item": true,
"type": "INVENTORY",
"quantity_on_hand": 10
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}Items
Create Item
Create an item.
POST
/
accounting
/
items
curl --request POST \
--url https://api.rootfi.dev/v3/accounting/items \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"company_id": 1,
"data": [
{
"name": "Rootfi Test Item",
"description": "Rootfi Test Item",
"type": "INVENTORY",
"code": "1234567890",
"quantity_on_hand": 0,
"bill_item": {
"account_id": "123456",
"unit_price": 100
},
"invoice_item": {
"account_id": "123456",
"unit_price": 100
}
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.items.create({
company_id: 1,
data: [
{
name: "Rootfi Test Item",
description: "Rootfi Test Item",
type: "INVENTORY",
code: "1234567890",
quantity_on_hand: 0,
bill_item: {
account_id: "123456",
unit_price: 100,
},
invoice_item: {
account_id: "123456",
unit_price: 100,
},
},
],
});
{
"data": {
"rootfi_id": 32302,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-24T11:12:00.315Z",
"rootfi_updated_at": "2024-01-24T11:12:00.000Z",
"rootfi_company_id": 1109,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"name": "Brian Vega",
"description": null,
"updated_at": "2023-12-08T00:00:00.000Z",
"status": "ACTIVE",
"bill_item": {
"tax_id": "123456",
"account_id": "123456",
"unit_price": 123.45,
"description": "Test Item"
},
"code": "9837",
"invoice_item": {
"tax_id": "123456",
"account_id": "123456",
"unit_price": 123.45,
"description": "Test Item"
},
"is_bill_item": true,
"is_invoice_item": true,
"type": "INVENTORY",
"quantity_on_hand": 10
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}The Items Data Model is designed to simplify the management and retrieval of item-related information across various accounting platforms.
Additional Required Fields
To successfully create an item, certain fields must be included in the raw_data object of the request body. The required fields are as follows:| Integration | Field | Description |
|---|---|---|
| NETSUITE | taxschedule | The ID of the tax schedule associated with the item. |
| MS_DYNAMICS_365_FO | ProductNumber | The product number of the item. |
| MYOB_BUSINESS | asset_account_id | The ID of the asset account associated with the item. |
| QOYOD | product_unit_type_id | The ID of the product unit type associated with the item. |
| QOYOD | category_id | The ID of the category associated with the item. |
| QOYOD | track_quantity | Whether the item should track quantity. |
| QOYOD | tax_id | The ID of the tax associated with the item. |
curl --request POST \
--url https://api.rootfi.dev/v3/accounting/items \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"company_id": 1,
"data": [
{
"name": "Rootfi Test Item",
"description": "Rootfi Test Item",
"type": "INVENTORY",
"code": "1234567890",
"quantity_on_hand": 0,
"bill_item": {
"account_id": "123456",
"unit_price": 100
},
"invoice_item": {
"account_id": "123456",
"unit_price": 100
}
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.items.create({
company_id: 1,
data: [
{
name: "Rootfi Test Item",
description: "Rootfi Test Item",
type: "INVENTORY",
code: "1234567890",
quantity_on_hand: 0,
bill_item: {
account_id: "123456",
unit_price: 100,
},
invoice_item: {
account_id: "123456",
unit_price: 100,
},
},
],
});
Authorizations
Body
application/json
⌘I