cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "BUNDLE",
"friendlyId": "GRP-260914-TEST0001",
"name": "Laptop Bundle",
"region": {
"id": "3a68a467-8733-4c8d-a942-16ed7ec33018",
"name": "United States",
"code": "US"
},
"status": "ACTIVE",
"components": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": {
"id": "7b21c8e0-1a2b-4c3d-9e5f-0123456789ab",
"vendorSku": "MK183LL/A",
"productTitle": "MacBook Pro 14",
"categoryCode": "COMPUTER"
},
"quantity": 1,
"required": true,
"fulfillmentMode": "WAREHOUSE_ONLY",
"warehouseCondition": "NEW_ONLY",
"sortOrder": 0
}
],
"referencedPackageCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"coverSkuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primaryCategoryCode": "<string>",
"createdBy": {
"id": "d7d0d906-425f-402f-bde1-39031c67c40b",
"forename": "Ada",
"surname": "Lovelace"
},
"updatedBy": {
"id": "d7d0d906-425f-402f-bde1-39031c67c40b",
"forename": "Ada",
"surname": "Lovelace"
}
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Bundles
Archive bundle
Archives a bundle and removes it from any packages that include it. Memberships are detached first, then the bundle is archived (HTTP 200). Returns 403 when bundles are not enabled for your organization.
POST
https://apipub.firstbasehq.com
/
api
/
v1
/
bundles
/
{productGroupId}
/
archive
cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/bundles/{productGroupId}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "BUNDLE",
"friendlyId": "GRP-260914-TEST0001",
"name": "Laptop Bundle",
"region": {
"id": "3a68a467-8733-4c8d-a942-16ed7ec33018",
"name": "United States",
"code": "US"
},
"status": "ACTIVE",
"components": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": {
"id": "7b21c8e0-1a2b-4c3d-9e5f-0123456789ab",
"vendorSku": "MK183LL/A",
"productTitle": "MacBook Pro 14",
"categoryCode": "COMPUTER"
},
"quantity": 1,
"required": true,
"fulfillmentMode": "WAREHOUSE_ONLY",
"warehouseCondition": "NEW_ONLY",
"sortOrder": 0
}
],
"referencedPackageCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"coverSkuId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primaryCategoryCode": "<string>",
"createdBy": {
"id": "d7d0d906-425f-402f-bde1-39031c67c40b",
"forename": "Ada",
"surname": "Lovelace"
},
"updatedBy": {
"id": "d7d0d906-425f-402f-bde1-39031c67c40b",
"forename": "Ada",
"surname": "Lovelace"
}
}{
"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
Response
Bundle archived
Product group bundle and its members