Warehouse PUT
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
Updates a set of Warehouses.
You can only update a Warehouse's:
-
Name
NOTE: If you do not supply a name the existing name is used.
-
AddressId - Allows you to change the Warehouse's address to another Postal Address.
NOTE: If you do not supply an addressId the existing addressId is used.
-
Click and collect settings
NOTE: unless clickAndCollectEnabled is explicitly sent as true, it will be set as false, and any weeklyOperatingPeriods data will be removed. If clickAndCollectEnabled is set to true then valid weeklyOperatingPeriods details (includig a valid timeZone value) and valid collectionSla details must also be sent, otherwise a validation error response will be returned.
-
typeCode
-
typeDescription
Example 1
Request URI
/warehouse/
Request body
{
"warehouses": [
{
"name": "A new Warehouse name",
"id": 2,
"address": {
"addressId": 22
}
}
]
}
Response
{
}
Example 2
Request URI
/warehouse/
Request body
{
"warehouses": [
{
"name": "Updated Warehouse name",
"id": 27,
"typeCode": "warehouse",
"address": {
"addressId": 22
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "10: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
{
}
Example 3
Request URI
/warehouse/
Request body
{
"warehouses": [
{
"name": "Piping",
"id": 2,
"address": {
"addressId": 22
}
},
{
"name": "Wand Stores",
"id": 3
},
{
"name": "Boiler Spares",
"id": 8,
"address": {
"addressId": 55
}
}
]
}
Response
{
}
Example 4
Request URI
/warehouse/
Request body
{
"warehouses": [
{
"name": "Updated warehouse name",
"id": 27,
"typeCode": "warehouse",
"address": {
"addressId": 22
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 8,
"openingHours": "11:00:00",
"closingHours": "08:00: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
{
"errors": [
{
"code": "WHSC-218",
"message": "Something went wrong, please double check your operating day of the week."
},
{
"code": "WHSC-221",
"message": "Something went wrong, please double check closing hours should not be before opening hours."
}
]
}
Example 5
Request URI
/warehouse/
Request body
{
"warehouses": [
{
"name": "Updated Warehouse name",
"id": 27,
"typeCode": "warehouse",
"address": {
"addressId": 22
},
"clickAndCollectEnabled": true,
"weeklyOperatingPeriods": {
"timeZone": "Europe/London",
"periods": [
{
"dayOfWeek": 1,
"openingHours": "10:00:00",
"closingHours": "17:33:00"
},
{
"dayOfWeek": 2,
"openingHours": "09:58: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": "15:30:00",
"closingHours": "23:58:00"
},
{
"dayOfWeek": 6,
"openingHours": "17:30:00",
"closingHours": "23:59: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
{
"errors": [
{
"code": "WHSC-229",
"message": "Operating hours are not in 30-minute intervals for the following day:[1, 2, 5]"
}
]
}