Skip to main content
PATCH
/
items
/
{itemId}
Update an item
curl --request PATCH \
  --url https://api.retrac.co/items/{itemId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sku": "FITEM",
  "description": "<string>",
  "cost": 123,
  "sellPrice": 0,
  "supplierId": "<string>",
  "tagId": "<string>",
  "tagIds": "<string>",
  "tagNames": "<string>"
}
'
{
  "id": "<string>",
  "sku": "<string>",
  "description": "<string>",
  "supplierId": "<string>",
  "cost": 123,
  "sellPrice": 123,
  "tagId": "<string>",
  "tags": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "userId": "<string>",
  "workspaceId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "projectId": "<string>",
  "supplier": {
    "id": "<string>",
    "name": "<string>",
    "email": "<string>",
    "phone": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer API key from Settings → API Keys. Use restricted keys (prefix retrac_) with the minimum scopes required.

Path Parameters

itemId
string
required

The id of the item to update. You may use either itemId (obtained via /items/info endpoint) or externalId prefixed with ext_.

Query Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_cluuwcv0r..."

projectSlug
string
deprecated

The slug of the project. This field is deprecated – use workspaceId instead.

Body

application/json
sku
string
required

The SKU of the item.

Example:

"FITEM"

description
string
required

The item description.

cost
number
required

The cost of the item.

sellPrice
number
default:0

The default sell price of the item.

Required range: x >= 0
supplierId
string | null

The supplier ID of the item.

tagId
string | null
deprecated

[DEPRECATED] (use tagIds instead): The unique ID of the tag assigned to the short item.

tagIds

The unique IDs of the tags assigned to the short item.

tagNames

The unique name of the tags assigned to the item (case insensitive).

Response

The updated item

id
string
required

The unique ID of the short item.

sku
string
required

The SKU of the item.

description
string
required

The item description.

supplierId
string | null
required

The supplier ID of the item.

cost
number
required

The item cost.

sellPrice
number
required

The default sell price of the item.

tagId
string | null
required
deprecated

[DEPRECATED] (use tags instead): The unique ID of the tag assigned to the short item.

tags
ItemTag · object[] | null
required

The tags assigned to the short item.

userId
string
required

The user ID of the creator of the short item.

workspaceId
string
required

The workspace ID of the short item.

createdAt
string
required

The date and time when the short item was created.

updatedAt
string
required

The date and time when the short item was last updated.

projectId
string
required
deprecated

[DEPRECATED] (use workspaceId instead): The project ID of the short item.

supplier
object

The linked supplier record.