Facility Management

Bulk create or update facilities

Create or update up to 20 facilities in one request. The response returns one result per input record, in the same order.

Every record is a whole-record replace, on the same terms as the single-facility route above. Omitted fields are cleared.

Records are processed independently. A record that fails a value check, such as a malformed email or an unknown country, is returned with status: FAILED and the rest still apply.

If any record is missing externalId or name, or has a field of the wrong type, the whole request is rejected with a 422 and nothing is written.

More than 20 facilities is rejected with a 400.

post/v2/facilities/bulk

Request

Request body

Example request

{
  "facilities": [
    {
      "externalId": "EXP-00142",
      "name": "Houston Distribution Center",
      "address": {
        "street1": "1200 W Loop S",
        "street2": "Suite 400",
        "city": "Houston",
        "stateOrProvince": "TX",
        "postalCode": "77027",
        "country": "US"
      },
      "email": "dock@example.com",
      "phone": "+17135550100",
      "phoneExtension": "204"
    }
  ]
}

Response

Bulk operation completed. Check each entry in results; a 200 does not mean every record succeeded.

totalinteger

Number of facilities in the request.

successCountinteger

Number written.

failureCountinteger

Number that failed.

Example response

{
  "total": 2
}

Changes

No recorded changes to this operation across all 1 revision of this API.