Skip to main content

Location API

Manage locations for inventory and operational tracking. Locations represent physical places where inventory is stored or business operations occur.

Endpoints

MethodEndpointDescription
GET/record/v1/locationList all locations
GET/record/v1/location/{id}Get a specific location by ID
POST/record/v1/locationCreate a new location
PATCH/record/v1/location/{id}Update an existing location
DELETE/record/v1/location/{id}Delete a location

Key Fields

Required Fields

FieldTypeDescriptionRequired
nameStringLocation nameYes

Optional Fields

FieldTypeDescriptionRequired
subsidiaryObject/ArraySubsidiary or subsidiaries where this location is availableNo
parentObjectParent location (for location hierarchy)No
includeChildrenBooleanInclude child locations in reportsNo
isInactiveBooleanWhether the location is inactiveNo
usesBinsBooleanWhether this location uses bin managementNo
makeInventoryAvailableBooleanMake inventory available for commitmentNo
makeInventoryAvailableStoreBooleanMake inventory available for store pickupNo
addr1StringAddress line 1No
addr2StringAddress line 2No
addr3StringAddress line 3No
cityStringCityNo
stateObject/StringState/provinceNo
zipStringPostal/ZIP codeNo
countryObjectCountryNo
addrPhoneStringPhone numberNo
mainAddressObjectMain address (structured address object)No
returnAddressObjectReturn addressNo

Example: Create Location

Request

POST /record/v1/location
Content-Type: application/json
{
"name": "West Coast Warehouse",
"subsidiary": [
{"id": "1"},
{"id": "2"}
],
"parent": {
"id": "5"
},
"includeChildren": true,
"isInactive": false,
"usesBins": true,
"makeInventoryAvailable": true,
"makeInventoryAvailableStore": false,
"addr1": "456 Storage Drive",
"city": "Los Angeles",
"state": {
"id": "CA"
},
"zip": "90001",
"country": {
"id": "US"
},
"addrPhone": "+1-310-555-0100"
}

Response

{
"id": "15",
"name": "West Coast Warehouse",
"subsidiary": [
{
"id": "1",
"refName": "Parent Company"
},
{
"id": "2",
"refName": "US Subsidiary"
}
],
"parent": {
"id": "5",
"refName": "West Region"
},
"includeChildren": true,
"isInactive": false,
"usesBins": true,
"makeInventoryAvailable": true,
"makeInventoryAvailableStore": false,
"addr1": "456 Storage Drive",
"city": "Los Angeles",
"state": {
"id": "CA",
"refName": "California"
},
"zip": "90001",
"country": {
"id": "US",
"refName": "United States"
},
"addrPhone": "+1-310-555-0100",
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/location/15"
}
]
}

Example: Update Location

Request

PATCH /record/v1/location/15
Content-Type: application/json
{
"makeInventoryAvailableStore": true,
"addrPhone": "+1-310-555-0200"
}

Response

{
"id": "15",
"name": "West Coast Warehouse",
"makeInventoryAvailableStore": true,
"addrPhone": "+1-310-555-0200",
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/location/15"
}
]
}

Query Filters

You can filter locations using query parameters:

Filter by Subsidiary

GET /record/v1/location?q=subsidiary.id ANYOF 1,2

Filter by Active Status

GET /record/v1/location?q=isInactive IS false

Filter by Parent Location

GET /record/v1/location?q=parent.id IS 5

Filter by Bin Usage

GET /record/v1/location?q=usesBins IS true

Filter by Inventory Availability

GET /record/v1/location?q=makeInventoryAvailable IS true

Search by Name

GET /record/v1/location?q=name CONTAINS Warehouse

Get Top-Level Locations

GET /record/v1/location?q=parent.id IS EMPTY

Complex Filter Example

GET /record/v1/location?q=subsidiary.id ANYOF 1 AND isInactive IS false AND makeInventoryAvailable IS true

Pagination and Sorting

GET /record/v1/location?limit=50&offset=0&orderby=name ASC

Important Notes

  1. Location Feature: Locations must be enabled in Setup > Company > Enable Features > Items & Inventory > Use Locations.

  2. Subsidiary Association: In OneWorld accounts, assign locations to specific subsidiaries to control where they can be used.

  3. Location Hierarchy: Use parent locations to create organizational structures (e.g., Region > Warehouse > Aisle).

  4. Bin Management: When usesBins is true, this location supports bin-level inventory tracking for more granular control.

  5. Inventory Availability: The makeInventoryAvailable flag determines whether inventory at this location can be committed to sales orders.

  6. Store Pickup: Set makeInventoryAvailableStore to true for retail locations that support in-store pickup for online orders.

  7. Include Children: When includeChildren is true, reports will aggregate child location data into the parent.

  8. Deletion Restrictions: Locations with inventory or used in transactions cannot be deleted. Mark them as inactive instead.

  9. Permissions: Requires "Lists > Locations" permission in NetSuite.

  10. Multi-Location Inventory: Locations are essential for businesses managing inventory across multiple warehouses, stores, or sites.

  11. Transfer Orders: Locations are used in transfer orders to move inventory between facilities.

  12. Address Information: Maintain accurate address data as it's used for shipping, tax calculations, and compliance reporting.