curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"deployStatus": "ARCHIVED",
"deployReason": "GIFTED_BY_EMPLOYER",
"assignedTo": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "OFFICE"
},
"condition": "NEW",
"renewalDate": "2027-01-15",
"serialNumber": "SN-ABC-123",
"description": "Refurbished MacBook Pro 14\"",
"vendorCode": "APPLE",
"vendorSku": "MBP14-M3-512"
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "ecb7e933-de1e-9830-b180-b25d1d0d296e",
"skuId": "203a5df2-423a-43a9-bb19-1ccaf3434b91",
"imei": [
"356789012345678"
],
"deployStatus": "ARCHIVED",
"condition": "NEW",
"categoryCode": "TSHIRT",
"categoryNameOfSku": "T-shirt",
"skuTitle": "T-shirt White - 5XL",
"vendorCode": "AWESOME_MERCHANDISE",
"vendorSku": "TSHRT_5XL_WHITE",
"createdAt": "2023-02-09T00:00:00",
"updatedAt": "2023-03-02T17:39:01.650027",
"tags": [
{
"id": "8e0caa73-cc71-4aa4-88eb-fca494de8e20",
"label": "Engineering"
}
],
"assignedCountryCode": "DE",
"serialNumber": "25f2e6ea9a",
"deployReason": "LOST_BY_WORKER",
"renewalDate": "2026-02-09",
"renewalDateUpdatedBy": "RENEWAL_DATE_ORGANIZATION_LEVEL",
"billingStartDate": "2026-02-09",
"billingEndDate": "2028-02-09",
"procurementMethod": "Inventory Order - #c853d81c-ba0b-4027-a394-d5586b61608c",
"returnOrder": null,
"assignedTo": null,
"pricing": {
"regionCode": "<string>",
"priceOption": "<string>",
"price": 123,
"currencyCode": "<string>",
"discountedPrice": 123,
"discountPercentage": 123
},
"description": "Custom inventory description",
"netsuiteInvoiceId": "INV-123456",
"holdStartDate": "2023-12-25",
"unlockDate": "2023-12-25",
"itadRequested": true,
"appleBusiness": null,
"hashId": "T0FBQUFBQUFBQUFBQUFB"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Update inventory
Partially updates inventory attributes for a single item owned by the caller’s organization. Only fields present in the body are changed.
curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"deployStatus": "ARCHIVED",
"deployReason": "GIFTED_BY_EMPLOYER",
"assignedTo": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "OFFICE"
},
"condition": "NEW",
"renewalDate": "2027-01-15",
"serialNumber": "SN-ABC-123",
"description": "Refurbished MacBook Pro 14\"",
"vendorCode": "APPLE",
"vendorSku": "MBP14-M3-512"
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "ecb7e933-de1e-9830-b180-b25d1d0d296e",
"skuId": "203a5df2-423a-43a9-bb19-1ccaf3434b91",
"imei": [
"356789012345678"
],
"deployStatus": "ARCHIVED",
"condition": "NEW",
"categoryCode": "TSHIRT",
"categoryNameOfSku": "T-shirt",
"skuTitle": "T-shirt White - 5XL",
"vendorCode": "AWESOME_MERCHANDISE",
"vendorSku": "TSHRT_5XL_WHITE",
"createdAt": "2023-02-09T00:00:00",
"updatedAt": "2023-03-02T17:39:01.650027",
"tags": [
{
"id": "8e0caa73-cc71-4aa4-88eb-fca494de8e20",
"label": "Engineering"
}
],
"assignedCountryCode": "DE",
"serialNumber": "25f2e6ea9a",
"deployReason": "LOST_BY_WORKER",
"renewalDate": "2026-02-09",
"renewalDateUpdatedBy": "RENEWAL_DATE_ORGANIZATION_LEVEL",
"billingStartDate": "2026-02-09",
"billingEndDate": "2028-02-09",
"procurementMethod": "Inventory Order - #c853d81c-ba0b-4027-a394-d5586b61608c",
"returnOrder": null,
"assignedTo": null,
"pricing": {
"regionCode": "<string>",
"priceOption": "<string>",
"price": 123,
"currencyCode": "<string>",
"discountedPrice": 123,
"discountPercentage": 123
},
"description": "Custom inventory description",
"netsuiteInvoiceId": "INV-123456",
"holdStartDate": "2023-12-25",
"unlockDate": "2023-12-25",
"itadRequested": true,
"appleBusiness": null,
"hashId": "T0FBQUFBQUFBQUFBQUFB"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Body
Request body for updating inventory details
Allowed values:
- `UNAVAILABLE`, only applies to inventory assigned to an office.
- `AVAILABLE`, only applies to inventory assigned to an office.
- `DEPLOYED`, only applies to inventory assigned to a person.
- `ARCHIVED`, applies to inventory assigned to a person or an office.
ARCHIVED, DEPLOYED, UNAVAILABLE, AVAILABLE "ARCHIVED"
Reason for the deployment change.
Allowed values vary based on `deployStatus`:
- For `UNAVAILABLE`, valid reasons are [AWAITING_INFORMATION, DATA_HOLD, LOCKED_APPLE_ACTIVATION, LOCKED_FMD_REPORTED_LOST_STOLEN, LOCKED_MDM, LOCKED_PIN, REQUIRES_REPAIR, OUT_FOR_REPAIR].
- For `ARCHIVED`, valid reasons are [GIFTED_BY_EMPLOYER, LOST_BY_WORKER, BOUGHT_OUT, PERSONAL_DEVICE, END_OF_USEFUL_LIFE_DESTROYED, END_OF_USEFUL_LIFE_DONATED, DECOMMISSIONED_BY_EMPLOYER].
- For `AVAILABLE`, reason must be null.
- For `DEPLOYED`, reason must be null.
GIFTED_BY_EMPLOYER, LOST_BY_WORKER, BOUGHT_OUT, PERSONAL_DEVICE, END_OF_USEFUL_LIFE_DESTROYED, END_OF_USEFUL_LIFE_DONATED, DECOMMISSIONED_BY_EMPLOYER, AWAITING_INFORMATION, DATA_HOLD, LOCKED_APPLE_ACTIVATION, LOCKED_FMD_REPORTED_LOST_STOLEN, LOCKED_MDM, LOCKED_PIN, REQUIRES_REPAIR, OUT_FOR_REPAIR "GIFTED_BY_EMPLOYER"
Optional IMEI(s) for cellular/mobile inventory only. Omit this field when updating other attributes (for example renewalDate on laptops). Omit or send null to leave unchanged; send [] to clear all IMEIs. When provided, each value must be a 14- or 15-digit ASCII numeric string (GSMA IMEI).
^\d{14,15}$Vendor code (brand). Must be paired with vendorSku. For customer-supplied inventory this reassigns the item to the SKU identified by the vendorCode/vendorSku pair, which may be a catalog SKU. Not allowed on Firstbase-supplied inventories, inventories assigned to a warehouse, or inventories with a return in progress.
"APPLE"
Vendor SKU (model number). Must be paired with vendorCode. For customer-supplied inventory this reassigns the item to the SKU identified by the vendorCode/vendorSku pair, which may be a catalog SKU. The pair must resolve to an existing SKU that is not ARCHIVED. Not allowed on Firstbase-supplied inventories, inventories assigned to a warehouse, or inventories with a return in progress.
"MBP14-M3-512"
Response
Inventory updated successfully
A single inventory item (piece of equipment) belonging to the organization
Current lifecycle state of the inventory item. DEPLOYED = assigned to a person; AVAILABLE = in a warehouse ready to ship; ARCHIVED = permanently decommissioned; UNAVAILABLE = in warehouse but not ready to ship; AWAITING_ARRIVAL = in transit to a warehouse.
ARCHIVED, AVAILABLE, AWAITING_ARRIVAL, DEPLOYED, ON_HOLD, UNAVAILABLE "ARCHIVED"
Reason code explaining why the item is in its current deployStatus. Required when transitioning to UNAVAILABLE or ARCHIVED; null when DEPLOYED or AVAILABLE.
ASSIGNED_TO_ADMIN, AWAITING_INFORMATION, BOUGHT_OUT, DATA_HOLD, DECOMMISSIONED_BY_EMPLOYER, END_OF_USEFUL_LIFE_DESTROYED, END_OF_USEFUL_LIFE_DONATED, PENDING_FULFILLMENT, GIFTED_BY_EMPLOYER, GIFTED_BY_FIRSTBASE, IN_TRANSIT, LOCKED_APPLE_ACTIVATION, LOCKED_FMD_REPORTED_LOST_STOLEN, LOCKED_MDM, LOCKED_PIN, LOST_BY_FIRSTBASE, LOST_IN_TRANSIT, LOST_BY_WORKER, MARKED_FOR_DESTRUCTION, NA, NEVER_RECEIVED_BY_WORKER, OTHER, OUT_FOR_DESTRUCTION, OUT_FOR_REPAIR, PENDING_BUY_OUT, RECYCLING_REQUESTED, REQUIRES_CLEANING, REQUIRES_REPAIR, RETURN_IN_PROGRESS, SENT_TO_OFFICE, STOLEN, UNRESPONSIVE_WORKER, UNSUPPORTED_REGION, PERSONAL_DEVICE, PENDING_HOLD_RELEASE "LOST_BY_WORKER"
Who or what last set the renewalDate (e.g. organization policy vs. manual override)
RENEWAL_DATE_ORGANIZATION_LEVEL, RENEWAL_DATE_ORGANIZATION_CATEGORY_LEVEL, RENEWAL_DATE_MANUALLY_UPDATED, CLEAR_RENEWAL_DATE_MANUALLY_SET "RENEWAL_DATE_ORGANIZATION_LEVEL"