Skip to main content
POST
/
api
/
v3
/
admin
/
stock_locations
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const stockLocation = await client.stockLocations.create({
  name: 'Brooklyn warehouse',
  kind: 'warehouse',
  country_iso: 'US',
  state_abbr: 'NY',
  city: 'Brooklyn',
  zipcode: '11201',
  pickup_enabled: true,
  pickup_stock_policy: 'local',
  pickup_ready_in_minutes: 60,
})
{
  "id": "sloc_gbHJdmfrXB",
  "state_abbr": null,
  "name": "Manhattan store",
  "address1": null,
  "city": null,
  "zipcode": null,
  "country_iso": null,
  "country_name": null,
  "state_text": null,
  "admin_name": null,
  "address2": null,
  "state_name": null,
  "phone": null,
  "company": null,
  "active": true,
  "default": false,
  "backorderable_default": false,
  "propagate_all_variants": false,
  "kind": "store",
  "pickup_enabled": true,
  "pickup_stock_policy": "local",
  "pickup_ready_in_minutes": 30,
  "pickup_instructions": null,
  "created_at": "2026-05-17T22:58:22.489Z",
  "updated_at": "2026-05-17T22:58:22.489Z"
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Body

application/json
name
string
required
Example:

"Brooklyn warehouse"

admin_name
string | null

Internal name shown only in the admin

active
boolean
Example:

true

default
boolean

Setting to true demotes the previous default.

kind
enum<string>

Categorizes the location.

Available options:
warehouse,
store,
fulfillment_center
Example:

"warehouse"

propagate_all_variants
boolean
backorderable_default
boolean
address1
string | null
address2
string | null
city
string | null
zipcode
string | null
phone
string | null
company
string | null
country_iso
string | null

ISO-3166 alpha-2 country code (e.g. "US").

state_abbr
string | null

State / province abbreviation (e.g. "NY"). Resolved against the selected country.

state_name
string | null

Free-text state for countries without a states list.

pickup_enabled
boolean
pickup_stock_policy
enum<string>

'local' = items at this location only; 'any' = transfer-eligible (ship-to-store).

Available options:
local,
any
pickup_ready_in_minutes
number | null
Required range: x >= 0
pickup_instructions
string | null

Response

stock location created

id
string
required
state_abbr
string | null
required
name
string
required
address1
string | null
required
city
string | null
required
zipcode
string | null
required
country_iso
string | null
required
country_name
string | null
required
state_text
string | null
required
admin_name
string | null
required
address2
string | null
required
state_name
string | null
required
phone
string | null
required
company
string | null
required
active
boolean
required
default
boolean
required
backorderable_default
boolean
required
propagate_all_variants
boolean
required
kind
string
required
pickup_enabled
boolean
required
pickup_stock_policy
string
required
pickup_ready_in_minutes
number | null
required
pickup_instructions
string | null
required
created_at
string
required
updated_at
string
required