Change the status of an Item

POST /items/:id/:action

Change the status of one Item. Use the batch action for multiple IDs; restoring deleted Items is available only here.

Status codes

  • 200 on success
  • 400 on invalid request
  • 404 on item not found

Path parameters

  • id: The item id.
  • action: One of deactivate, activate, delete, restore.
deactivate

This sets the archived timestamp and moves the Item from the active list to the archived list. An already deleted Item remains deleted.

activate

This removes the archived timestamp and moves the Item to the active list. An already deleted Item remains deleted.

delete

This operation sets the deleted timestamp and removes the Item from the normal Item list. If it has stock, it is also marked pending_delete until that stock is resolved. It remains retrievable by its ID through GET /items/:id and can be restored.

restore

This removes the deleted timestamp and returns the Item to the active or archived list. If it was also deactivated, restore does not activate it automatically.

Response properties

The response is the details of the item after the operation.

You can see all the Item properties on the GET /items/:id page under "Response properties".

Example response

{
  "id": "itm_oh0IyIjqvd",
  "category": "cat_KaNDv51Gh0",
  "name": "Vodka",
  "vessel": {
    "size": 7,
    "unit": "dl",
    "type": "BO"
  },
  "bundles": [
    {
      "type": "CT",
      "size": 6
    }
  ],
  "price": 750,
  "supplier": {
    "id": 1693919950079,
    "reference": "1100992"
  },
  "archived": 1701262121920,
  "deleted": 1701269851094
}