Skip to main content

Farsight® Inventory Items API

Updated over 2 weeks ago

Requirements

  • An active Farsight® admin account

  • Authorized API key

Limitations

GET a Paginated List of Inventory Items (GET /v1/inventoryitems)

This API allows you to get a list of inventory items from your Farsight® organisation.

The following parameters are used to filter, sort, and paginate the list of assets returned in the response. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

SearchQuery

string

No

The search query used to find the inventory item

warehouseId

array<integer>

No

The ID of the warehouse

inventoryModelId

array<integer>

No

The ID of the Inventory Model

sort

array<string>

No

Fields used in the results sorting. Composed by the name of the field followed by :asc or :desc. Example: id:asc.

Limit

integer

No

The number of items you want the API to return. It can range from 1 to 50 (Free) or 1 to 500 (Pro). The default value is set to 25.

Offset

integer

No

The index of the first item to return. Must be 0 or greater. It is set to 0 by default.

Create a new Inventory Item (POST /v1/inventoryitems)

You can use the API to create new inventory items programmatically

Input Parameter

Type

Required

Definition

name

string

Yes

The name of the new inventory item

description

string

No

The description of the new inventory item

serialNumber

string

Yes

The internal serial number of the inventory item

minStock

integer

Yes

The minimum stock recommended for the inventory item

currentStock

integer

Yes

The current amount in stock of the inventory item

resupplyPeriod

string

Yes

The ressuply period

inventoryModelId

integer

Yes

The model ID

warehouseId

integer

Yes

The id of the warehouse where the inventory item is located

{
"name": "string",
"description": "string",
"serialNumber": "string",
"minStock": 2147483647,
"currentStock": 2147483647,
"resupplyPeriod": "Weekly",
"inventoryModelId": 0,
"warehouseId": 0
}

GET an Inventory Item (GET /v1/inventoryitems)

This API allows you to get an inventory item from your Farsight® organisation.

The following parameters are used to filter, sort, and paginate the list of assets returned in the response. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

Id

integer

Yes

The ID of the inventory item

Update an Inventory Items (PUT /v1/inventoryitems)

This API allows you to update an inventory item from your Farsight® organisation.

Input Parameter

Type

Required

Definition

Id

integer

Yes

The ID of the inventory item

{
"name": "string",
"description": "string",
"serialNumber": "string",
"minStock": 2147483647,
"currentStock": 2147483647,
"resupplyPeriod": "Weekly",
"inventoryModelId": 0,
"warehouseId": 0
}

Delete an Inventory Item (DELETE /v1/inventoryitems)

This API allows you to delete an inventory item from your Farsight® organisation.

Input Parameter

Type

Required

Definition

Id

integer

Yes

The ID of the inventory item

Did this answer your question?