curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/packages/{slug}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"skus": [],
"rules": [],
"skuLines": [
{
"vendor_code": "DELL",
"vendor_sku": "LAT-7420",
"region_ids": []
}
],
"usedEquipmentPreferences": [
{
"in_stock_only": false
}
],
"bundleRefs": []
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/packages/{slug}"
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/packages/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"automaticOrder": true,
"approvalRequired": true,
"requireJustification": true,
"slug": "<string>",
"active": true,
"notes": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"note": "Remember to include the welcome letter",
"active": true
}
],
"regions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"skuLines": [
{
"skuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendorSku": "<string>",
"regions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"vendorCode": "<string>"
}
],
"rules": [
{
"id": "3a68a467-8733-4c8d-a942-16ed7ec33018",
"category_code": "LAPTOP",
"quantity": 1,
"optional": false,
"allowed_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"bundleLines": [
{
"productGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"friendlyId": "<string>",
"name": "<string>",
"sortOrder": 123
}
],
"usedEquipmentPreferences": [
{
"categoryCode": "<string>",
"preference": "NEW_FIRST",
"inStockOnly": true
}
],
"skuIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"assignedTo": {
"people": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"deliverySetting": "PERSON",
"defaultOfficeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Modify package
Partially update a package by slug. Modifiable scalar fields: name, active, approvalRequired, automaticOrder, defaultOfficeId, deliverySetting. When skus is present, each entry adds or removes a SKU by catalog id (set delete: true to unlink). Omitted existing SKUs are unchanged; omit skus to leave assignments unchanged. rules and usedEquipmentPreferences replace when present (REQ-025). Setting active=false soft-deletes the package. The response includes the full package view plus its notes collection. Business-rule rejections (illegal automatic order, duplicate name, archive blocked, etc.) return HTTP 409 with source="package" envelope.
curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/packages/{slug}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"skus": [],
"rules": [],
"skuLines": [
{
"vendor_code": "DELL",
"vendor_sku": "LAT-7420",
"region_ids": []
}
],
"usedEquipmentPreferences": [
{
"in_stock_only": false
}
],
"bundleRefs": []
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/packages/{slug}"
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/packages/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"automaticOrder": true,
"approvalRequired": true,
"requireJustification": true,
"slug": "<string>",
"active": true,
"notes": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"note": "Remember to include the welcome letter",
"active": true
}
],
"regions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"skuLines": [
{
"skuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendorSku": "<string>",
"regions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"vendorCode": "<string>"
}
],
"rules": [
{
"id": "3a68a467-8733-4c8d-a942-16ed7ec33018",
"category_code": "LAPTOP",
"quantity": 1,
"optional": false,
"allowed_product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"bundleLines": [
{
"productGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"friendlyId": "<string>",
"name": "<string>",
"sortOrder": 123
}
],
"usedEquipmentPreferences": [
{
"categoryCode": "<string>",
"preference": "NEW_FIRST",
"inStockOnly": true
}
],
"skuIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"assignedTo": {
"people": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"deliverySetting": "PERSON",
"defaultOfficeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Body
Partial update payload for a package (FBS-3321)
Response
Package updated
Package details returned by get/list package endpoints