Warehouse POST
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/warehouse-service/warehouse
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Create a new warehouse and return the
You may specify the grouping details of a default location when creating a warehouse but if you don't a default location of 0.0.0.0 will be created for that warehouse.
Default warehouse type of 'warehouse' will be applied unless specified otherwise. All acceptable warehouse types are as follows: concession, consignment, miscellaneous, online, store, supplier, 3pl, virtual and warehouse.
If you use warehouse type '3pl' (third part logistics) you also need to supply a logisticsName value. You must not supply this value for any other warehouse type.
Example 1
Request URI
/warehouse
Request body
{
"name": "Bristol",
"address": {
"addressId": 246
}
}
Response
{
"response": 23
}
Example 2
Request URI
/warehouse
Request body
{
"name": "Bristol",
"address": {
"addressId": 246
}
}
Response
{
"response": 23
}
Example 3
Request URI
/warehouse
Request body
{
"name": "Dublin",
"address": {
"addressId": 246
},
"defaultLocation": {
"groupingA": "a",
"groupingB": "b",
"groupingC": "c",
"groupingD": "d"
}
}
Response
{
"response": 24
}
Example 4
Request URI
/warehouse
Request body
{
"name": "Brighton",
"address": {
"addressId": 247
},
"type": "supplier"
}
Response
{
"response": 25
}
Example 5
Request URI
/warehouse
Request body
{
"name": "3PL",
"type": "3pl",
"logisticsName": "A name",
"address": {
"addressId": 246
}
}
Response
{
"response": 26
}
Example 6
Request URI
/warehouse
Request body
{
"name": "New Glasgow Central",
"type": "warehouse",
"address": {
"addressId": 1
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 2,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 3,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 4,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 5,
"openingHours": "10:00:00",
"closingHours": "18:00:00"
},
{
"dayOfWeek": 6,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 7,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
}
]
},
"collectionSla": {
"value": 2,
"timeUnits": "HOURS"
},
"externalTransferSlas": [
{
"warehouseId": 4,
"value": 2,
"timeUnits": "DAYS"
},
{
"warehouseId": 5,
"value": 4,
"timeUnits": "WORKING_DAYS"
},
{
"warehouseId": 0,
"value": 6,
"timeUnits": "WORKING_DAYS"
}
]
}
Response
{
"response": 27
}
Example 7
Request URI
/warehouse
Request body
{
"name": "Glasgow Central",
"type": "warehouse",
"address": {
"addressId": 1
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 2,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 3,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 4,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 5,
"openingHours": "10:00:00",
"closingHours": "18:00:00"
},
{
"dayOfWeek": 6,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 7,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
}
]
},
"collectionSla": {
"value": 2,
"timeUnits": "HOURS"
},
"externalTransferSlas": [
{
"warehouseId": 4,
"value": 2,
"timeUnits": "DAYS"
},
{
"warehouseId": 30,
"value": -4,
"timeUnits": "DAYS"
},
{
"warehouseId": 0,
"value": 6,
"timeUnits": "WORKING_DAYS"
}
]
}
Response
{
"errors": [
{
"code": "WHSC-001",
"message": "No warehouse exists with id 30. Please provide valid warehouse id."
},
{
"code": "WHSC-225",
"message": "Something went wrong, please double check external transfer sla value is missing or invalid."
}
]
}
Example 8
Request URI
/warehouse
Request body
{
"name": "Glasgow Central",
"type": "warehouse",
"address": {
"addressId": 1
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 2,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 3,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 4,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 5,
"openingHours": "10:00:00",
"closingHours": "18:00:00"
},
{
"dayOfWeek": 6,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 7,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
}
]
},
"collectionSla": {
"value": 2,
"timeUnits": "HOURS"
},
"externalTransferSlas": [
{
"warehouseId": 4,
"value": 2,
"timeUnits": "DAYS"
},
{
"warehouseId": 4,
"value": 4,
"timeUnits": "DAYS"
},
{
"warehouseId": 0,
"value": 6,
"timeUnits": "WORKING_DAYS"
}
]
}
Response
{
"errors": [
{
"code": "WHSC-224",
"message": "You must provide unique warehouse id for external transfer warehouse sla."
}
]
}
Example 9
Request URI
/warehouse
Request body
{
"name": "New Glasgow Central",
"type": "warehouse",
"address": {
"addressId": 1
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "09:30:00",
"closingHours": "17:31:00"
},
{
"dayOfWeek": 2,
"openingHours": "09:29:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 3,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 4,
"openingHours": "00:00:00",
"closingHours": "00:00:00"
},
{
"dayOfWeek": 5,
"openingHours": "17:15:00",
"closingHours": "23:58:00"
},
{
"dayOfWeek": 6,
"openingHours": "09:00:00",
"closingHours": "17:30:00"
},
{
"dayOfWeek": 7,
"openingHours": "17:00:00",
"closingHours": "23:59:00"
}
]
},
"collectionSla": {
"value": 2,
"timeUnits": "HOURS"
},
"externalTransferSlas": [
{
"warehouseId": 4,
"value": 2,
"timeUnits": "DAYS"
},
{
"warehouseId": 5,
"value": 4,
"timeUnits": "WORKING_DAYS"
},
{
"warehouseId": 0,
"value": 6,
"timeUnits": "WORKING_DAYS"
}
]
}
Response
{
"errors": [
{
"code": "WHSC-229",
"message": "Operating hours are not in 30-minute intervals for the following day:[1, 2, 5]"
}
]
}