Location API (v0)
Download OpenAPI specification:Download
This API represents a physical location in NewStore, such as a DC or a store, that you can operate from.
Important: Do not confuse this resource with the Stock locations resource, which represents virtual or physical stock locations. Use this resource to manage inventory or calculate stock on hand in your store, when NewStore is enabled as inventory master for the store.
Locations are created during a stock import
using the fulfillment_node_id
property. For a guide on creating locations (such as stores),
see this tutorial.
Important: Location type(DC or Store), location ID, or location store_id can't be updated after location creation. So, please ensure that the locations you are creating have the correct data.
Note: When you create a location for your business, the main stock location is created for the location by default.
When working with a store in your business, you can use this resource to enable NewStore as the inventory master for the store, instead of an ERP. To understand the difference between an ERP and NewStore as inventory master, see Choosing your inventory master.
You can also choose to stop a location from fulfilling orders using this resource. See Disabling locations.
Note: Only stores can use NewStore as inventory master, not DCs.
List locations
Retrieves a list of locations configured for your business. The maximum number of locations returned by this method is 2000.
Authorizations:
Responses
Response samples
- 200
- 500
{- "locations": [
- {
- "id": "US01",
- "is_inventory_master": false,
- "is_enabled": false,
- "type": "store"
}, - {
- "id": "US02",
- "is_inventory_master": true,
- "is_enabled": true,
- "type": "store"
}, - {
- "id": "DC01",
- "is_inventory_master": false,
- "is_enabled": true,
- "type": "dc"
}
]
}
Enable location as inventory master
Enables the specified location as inventory master.
When you enable a location as inventory master, NewStore is the inventory master in the store. NewStore manages all inventory-related operations and data for the store, instead of an ERP. This includes calculating stock on hand for the store using stock locations.
Important: NewStore does not support reverting to an ERP after you have enabled NewStore as inventory master in the store. Ensure that you want to use NewStore as inventory master before you switch from an ERP.
Related methods:
Authorizations:
path Parameters
id required | string The unique identifier of the location. The location ID is the same value that is provided for the
If the location ID contains special characters like spaces, encode the ID before using it. For example, encode the location ID |
Responses
Response samples
- 200
- 404
- 405
- 409
- 500
{- "id": "US01",
- "is_inventory_master": true,
- "is_enabled": true,
- "type": "store"
}
Enable location
Enables a specific location to start fulfilling orders.
When a location is enabled:
- Orders are routed to the location for fulfillment.
- ATP for products at the location are calculated again and displayed in NOM and for availability exports.
Note: To stop a location from fulfilling orders, use the Disable location method.
Authorizations:
path Parameters
id required | string The unique identifier of the location. The location ID is the same value that is provided for the
If the location ID contains special characters like spaces, encode the ID before using it. For example, encode the location ID |
Responses
Response samples
- 200
- 404
- 409
- 500
{- "id": "US01",
- "is_inventory_master": true,
- "is_enabled": true,
- "type": "store"
}
Disable location
Disables a specific location from fulfilling orders.
When a location is disabled:
Orders are not routed to the location for fulfillment.
ATP for products at this location is set to
0
in NOM and for availability exports. However, the values calculated for stock on hand, allocations, reservations, and safety stock quantities for products at the location stay unchanged.Important: The change in ATP for products in the location that was disabled may take some time to be displayed in NOM and the availability export data.
Note: Orders routed to the location before it was disabled are fulfilled via the usual process. Use NewStore Fulfillment App to reject these orders if needed.
Authorizations:
path Parameters
id required | string The unique identifier of the location. The location ID is the same value that is provided for the
If the location ID contains special characters like spaces, encode the ID before using it. For example, encode the location ID |
Responses
Response samples
- 200
- 404
- 409
- 500
{- "id": "US01",
- "is_inventory_master": true,
- "is_enabled": false,
- "type": "store"
}
Retrieve location
Retrieves all information about a location.
Authorizations:
path Parameters
id required | string The unique identifier of the location. The location ID is the same value that is provided for the
If the location ID contains special characters like spaces, encode the ID before using it. For example, encode the location ID |
Responses
Response samples
- 200
- 404
- 500
{- "id": "DC01",
- "is_inventory_master": false,
- "is_enabled": true,
- "type": "dc",
- "address": {
- "address_line_1": "60 Middle St",
- "address_line_2": "Suite 10",
- "city": "Boston",
- "country_code": "US",
- "phone": "502 921 0565",
- "state": "MA",
- "zip_code": "02111",
- "first_name": "Boston Warehouse"
}
}
Update DC location
Updates the information of an existing location. As of now only updates to locations of type 'dc' are allowed.
If you want to create a new location, please use the availability import first.
Authorizations:
path Parameters
id required | string The unique identifier of the location. The location ID is the same value that is provided for the
If the location ID contains special characters like spaces, encode the ID before using it. For example, encode the location ID |
Request Body schema: application/json
required | object The address of the location. | ||||||||||||||||||
|
Responses
Request samples
- Payload
{- "address": {
- "address_line_1": "60 Middle St",
- "address_line_2": "Suite 10",
- "city": "Boston",
- "country_code": "US",
- "phone": "502 921 0565",
- "state": "MA",
- "zip_code": "02111",
- "first_name": "Boston Warehouse"
}
}
Response samples
- 400
- 404
- 405
- 409
- 500
{- "error_code": "invalid_data",
- "message": "'address_line_1' is blank.",
- "request_id": "ec2f3c9bb016ba971bf6059188771a18"
}
Retrieve location by store id
Retrieves all information about a location with a given STORE ID.
Authorizations:
path Parameters
store_id required | string A unique identifier for a store. This |
Responses
Response samples
- 200
- 404
- 500
{- "id": "US01",
- "is_inventory_master": false,
- "is_enabled": true,
- "type": "store"
}