Skip to main content
Items represent products, ingredients, or assets in your catalog. Each item can have multiple variants with different units of measure.

List Items

curl -X GET "https://api.sushigo.com/api/v1/items?type=INSUMO&per_page=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Query Parameters

type
string
Filter by item type: INSUMO (ingredient), PRODUCTO (finished product), or ACTIVO (asset)
is_stocked
boolean
Filter by inventory tracking status
is_perishable
boolean
Filter by perishability (items with expiration dates)
is_active
boolean
Filter by active status
Search by SKU or name (case-insensitive partial match)
per_page
integer
default:"15"
Number of items per page

Response

data
array
meta
object
Pagination metadata (current_page, last_page, per_page, total)

Example Response

{
  "status": 200,
  "data": [
    {
      "id": 1,
      "sku": "INS-001",
      "name": "Arroz Sushi Premium",
      "description": "Arroz japonés premium para sushi",
      "type": "INSUMO",
      "is_stocked": true,
      "is_perishable": false,
      "is_active": true,
      "created_at": "2026-01-15T10:30:00+00:00",
      "updated_at": "2026-01-15T10:30:00+00:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 15,
    "total": 73
  }
}

Create Item

curl -X POST "https://api.sushigo.com/api/v1/items" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "INS-002",
    "name": "Salmon Fresco",
    "description": "Filete de salmón fresco",
    "type": "INSUMO",
    "is_stocked": true,
    "is_perishable": true,
    "is_active": true
  }'

Request Body

sku
string
required
Unique SKU code (auto-uppercased, max 100 chars)
name
string
required
Item name (max 255 chars)
type
string
required
Item type: INSUMO, PRODUCTO, or ACTIVO
description
string
Item description
is_stocked
boolean
default:"true"
Track in inventory
is_perishable
boolean
default:"false"
Has expiration date
is_active
boolean
default:"true"
Active status

Response

Returns the created item object with status 201.

Errors

  • 422 - Validation error (duplicate SKU, invalid type, etc.)
  • 403 - Insufficient permissions

Get Item

curl -X GET "https://api.sushigo.com/api/v1/items/1" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
integer
required
Item ID

Response

data
object

Errors

  • 404 - Item not found

Update Item

curl -X PUT "https://api.sushigo.com/api/v1/items/1" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Arroz Sushi Premium Plus",
    "is_active": true
  }'

Path Parameters

id
integer
required
Item ID

Request Body

All fields are optional. Only provided fields will be updated.
sku
string
SKU code (must be unique)
name
string
Item name
description
string
Description
type
string
Type: INSUMO, PRODUCTO, or ACTIVO
is_stocked
boolean
Track in inventory
is_perishable
boolean
Has expiration
is_active
boolean
Active status

Response

Returns the updated item object with status 200.

Errors

  • 404 - Item not found
  • 422 - Validation error
  • 403 - Insufficient permissions

Delete Item

curl -X DELETE "https://api.sushigo.com/api/v1/items/1" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
integer
required
Item ID

Response

{
  "status": 200,
  "message": "Item deleted successfully"
}

Errors

  • 404 - Item not found
  • 409 - Cannot delete - item has variants. Delete all variants first.
  • 403 - Insufficient permissions
Items with variants cannot be deleted. Remove all variants before deleting the parent item.

Build docs developers (and LLMs) love