commerce/admin/locations

Use the Locations resource to manage each physical location associated with a tenant. Locations enable tenants to associate a physical address with product inventory, provide a store finder for in-store pickup, or both. Locations that support inventory can use both direct ship and in-store pickup fulfillment types.

JSON Example

Location Properties

Property Description
address

type: address

Address information to supply for a contact.

address.address1

type: string

Physical or mailing address line one. Usually includes the street number and street name or it could be a P.O. Box. Max length: 200.

address.address2

type: string

Physical or mailing address line two. Usually supplements the main street address with apartment, floor, suite, building, or unit information. Max length: 200.

address.address3

type: string

Physical or mailing address line three. Max length: 200.

address.address4

type: string

Physical or mailing address line four. Max length: 200.

address.addressType

type: string

The type of address, which is commercial or residential.

address.cityOrTown

type: string

The entered city or town for the address.

address.countryCode

type: string

The 2-letter geographic code representing the country for the physical or mailing address. Currently limited to the US.

address.isValidated

type: bool

Indicates if the address has been validated. If true, the address has been verified by an address validation service.

address.postalOrZipCode

type: string

The entered zip or postal code for an address.

address.stateOrProvince

type: string

The entered state or province for an address.

allowFulfillmentWithNoStock

type: bool

Allow fullfillment with no (or less) stock

code

type: string

The unique identifier of the object.

description

type: string

The localized description in text for the object, displayed per the locale code. For example, descriptions are used for product descriptions, attributes, and pre-authorization transaction types.

fax

type: string

The fax number associated with this location.

fulfillmentTypes

type: list of fulfillmentType

List of order fulfillment types associated with this location. The location can have fulfillment types of direct ship (DS), in-store pickup (SP), or both.

fulfillmentType.code

type: string

The unique identifier of the object.

fulfillmentType.name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

geo

type: coordinates

The geographical coordinates associated with this location.

coordinates.lat

type: double

The latitude coordinate of the location.

coordinates.lng

type: double

The longitude coordinate of the location.

isDisabled

type: bool

Locations is disabled (soft delete)

locationTypes

type: list of locationType

List of location types associated with this location. You can associate individual locations with any number of location types.

locationType.code

type: string

The unique identifier of the object.

locationType.name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

note

type: string

User-entered notation content for an object, used to save information such as payment, return, account, and order notes.

phone

type: string

Phone number information for a contact.

regularHours

type: regularHours

Array list of standard operating hours for each day of the week this location is open for shopper business.

regularHours.friday

type: hours

The Friday label array describes the range of hours this location is normally open on Fridays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.monday

type: hours

The Monday label array describes the range of hours this location is normally open on Mondays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.saturday

type: hours

The Saturday label array describes the range of hours this location is normally open on Saturdays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.sunday

type: hours

The Sunday label array describes the range of hours this location is normally open on Sundays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.thursday

type: hours

The Thursday label array describes the range of hours this location is normally open on Thursdays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.tuesday

type: hours

The Tuesday label array describes the range of hours this location is normally open on Tuesdays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

regularHours.wednesday

type: hours

The Wednesday label array describes the range of hours this location is normally open on Wednesdays. For example: {"Label": "10:00 AM - 6:00 PM"}.

regularHours.hours.label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

shippingOriginContact

type: shippingOriginContact

Properties of a fulfillment contact for the shipping origin address associated with a location.

shippingOriginContact.companyOrOrganization

type: string

The entered company or organization name entered for a customer account.

shippingOriginContact.email

type: string

The email address for the customer account and contact. This email may be used for login to the storefront, receiving in-stock product notifications, and subscription mailing lists.

shippingOriginContact.firstName

type: string

The full first name of a customer or contact name.

shippingOriginContact.lastNameOrSurname

type: string

The full last name or surname of a customer or contact name.

shippingOriginContact.middleNameOrInitial

type: string

Character string of the middle name or initial for the customer.

shippingOriginContact.phoneNumber

type: string

Collection of phone numbers associated with the shipping origin contact.

supportsInventory

type: bool

If true, this location maintains its own product inventory. If the location uses the direct ship fulfillment type, it must also support inventory.

tags

type: list of string

List of tenant-defined tags associated with this location.

Operations

Operation Name Request URI Description
AddLocation POST %3fresponseFields%3d%7bresponseFields%7d

Creates a new physical location for the tenant specified in the request header.

DeleteLocation DELETE %7blocationCode%7d

Deletes the location specified in the request.

GetLocation GET %7blocationCode%7d%3fresponseFields%3d%7bresponseFields%7d

Retrieves the details of the location specified in the request by location code.

GetLocations GET %3fstartIndex%3d%7bstartIndex%7d%26pageSize%3d%7bpageSize%7d%26sortBy%3d%7bsortBy%7d%26filter%3d%7bfilter%7d%26responseFields%3d%7bresponseFields%7d

Retrieves a list of all locations associated with a tenant, according to any filter and sort criteria specified in the request.

UpdateLocation PUT %7blocationCode%7d%3fresponseFields%3d%7bresponseFields%7d

Updates one or more details of a the location specified in the request by location code.