Supported Formats

json

Errors

Code Description
401 Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
403 Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource.
404 Not Found. The requested resource could not be found.
422 Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors.
500 Internal Server Error. An unexpected condition was encountered.

Examples

request:
  {
      "inventory_source": {
          "name": "Warehouse 1",
          "support_shipping": true,
          "inventory_locations": [
              {"name": "Location 1"}
          ]
      }
  }

response:
  {
    "id": 2,
    "name": "Warehouse 1",
    "support_shipping": true,
    "inventory_locations": [
      {
        "id": 1,
        "name": "Location 1"
      }
    ]
  }

Params

Param name Description
inventory_source
required

Validations:

  • Must be a Hash

inventory_source[name]
required

Name of the inventory source

Validations:

  • Must be a String

inventory_source[support_shipping]
optional , nil allowed

Indicate whether this inventory source support online order delivery

Validations:

  • Must be one of: true, false, 1, 0.

inventory_source[tag_list]
optional , nil allowed

List of tags for this inventory source

Validations:

  • Must be an array of String

inventory_source[inventory_location_ids]
optional , nil allowed

List of inventory location IDs that the inventory source has. Do not provide if ‘inventory_locations’ is provided

Validations:

  • Must be an array of Integer

inventory_source[inventory_locations]
optional

List of inventory locationss that the inventory source has. Do not provide if ‘inventory_location_ids’ is provided

Validations:

  • Must be an Array of nested elements

inventory_source[inventory_locations][name]
optional

Name of the inventory location

Validations:

  • Must be a String

inventory_source[inventory_locations][code]
optional

Code of the inventory location

Validations:

  • Must be a String

inventory_source[inventory_locations][delete]
optional

Remove this inventory location from the associations

Validations:

  • Must be one of: true, false, 1, 0.