Models

Location Model


object "location"
The description of the model.

id string
The unique ID of the location prefixed with loc_.

name string
The display name of this location.

code string
A unique identifier code assigned to a location within an organization.

email string
The email address associated with this location.

address Address
The address details of this location.

provider_instructions string
Instructions for service providers regarding pickup or delivery at this location.

created_at integer
Time in epoch seconds when this resource was created.

holidays object
Currently a placeholder property for future implementation of holiday-based operating hours modifications.

metadata object
Custom key-value pairs for storing additional location data.

groups string[]
An array of group identifiers that this location belongs to.

operating_hours object
The days when the location is open and the hours for each day when this location is open. Object can contain following attributes

  • monday
  • tuesday
  • wednesday
  • thursday
  • friday
  • saturday
  • sunday

and above of each attribute is an object containing following attributes.

Show Details
active boolean
If the location is open on this day
open string
Opening time in 24-hour format (e.g., "09:30")
close string
Closing time in 24-hour format (e.g., "17:00")
ranges object[]
Time ranges accounting for overnight operations

ranges is again a nested object containing following attributes

Show Details
active boolean
If the location is open on this day
open string
Opening time in 24-hour format (e.g., "09:30")
close string
Closing time in 24-hour format (e.g., "17:00")



operating_hours_display object[]
A consolidated representation of operating hours that groups consecutive days with identical schedules. This field is automatically generated from the operating_hours data to provide a user-friendly display format.

Show Details
days string
A formatted string showing the range of days (e.g., "Monday - Friday" or "Saturday"). Days with identical schedules are grouped together, with the first and last day of each group displayed.
time string
The operating hours for the group in 12-hour format. Can be either:
- A single range (e.g., "9:00 AM to 5:00 PM")
- Multiple ranges joined by "&" for split schedules (e.g., "9:00 AM to 12:00 PM & 1:00 PM to 5:00 PM")
- "Closed" if the location is not active during these days.

Example Response:

js
        [
  {
    "days": "Monday - Friday",
    "time": "9:00 AM to 5:00 PM"
  },
  {
    "days": "Saturday - Sunday",
    "time": "Closed"
  }
]

      

This field provides a simplified view of operating hours that's ideal for display purposes, condensing the more detailed operating_hours data structure into an easily readable format.


organization_id string
The unique identifier of the organization that owns this location.

service_levels string[]
Available service levels at this location. See service levels for more details.

updated_at integer
Time in epoch seconds when this resource was last updated.

updated_by string
The ID of the user or key who last updated the location.

users Array<String>
User IDs with access to this location. The owner role have access to all locations by default.

checksum string
A hash value computed from the current location configuration. This value gets updated whenever the location updates.

easy_post_api_key String
Your easy post API key. Add test key for test environment and Production key for production.

ups_carrier_account_id String
UPS Carrier account ID, which belongs to the same account as your easypost API key. "ca_.."

ups_surepost_carrier_account_id String
UPS surepost carrier account ID.

usps_carrier_account_id String
USPS Carrier account ID, which belongs to the same account as your easypost API key. "ca_.."

fedex_carrier_account_id String
FedEx Carrier account ID, which belongs to the same account as your easypost API key. "ca_.."

dhl_carrier_account_id String
DHL Carrier account ID, which belongs to the same account as your easypost API key. "ca_.."

settings object
Configuration settings for the location, primarily focusing on notifications.

Show Details
settings.notifications.type string
The type of notification being configured.
settings.notifications.enabled boolean
Whether this notification type is enabled for the location. Defaults to false.
settings.notifications.use_organization_rules boolean
Whether to use organization-level notification rules instead of location-specific rules. Defaults to true.
settings.notifications.limit_to_operating_hours boolean
Whether notifications should only be sent during the location's operating hours. Defaults to true.
settings.notifications.batch_interval string
The interval for batching notifications, formatted as "mins_XXXX" (e.g., "mins_0005" for 5 minutes). Defaults to mins_0005.
settings.notifications.reminder object
Configuration for reminder notifications.
settings.notifications.rules object[]
Active notification rules for this type. Can be either organization-level or location-specific rules based on use_organization_rules.
settings.notifications._available_rules object[]
Available rules that can be enabled for this notification type. Follows the same structure as rules

reminder.count string
Number of reminders to send, formatted as "count_XXX" (e.g., "count_000"). Defaults to count_000
reminder.interval string
Time between reminders, formatted as "days_XXX" (e.g., "days_001"). Defaults to days_001

rules.id string
Unique identifier for the rule.
rules.object string
Will always be notification_rule
rules.level string
Either organization or location
rules.methods object
Notification delivery methods.
rules.notification_template object
Template details for the notification.

methods.email boolean
Whether email notifications are enabled.
rules.sms boolean
Whether SMS notifications are enabled.

notification_template.id string
Template identifier.
notification_template.name string
Template name.
notification_template.type string
Notification type.
notification_template.entity string
Entity type the notification relates to.
notification_template.scenario string
Specific scenario triggering the notification.
notification_template.events object
Event configurations that trigger the notification.

_search object
A special property that will be included if searching through locations. This is a flat object that contains various properties related to the search results. Each property may include <mark> tags around characters that have matched the search query, allowing for easy highlighting in the user interface. The properties within this object provide relevant information about the search results, such as group names, location name, location code, metadata, relevance score, and the original query used for the search.

Show Details
_search.group_names string[]
The names of the groups associated with the location.
_search.name string
Location name.
_search.code string
Location code.
_search.relevance_score number
A numeric value between 0 and 1 that indicates the relevance of a search result to the query, where 1 represents a perfect match and higher values indicate better matches.
_search.query string
The original search query used to find matching locations.


Location Cache Model

Since locations are frequently accessed for user controls, pickup types, and addresses, it's important that these requests are able to be quick. We create a special cache object for locations that includes these frequently accessed properties for all locations at once. organization_id string
The unique identifier of the organization that owns this location.

locations object
A dictionary of location cache records, where the key is the location ID and the value is the cached location data.


address_hash string
A hash value of the address data for quick comparison and validation.

address_id string
The unique identifier for the location's address.

formatted_address string
The complete, formatted address string.

address_textarea string
The text area string for the address, which excludes the line2 property.

address_line2 string
The line2 property for the address. Additional address details (suite, unit, etc.).

id string
The unique identifier of the location.

name string
The display name of the location.

pickup_types Array.<pickup_types>
The pickup types that are available at this location.

users string[]
An array of IDs of users who have access to this location. The owner and developer roles have access to all locations by default.

service_levels string[]
Available service levels at this location.

easy_post_api_key string
Your easy post API key. Add test key for test environment and Production key for production.