Back to Aligni.com

POST /api/v2/:api_token/inventory_location
Create a new inventory location.

Also see show action for detailed XML inventory location response example.

Create a new inventory location. Each inventory location must have at least one sublocation.

Required permission: Can manage data.

Examples

# request
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<inventory_location>
  <name>Aligni</name>
  <shortname>ALGN</shortname>
  <timezone>Pacific Time (US & Canada)</timezone>
  <description>Aligni storage</description>
  <inventory_sublocations type='array'>
    <inventory_sublocation>
      <name>Pearl District</name>
      <has_bins>true</has_bins>
    </inventory_sublocation>
    <inventory_sublocation>
      <name>Central Eastside</name>
      <has_bins>false</has_bins>
    </inventory_sublocation>
  </inventory_sublocations>
</inventory_location>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/inventory_location

# response (for detailed inventory location XML see show action)
<inventory_location>
  ...
</inventory_location>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

GET /api/v2/:api_token/inventory_location
List inventory locations.

Retrieve the list of all inventory locations.

Required permission: Can view inventory.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/inventory_location

# response
<?xml version="1.0" encoding="UTF-8"?>
<inventory_locations>
  <inventory_location>
    <id>1</id>
    <name>Headquarters</name>
    <shortname>CDHQ</shortname>
    <timezone>Pacific Time (US & Canada)</timezone>
    <description>Consolidated Diversified Headquarters</description>
    <phone1>908.687.5309</phone1>
    <phone2></phone2>
    <address1>123 Pollo del Mar</address1>
    <address2></address2>
    <city>Peoria</city>
    <state>IL</state>
    <postcode>61605</postcode>
    <country>USA</country>
    <created_on>2006-03-09 18:57:37 -0800</created_on>
    <updated_on>2006-03-09 18:58:56 -0800</updated_on>
  </inventory_location>
  ...
</inventory_locations>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

GET /api/v2/:api_token/inventory_location/:id
Show an inventory location.

Retrieve one particular inventory location by its id.

Required permission: Can view inventory.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/inventory_location/1

# response
<?xml version="1.0" encoding="UTF-8"?>
<inventory_location>
  <id>1</id>
  <name>Headquarters</name>
  <shortname>CDHQ</shortname>
  <timezone>Pacific Time (US & Canada)</timezone>
  <description>Consolidated Diversified Headquarters</description>
  <phone1>908.687.5309</phone1>
  <phone2></phone2>
  <address1>123 Pollo del Mar</address1>
  <address2></address2>
  <city>Peoria</city>
  <state>IL</state>
  <postcode>61605</postcode>
  <country>USA</country>
  <created_on>2006-03-09 18:57:37 -0800</created_on>
  <updated_on>2006-03-09 18:58:56 -0800</updated_on>
  <inventory_sublocation>
    <id>5</id>
    <name>Bin 10</name>
  </inventory_sublocation>
  ...
</inventory_location>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

PUT /api/v2/:api_token/inventory_location/:id
Update a inventory location.

Also see show action for detailed XML inventory location response example.

Updates a inventory location record.

Required permission: Can manage data.

Examples

# request
curl -X PUT -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<inventory_location>
  <name>Aligni Inc.</name>
</inventory_location>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/inventory_location/4

# response (for detailed inventory location XML see show action)
<inventory_location>
  ...
</inventory_location>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

DELETE /api/v2/:api_token/inventory_location/:id
Delete a inventory location.

Delete a inventory location by its id.

Required permission: Can manage data.

Examples

# request
curl -X DELETE -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/inventory_location/4

# no response

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.