Logistics

Item catalog, stock levels, and stock-movement audit trail.

8 endpoints·Scopes: logistics:read, logistics:write
GET/api/items#

List items

scope · logistics:read

Lists items the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: logistics:read
Endpoint: GET /api/items

Example request

curl "https://guliel.com/api/items?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • pagereq
    integer
  • limitreq
    integer
  • searchreq
    string
  • isActive
    string
  • hasStock
    string
  • currency
    string
  • sortByreq
    enum<6>
    name · sku · unitPrice · quantity · createdAt · updatedAt
  • sortOrderreq
    enum<2>
    asc · desc

Response (200/201)

  • itemsreq
    array<object>
    • idreq
      string
    • organizationIdreq
      string
    • namereq
      string
    • descriptionreq
      string | null
    • skureq
      string | null
    • pricereq
      number | null
    • currencyreq
      string | null
    • quantityreq
      number | nullStock on hand. Null means the item is not stock-tracked.
    • lowStockThresholdreq
      integer
    • isActivereq
      boolean
    • availableForExternalOrderreq
      boolean
    • createdAtreq
      string
    • updatedAtreq
      string
  • lowStockCountreq
    integerHow many active stock-tracked items are at or below their lowStockThreshold.
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/items#

Create an item

scope · logistics:writerole · CONTRIBUTOR+

Creates a new item in the target organization. Returns the created record on success.

Scope: logistics:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/items

Example request

curl -X POST "https://guliel.com/api/items" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "name": "Sample",
  "currency": "USD",
  "lowStockThreshold": 5,
  "availableForExternalOrder": false
}'

Request body

  • organizationIdreq
    string
  • namereq
    string
  • description
    string
  • sku
    string
  • unitPrice
    number | null
  • currencyreq
    string
  • quantity
    number | null
  • lowStockThresholdreq
    integer
  • availableForExternalOrderreq
    boolean

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • descriptionreq
    string | null
  • skureq
    string | null
  • pricereq
    number | null
  • currencyreq
    string | null
  • quantityreq
    number | nullStock on hand. Null means the item is not stock-tracked.
  • lowStockThresholdreq
    integer
  • isActivereq
    boolean
  • availableForExternalOrderreq
    boolean
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/items/{id}#

Delete an item

scope · logistics:write

Deletes the item. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: logistics:write
Endpoint: DELETE /api/items/{id}

Example request

curl -X DELETE "https://guliel.com/api/items/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/items/{id}#

Get an item

scope · logistics:read

Fetches a single item by id. Returns 404 if the item isn't in the caller's accessible organizations.

Scope: logistics:read
Endpoint: GET /api/items/{id}

Example request

curl "https://guliel.com/api/items/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • descriptionreq
    string | null
  • skureq
    string | null
  • unitPricereq
    number | null
  • currencyreq
    string | null
  • quantityreq
    number | null
  • lowStockThresholdreq
    integer
  • isActivereq
    boolean
  • availableForExternalOrderreq
    boolean
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/items/{id}#

Update an item

scope · logistics:write

Updates an existing item. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: logistics:write
Endpoint: PATCH /api/items/{id}

Example request

curl -X PATCH "https://guliel.com/api/items/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string
  • description
    string | null
  • sku
    string | null
  • unitPrice
    number | null
  • currency
    string
  • lowStockThreshold
    integer
  • isActive
    boolean
  • availableForExternalOrder
    boolean

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • descriptionreq
    string | null
  • skureq
    string | null
  • unitPricereq
    number | null
  • currencyreq
    string | null
  • quantityreq
    number | null
  • lowStockThresholdreq
    integer
  • isActivereq
    boolean
  • availableForExternalOrderreq
    boolean
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PUT/api/items/{id}#

Update an item

scope · logistics:write

Replaces an existing item. All required fields must be supplied — omitted fields revert to their schema defaults.

Scope: logistics:write
Endpoint: PUT /api/items/{id}

Example request

curl -X PUT "https://guliel.com/api/items/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string
  • description
    string | null
  • sku
    string | null
  • unitPrice
    number | null
  • currency
    string
  • lowStockThreshold
    integer
  • isActive
    boolean
  • availableForExternalOrder
    boolean

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • descriptionreq
    string | null
  • skureq
    string | null
  • unitPricereq
    number | null
  • currencyreq
    string | null
  • quantityreq
    number | null
  • lowStockThresholdreq
    integer
  • isActivereq
    boolean
  • availableForExternalOrderreq
    boolean
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/items/{id}/movements#

List movements for an item

scope · logistics:read

Returns every movements row associated with the given item.

Scope: logistics:read
Endpoint: GET /api/items/{id}/movements

Example request

curl "https://guliel.com/api/items/abc123/movements?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • pagereq
    integer
  • limitreq
    integer

Response (200/201)

  • movementsreq
    array<object>
    • idreq
      string
    • itemIdreq
      string
    • typereq
      stringINVOICE_DEDUCT | INVOICE_RESTORE | MANUAL_ADD | MANUAL_SET | RECEIPT | etc.
    • deltareq
      number
    • quantityBeforereq
      number
    • quantityAfterreq
      number
    • referenceIdreq
      string | null
    • reason
      string | null
    • createdByIdreq
      string | null
    • createdAtreq
      string
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/items/{id}/stock#

Attach stock to an item

scope · logistics:write

Creates a new stock attached to the given item.

Scope: logistics:write
Endpoint: POST /api/items/{id}/stock

Example request

curl -X POST "https://guliel.com/api/items/abc123/stock" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • add
    number
  • set
    number
  • note
    string

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal