Location Subscription API v1 (deprecated)

🚧

Location Subscription API is deprecated

Please migrate to the Business Subscriptions API

❗️

Deprecated Version

This page describes the deprecated v1 Version of the Location Subscription API. It's deprecated and will be removed in the future.

Please start migrating your clients to use the new version. New Location Subscription API v2 Docs

Overview

Location Subscription is the system that generates data on Yelp businesses and stores it on Amazon S3 buckets. Partners can use the Location Subscription API to modify the list of businesses that appear in their subscription feed. The API has add, remove, list, and quota endpoints.

Authentication

Authentication uses basic HTTP authentication over SSL. Credentials are provided separately.

Endpoints

POST /syndication/feed/add

This endpoint is used to add business IDs to the subscription list. The post accepts a JSON list of business IDs mapped to the key 'biz_ids'.

Request Body Parameters

Field NameField Description
biz_idslist of encrypted business IDs to add to the daily subscription feed. This endpoint support max 1000 business IDs per query.
curl -H "Content-Type: application/json" \
     -X POST \
     -d '{"biz_ids":["bzRqPKp63X0u6fUtbg"]}' \
     --user "<user>:<password>" \
     "https://partner-api.yelp.com/syndication/feed/add"

Response Body Parameters

Field NameField Description
newnew IDs that were inserted into the database
reactivatedIDs that were disabled and are now re-enabled
already_activeIDs that were already active in this query
{
  "new": [], 
  "reactivated": [], 
  "already_active": []
}

POST /syndication/feed/remove

This endpoint is used to disable business IDs from the subscription list. The post accepts a list of business IDs mapped to the key "biz_ids".
Response Body Parameters

Field NameField Description
biz_idslist of business IDs to add to the daily subscription feed
curl -H "Content-Type: application/json" \
     -X POST \
     -d '{"biz_ids":["VXi7gzRqPKp63X0u6fUtbg"]}' \
     --user "<user>:<password>" \
     "https://partner-api.yelp.com/syndication/feed/remove"

Response Params

Field NameField Description
statusStatus of disabling business IDs
{
  "status": "completed"
}

GET /syndication/feed/quota

This endpoint is gets quota information. Takes in no parameters.

Request Params
None

curl -X GET \
     -H "Accept: application/json" \
     -H "Content-type: application/json" \
     --user "<user>:<password>" \
     "https://partner-api.yelp.com/syndication/feed/quota"

Response Params

Field NameField Description
number_of_active_businessesnumber of currently active businesses
{
  "number_of_active_businesses": 17
}

GET /syndication/feed/list

This endpoint is used to get the list of subscription business IDs. The two query params have default values of 0.

Request Query Parameters

limitnumber of business IDs returned on this request, maximum 1000
offsetposition of first business ID returned on this request, minimum 0
curl -X GET \
     -H "Accept: application/json" \
     -H "Content-type: application/json" \
     --user "<user>:<password>" \
     "https://partner-api.yelp.com/syndication/feed/list?limit=1&offset=1"

Response Parameters

Field NameField Description
biz_idlist of business IDs returned by this query
{
  "biz_ids": ["VXi7gzRqPKp63X0u6fUtbg"]
}

Error Codes

Error NameError Description
ADDITION_EXCEEDS_BIZ_QUOTAThe new additions would exceed the business quota.
BAD_POST_BODYA list mapped to the key "biz_ids" is required in the request body.
BIZ_ID_LIST_TOO_LARGEThe biz id list is larger than the maximum size of 1000.
INVALID_LIMIT_VALUEThe limit must be greater than 0 and less or equal to 10000.
INVALID_JSON_OBJECTThe request body could not be parsed into a JSON object.
INVALID_OFFSET_VALUEThe offset must be greater or equal to 0.
INVALID_QUERY_PARAM_TYPEQuery parameters must be of type integer.
INVALID_IDS_IN_POST_BODYThe post body contains invalid business IDs.
REMOVE_EXCEEDS_LIMITThe remove call exceeds the yearly remove limit.

Response Params

Field NameField Description
errorerror object generated by this request
error.messagemessage describing the error
error.codeerror code associated with this error
error.invalid_idsinvalid IDs in the post body (used for add/remove endpoints)
{
  "error": {
    "message": "The post body contains invalid business ids", 
    "code": "INVALID_IDS_IN_POST_BODY",
    "invalid_ids": ["VXi7gzRqPKp63X0"] 
  }
}