id (its external id) and are processed independently: a row that fails is reported in failed with the reason, and every other row is still written. An id may appear only once. status is ACTIVE or INACTIVE; omitting it keeps an existing warehouse's status, and a new warehouse is active. name may be omitted for an existing warehouse, which keeps its name. Each row's distributor.id is required — a distributor is never resolved by name. A distributor with that id that does not exist yet is created, named from distributor.name; one that already exists is linked and is never renamed here. An existing warehouse cannot be moved to a different distributor — that row fails on its own.curl --location 'https://marketplacerest.perenso.net/v1/warehouses/bulk' \
--header 'Content-Type: application/json' \
--data '{
"warehouses": [
{
"id": "WH-BNE",
"name": "Brisbane DC",
"distributor": {
"id": "DIST-NORTH",
"name": "Northern Distribution"
},
"status": "ACTIVE"
},
{
"id": "WH-PER",
"distributor": {
"id": "DIST-WEST"
}
}
]
}'{
"successful": [
"WH-BNE"
],
"successfulItems": [
{
"id": "WH-BNE",
"entityId": "V2FyZWhvdXNlCmk5"
}
],
"failed": [
{
"id": "WH-PER",
"message": "Row 2: name is required"
}
]
}