import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: 'My API Key',
});
const inventorySite = await conductor.qbd.inventorySites.create({
name: 'Stockroom',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(inventorySite.id);
{
"id": "80000001-1234567890",
"objectType": "qbd_inventory_site",
"createdAt": "2021-10-01T12:34:56-05:00",
"updatedAt": "2021-10-01T15:45:30-05:00",
"revisionNumber": "1721172183",
"name": "Stockroom",
"isActive": true,
"parent": {
"id": "80000001-1234567890",
"fullName": "Romulus Warehouse:Stockroom"
},
"isDefault": true,
"description": "Main Stockroom for Electronics",
"contact": "Jane Smith",
"phone": "+1-555-123-4567",
"fax": "+1-555-555-1212",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}
Creates a new inventory site.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: 'My API Key',
});
const inventorySite = await conductor.qbd.inventorySites.create({
name: 'Stockroom',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(inventorySite.id);
{
"id": "80000001-1234567890",
"objectType": "qbd_inventory_site",
"createdAt": "2021-10-01T12:34:56-05:00",
"updatedAt": "2021-10-01T15:45:30-05:00",
"revisionNumber": "1721172183",
"name": "Stockroom",
"isActive": true,
"parent": {
"id": "80000001-1234567890",
"fullName": "Romulus Warehouse:Stockroom"
},
"isDefault": true,
"description": "Main Stockroom for Electronics",
"contact": "Jane Smith",
"phone": "+1-555-123-4567",
"fax": "+1-555-555-1212",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}
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 inventory site.
The response is of type object
.