Item Management

Item management is crucial in our system, providing a structured approach to managing item data. This section delves into different endpoints for programmatically managing items.

The item model

The item model consists of all the data related to your items. It includes details such as item name, description, inventory status, and other attributes crucial for managing items.

Properties

  • Name
    name
    Type
    string
    Description

    Name of the item. Optional, indexed for quicker search.

  • Name
    description
    Type
    text
    Description

    A description of the item. Optional.

  • Name
    image
    Type
    text
    Description

    URL of an image representing the item. Optional.

  • Name
    taxable
    Type
    boolean
    Description

    Indicates whether the item is taxable. Optional.

  • Name
    isInventory
    Type
    boolean
    Description

    Indicates whether the item is a part of inventory. Optional.

  • Name
    removeUom
    Type
    boolean
    Description

    Indicates whether to remove the unit of measure for this item. Optional.

  • Name
    isHidden
    Type
    boolean
    Description

    Indicates whether the item is hidden in the system. Optional.

  • Name
    type
    Type
    enum
    Description

    The type of inventory, based on InventoryType enum. Optional.

  • Name
    externalId
    Type
    string
    Description

    An external identifier for the item. Optional, unique.

  • Name
    externalValue
    Type
    string
    Description

    An external value associated with the item. Optional, unique.

  • Name
    metadata
    Type
    json
    Description

    Additional metadata associated with the item. Defaults to an empty JSON object ''. Optional.

  • Name
    syncDate
    Type
    date
    Description

    The date when the item was last synchronized. Optional.

  • Name
    limitReminder
    Type
    double
    Description

    A numeric limit for a reminder associated with the item. Optional.


GET/public/items/:id

Get an item by ID

This endpoint retrieves a specific item by its unique identifier. The ID of the item is required to perform this operation.

Required attributes

  • Name
    id
    Type
    string
    Description

    The unique identifier of the item.

Request

GET
/public/items/:id
curl -G https://api.invoiss.com/public/items/{id} \
-H "Authorization: {token}"

Response

{
	"name": "First item",
	"description": "this one is first",
	"image": null,
	"isInventory": false,
	"isHidden": null,
	"type": "FINISHED_GOODS",
	"taxable": false,
	"metadata": {},
	"gateway": null,
	"externalId": null,
	"externalValue": null,
	"categories": [],
	"taxes": [],
	"uoms": [
{
	"id": "b97215ad-c984-4887-9e69-c21e13b3ca02",
	"selected": true,
	"image": null,
	"name": "Unit",
	"price": 12,
	"cost": 0,
	"quantity": 11,
	"sku": "2BDYCLYB",
	"code": null,
	"vendorSku": ""
}
	],
	"locations": [],
	"modifierGroups": [],
	"id": "16aab532-a2f8-4f57-b069-07ebd6cf51cb",
	"createdAt": "2023-12-13T11:48:04.000Z",
	"updatedAt": "2023-12-13T11:48:04.000Z"
}

GET/public/items

List all items

This endpoint retrieves a paginated list of all items. It allows customization of the returned list through various query parameters.

Optional attributes

  • Name
    limit
    Type
    integer
    Description
    Limit the number of clients returned.
  • Name
    offset
    Type
    integer
    Description
    Offset the number of results to skip before starting to return them.
  • Name
    orderBy
    Type
    string[]
    Description
    Specify the ordering of the results. Default is ['createdAt:DESC'] .
  • Name
    search
    Type
    string
    Description
    A search term to filter the results.

Request

GET
/public/items
curl -G https://api.invoiss.com/public/items \
-H "Authorization: {token}" \
-d limit=10

Response

{
	"items"                : [
{
	"id"           : "e25a44a3-3b80-4e34-ad6b-85762140c1f4",
	"logo"         : null,
	"contact"      : "Alice Johnson",
	"name"         : "Client C",
	"email"        : "clientc@example.com",
	"code"         : "JNSDV9",
	"cell"         : null,
	"phone"        : "555-123-4567",
	"metadata"     : {},
	"statement"    : false,
	"isHidden"     : null,
	"po"           : null,
	"clientCredits": [],
	"gateway"      : null,
	"addresses"    : [],
	"company"      : {
	"id"       : "0e3d5b0b-7274-4da4-9fbb-b1aec3ad53ff"
}              ,
	"externalId"   : null,
	"externalValue": null,
	"updatedAt"    : "2023-12-18T14:33:27.000Z"
}
	]                      ,
	"count"                : 3
}


POST/public/items

Create an item

This endpoint allows for adding a new item to your inventory. Essential information such as name and description must be provided.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the item.

  • Name
    description
    Type
    string
    Description

    Description of the item.

  • Name
    image
    Type
    string
    Description

    URL for the item's image.

  • Name
    isInventory
    Type
    boolean
    Description

    Indicates whether the item is in inventory.

Optional attributes

  • Name
    isHidden
    Type
    boolean
    Description

    Indicates whether the item is hidden in the system.

  • Name
    type
    Type
    string
    Description

    The type of the item.

  • Name
    taxable
    Type
    boolean
    Description

    Indicates whether the item is taxable.

  • Name
    metadata
    Type
    object
    Description

    Additional metadata associated with the item.

  • Name
    limitReminder
    Type
    number
    Description

    A numeric limit for a reminder to be sent when the item hits the specified limit.

Request

POST
/public/items
curl https://api.invoiss.com/public/items \
-H "Authorization: {token}" \
-d '{
"inputs": [{
"name": "Example Item",
"description": "Description of the item",
"image": "http://example.com/image.jpg",
"isInventory": true,
}]
}'

Response

{
	true
}