Skip to main content

List locations

x-api-key
string
required
Your API key.
GET https://eendorsements.com/api/v1/partner/locations
Returns a cursor-paginated list of locations belonging to your company. Only active locations are returned by default.

Query parameters

limit
integer
default:"50"
Number of records to return. Min 1, max 100.
cursor
string
Opaque pagination cursor returned in a previous response’s pagination.next_cursor.
active
string
default:"true"
Filter by status. Pass "false" to retrieve inactive locations. Omit for active only (default).

Response

{
  "locations": [
    {
      "id": 42,
      "slug": "downtown-denver",
      "name": "Downtown Denver",
      "active": true,
      "address": {
        "line1": "1600 Glenarm Place",
        "line2": "Suite 100",
        "city": "Denver",
        "state": "CO",
        "zip": "80202"
      },
      "profile_url": "https://eendorsements.com/branch/downtown-denver",
      "default_survey_url": "https://eendorsements.com/s/550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2024-01-10T09:00:00Z"
    }
  ],
  "pagination": {
    "count": 1,
    "has_more": false,
    "next_cursor": null
  }
}
locations
array
Array of location objects.
pagination
object

Get a location

GET https://eendorsements.com/api/v1/partner/locations/:slug
Returns a single location by its slug. The location must belong to your company.

Path parameters

slug
string
required
The location’s slug (e.g. downtown-denver).

Response

{
  "id": 42,
  "slug": "downtown-denver",
  "name": "Downtown Denver",
  "active": true,
  "address": {
    "line1": "1600 Glenarm Place",
    "line2": "Suite 100",
    "city": "Denver",
    "state": "CO",
    "zip": "80202"
  },
  "profile_url": "https://eendorsements.com/branch/downtown-denver",
  "default_survey_url": "https://eendorsements.com/s/550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2024-01-10T09:00:00Z"
}
Returns 404 if the slug is not found or does not belong to your company.

Create a location

POST https://eendorsements.com/api/v1/partner/locations
Content-Type: application/json
Creates a new location in your company.
A default review-request survey is automatically generated for the new location within a few seconds. Poll GET /locations/:slug to retrieve the default_survey_url once it’s ready.

Request body

name
string
required
Display name of the location (e.g. "Downtown Denver").
slug
string
URL-friendly identifier for the profile page. Auto-generated from the name if omitted.
address_1
string
Street address line 1.
address_2
string
Street address line 2 (suite, unit, etc.).
city
string
City.
state
string
State or province abbreviation (e.g. "CO").
zip
string
Postal code.
active
boolean
default:"true"
Whether the location should be active immediately.

Example request

{
  "name": "Downtown Denver",
  "address_1": "1600 Glenarm Place",
  "address_2": "Suite 100",
  "city": "Denver",
  "state": "CO",
  "zip": "80202"
}

Response 201 Created

{
  "id": 42,
  "slug": "downtown-denver",
  "name": "Downtown Denver",
  "active": true,
  "address": {
    "line1": "1600 Glenarm Place",
    "line2": "Suite 100",
    "city": "Denver",
    "state": "CO",
    "zip": "80202"
  },
  "profile_url": "https://eendorsements.com/branch/downtown-denver",
  "default_survey_url": null,
  "created_at": "2024-01-10T09:00:00Z"
}
default_survey_url will be null immediately after creation while the survey is being provisioned. Fetch the location again after a few seconds to get the URL.

Error codes

StatusMeaning
401Missing or invalid API key
422Validation error — see the error field
500Internal server error