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.

Body·

required
application/json
  • Maximum 20 per request.

    Properties: 7

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v2/facilities/bulk
curl https://api.prod.goaugment.com/v2/facilities/bulk \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "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",
      "notes": ""
    }
  ]
}'
{
  "total": 2,
  "successCount": 1,
  "failureCount": 1,
  "results": [
    {
      "index": 0,
      "status": "SUCCESS",
      "externalId": "string",
      "facilityId": "string",
      "error": "string"
    }
  ]
}