import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: 'My API Key',
});
const itemGroup = await conductor.qbd.itemGroups.create({
name: 'Office Supplies Bundle',
shouldPrintItemsInGroup: true,
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(itemGroup.id);
{
"id": "80000001-1234567890",
"objectType": "qbd_item_group",
"createdAt": "2021-10-01T12:34:56-05:00",
"updatedAt": "2021-10-01T15:45:30-05:00",
"revisionNumber": "1721172183",
"name": "Office Supplies Bundle",
"barcode": "012345678905",
"isActive": true,
"description": "Complete office starter kit with essential supplies for new employees.",
"unitOfMeasureSet": {
"id": "80000001-1234567890",
"fullName": "Weight Units"
},
"shouldPrintItemsInGroup": true,
"specialItemType": "finance_charge",
"externalId": "12345678-abcd-1234-abcd-1234567890ab",
"lines": [
{
"item": {
"id": "80000001-1234567890",
"fullName": "Widget A"
},
"quantity": 5,
"unitOfMeasure": "Each"
}
],
"customFields": [
{
"ownerId": "0",
"name": "Customer Rating",
"type": "string_1024_type",
"value": "Premium"
}
]
}
Creates a new item group.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: 'My API Key',
});
const itemGroup = await conductor.qbd.itemGroups.create({
name: 'Office Supplies Bundle',
shouldPrintItemsInGroup: true,
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(itemGroup.id);
{
"id": "80000001-1234567890",
"objectType": "qbd_item_group",
"createdAt": "2021-10-01T12:34:56-05:00",
"updatedAt": "2021-10-01T15:45:30-05:00",
"revisionNumber": "1721172183",
"name": "Office Supplies Bundle",
"barcode": "012345678905",
"isActive": true,
"description": "Complete office starter kit with essential supplies for new employees.",
"unitOfMeasureSet": {
"id": "80000001-1234567890",
"fullName": "Weight Units"
},
"shouldPrintItemsInGroup": true,
"specialItemType": "finance_charge",
"externalId": "12345678-abcd-1234-abcd-1234567890ab",
"lines": [
{
"item": {
"id": "80000001-1234567890",
"fullName": "Widget A"
},
"quantity": 5,
"unitOfMeasure": "Each"
}
],
"customFields": [
{
"ownerId": "0",
"name": "Customer Rating",
"type": "string_1024_type",
"value": "Premium"
}
]
}
Your Conductor secret key using Bearer auth (e.g., "Authorization: Bearer {{YOUR_SECRET_KEY}}"
).
The ID of the EndUser to receive this request (e.g., "Conductor-End-User-Id: {{END_USER_ID}}"
).
"end_usr_1234567abcdefg"
Returns the newly created item group.
The response is of type object
.