Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create warehouses

Bulk-creates warehouses. Successful entities are returned in data; per-item failures in errors keyed by slug.

POST/api/v2/{team_slug}/{app_slug}/warehouses
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
warehousesCreateWarehouseItem[]required
min items 1 · max items 20
Show properties
Array of CreateWarehouseItem
namestringrequired
slugstringrequired
available_onlineboolean
addressWarehouseAddressInput | null
Show properties
Any of:
WarehouseAddressInput
street_addressstringrequired
citystringrequired
statestringrequired
countrystringrequired
postal_codestringrequired
null
null
Responses
201

Created (partial success possible)

dataWarehouse[]required
Show properties
Array of Warehouse
idUUIDrequired
namestringrequired
slugstringrequired
available_onlineboolean
addressWarehouseAddress | null
Show properties
Any of:
WarehouseAddress
street_addressstring
citystring
statestring
postal_codestring
countrystring
null
null
marketsWarehouseMarket[]
Show properties
Array of WarehouseMarket
idUUIDrequired
namestring
slugstring
created_atstring<date-time>required
updated_atstring<date-time> | null
errorsWarehouseError[]required
Show properties
Array of WarehouseError
slugstring
idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
messagestringrequired
400

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
401

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
403

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
500

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v2/string/string/warehouses' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "warehouses": [
    {
      "name": "string",
      "slug": "string",
      "available_online": true,
      "address": {
        "street_address": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "postal_code": "string"
      }
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "slug": "string",
      "available_online": true,
      "address": {
        "street_address": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string",
        "country": "string"
      },
      "markets": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "slug": "string"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "slug": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "message": "string"
    }
  ]
}