yDrink

yDrink Data API

Your yDrink data in your own systems, whenever you want it: the same datasets as our data feeds, with what changed and when.

Getting started

1. Your yDrink contact sends a one-time link to your key. Open it, press Show my key, and keep the key somewhere safe, like a secrets manager. It's shown once.

2. Send it on every request:

curl -H "Authorization: Bearer ydk_live_..." https://api.ydr.ink/v1/status

3. /v1/status lists the datasets you get, the periods each holds and your current version. Pull each dataset once, keep the version, and from then on pull only what changed (Staying in sync).

Keys and IP limits

Keys belong to your company, and you can have several (say one for production, one for testing). A key can be limited to your servers' IPs or ranges; ask your yDrink contact to set them. To replace a key, we send a new link, and the old key keeps working for a week after you open it, so you can switch without downtime. If a key gets out, tell us and we'll turn it off at once.

Staying in sync

Every response carries version (and the header X-Data-Version). The version goes up when your data is rebuilt and something in it changed.

GET /v1/changes?since=1041
{"version": 1077, "since": 1041, "full_refresh": false, "datasets": {
  "brand_monthly": {"full_refresh": false, "periods": ["2025-10-31", "...", "2026-09-30"], "from": "2025-10", "to": "2026-09"},
  "brand_weekly": {"full_refresh": false, "periods": ["202639", "202640", "202641", "202642"], "from": "202639", "to": "202642"},
  "accounts": {"full_refresh": false, "changed": true, "pull": "/v1/accounts?changed_since=1041"}}}

For each dataset, delete the listed periods on your side and pull them again with from and to. For accounts and merges, pull the rows changed since your version. Then keep the new version. When a dataset says full_refresh: true, pull all of that dataset again: it's new to you (say, a dataset just added to your service), its history was corrected, or since is 0. The top-level full_refresh is true when any dataset is. Usually the newest month plus the 11 before it, and the newest weeks, change with each update.

Apply merges too: /v1/accounts/merges lists accounts found to be the same place. Move your history from merged_id to surviving_id.

Dates and periods

Monthly rows carry sales_date, the last day of the month: 2026-09-30. Weekly rows carry yearweek, like 202642; weeks start on Sunday. In from and to, give months as 2026-09 and weeks as 202642.

Paging and CSV

Each response is one page of up to about 10000 rows. When there's more, next_cursor (and the header X-Next-Cursor) holds a cursor: send it back as ?cursor= with the same other parameters for the next page, until it's null. For CSV, add ?format=csv or send Accept: text/csv; the cursor is then only in X-Next-Cursor.

Limits and headers

Every answered response has X-RateLimit-Limit and X-RateLimit-Remaining (rows today) and X-RateLimit-Reset. Past 80% of the day's rows, pages are half size and responses carry a Warning header. A refused request gets 429 and Retry-After. Every response has X-Request-Id: quote it to support. /v1/usage shows your last 30 days.

Errors

Errors are JSON: {"error": {"code": "quota", "message": "...", "request_id": "..."}}. Match on code.

CodeStatusWhat it means
bad_key401No key, or a key that doesn't work (mistyped, replaced, expired or turned off).
ip_not_allowed403The key can't be used from this IP. yDrink adds IPs to a key.
paused403yDrink paused this key or your API access.
no_service403Your API service isn't active.
not_included403The dataset isn't part of your service.
not_found404No such endpoint.
bad_period400from or to isn't a month (YYYY-MM) or week (YYYYWW).
bad_parameter400A parameter isn't valid; the message says which.
bad_cursor400The cursor isn't from this dataset or query. Start again without one.
bad_version400changed_since is older than the change tracking. Pull everything once.
no_data_set409Your brand data isn't set up or published yet.
rate_limited429Too many requests this minute on this key. See Retry-After.
quota429Your company's rows for today are used up. Resets at midnight Central.
concurrent429Too many requests at once for your company. Retry after a few seconds.
error500Something went wrong on our side. Quote the request_id to support.

Endpoints

Status

GET /v1/status

Your datasets (included or not, and why), the periods each holds and when it was last updated, your version, product types and limits.

What changed

GET /v1/changes?since=<version>

Every period that changed since a version, per dataset. See Staying in sync.

Your usage

GET /v1/usage

Your requests, refusals and rows by day for the last 30 days, and your limits.

Products

GET /v1/products · Every API client.

Your products: every product in your brand data, with its brand, label, size and categories.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
FieldTypeWhat it is
product_idintegeryDrink's internal product id
brandstringMajor brand name: Crown Royal
labelstringMajor label name: Crown Royal Regal Apple
productstringyDrink's lowest product description; often the same as label
product_sizestringBottle size: 750ML, 1L, 12OZ
product_typestringLiquor, Wine, Beer or N/A
product_categorystringyDrink main category: Tequila, Whiskey, White, Red
product_sub_categorystringyDrink's lower category: Anejo, Scotch, Chardonnay, Pinot Noir
product_price_levelstringPrice point: Value, Mid, Premium, Super, Luxury
product_per_9l_casenumberBottles in a 9-liter case

Brand shipments, monthly

GET /v1/brand/monthly · Every API client.

Your products sold into each on-premise account, by month.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • from, to: months, like 2026-09
  • establishment_id: up to 1000 ids, comma separated
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
product_idintegeryDrink's internal product id
unitsintegerBottles sold into the account
casesnumber9-liter cases sold into the account
sales_datedateThe month, as its last day: 2026-09-30

Brand shipments, weekly

GET /v1/brand/weekly · Every API client.

Your products sold into each on-premise account, by week.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • from, to: weeks, like 202642
  • establishment_id: up to 1000 ids, comma separated
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
product_idintegeryDrink's internal product id
unitsintegerBottles sold into the account
casesnumber9-liter cases sold into the account
yearweekstringThe week, as YYYYWW: 202642. Weeks start on Sunday

Accounts

GET /v1/accounts · Every API client.

Every on-premise account by yDrink id, with its chain and segmentation.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • establishment_id: up to 1000 ids, comma separated
  • changed_since: a version, for only what changed since
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
tdlinx_codestringNielsen's account id. Only for clients with TDLinx access
coverage_indicatorinteger0 no coverage, 1 monthly coverage, 2 weekly coverage
namestringAccount name
chainstringChain name
corporatestringCorporation or chain owner
addressstringStreet address: 123 Main St
citystringCity: Austin
zipstring5-digit zip code: 78756
countystringCounty: Travis
statestringState: TX
segmentstringChannel: Dining, Bar/Nightclub
sub_segmentstringSub channel: Casual, Sports Bar
cuisinestringFood type: American, Cajun

Account merges

GET /v1/accounts/merges · Every API client.

Accounts found to be the same place: the old id and the id it was merged into. Move your history from merged_id to surviving_id.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • changed_since: a version, for only what changed since
FieldTypeWhat it is
merged_idintegerThe establishment id that no longer exists
surviving_idintegerThe establishment id it was merged into
merged_atstringWhen it was merged

Consumer spend

GET /v1/consumer-spend · With Integral or Consumer Spend.

Taxable alcohol dollars consumers spent at each on-premise account, by month (mixed beverage tax receipts).

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • from, to: months, like 2026-09
  • establishment_id: up to 1000 ids, comma separated
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
liquorintegerTaxable liquor dollars
wineintegerTaxable wine dollars
beerintegerTaxable beer dollars
totalintegerTotal taxable liquor, wine and beer dollars
sales_datedateThe month, as its last day: 2026-09-30

Marketslice, monthly

GET /v1/marketslice/monthly · At the highest tier.

The whole on-premise spirits market by account and category, by month.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • from, to: months, like 2026-09
  • establishment_id: up to 1000 ids, comma separated
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
product_categorystringyDrink main category: Tequila, Whiskey
product_sub_categorystringyDrink's lower category: Anejo, Scotch
product_price_levelstringPrice point: Value, Mid, Premium, Super, Luxury
unitsintegerMarket (all) bottles sold into the account
casesnumberMarket (all) 9-liter cases sold into the account
sales_datedateThe month, as its last day: 2026-09-30

Marketslice, weekly

GET /v1/marketslice/weekly · At the highest tier.

The whole on-premise spirits market by account and category, by week.

  • cursor: the last page's next_cursor
  • format=csv (or Accept: text/csv) for CSV
  • from, to: weeks, like 202642
  • establishment_id: up to 1000 ids, comma separated
FieldTypeWhat it is
establishment_idintegeryDrink's internal establishment (account) id
product_categorystringyDrink main category: Tequila, Whiskey
product_sub_categorystringyDrink's lower category: Anejo, Scotch
product_price_levelstringPrice point: Value, Mid, Premium, Super, Luxury
unitsintegerMarket (all) bottles sold into the account
casesnumberMarket (all) 9-liter cases sold into the account
yearweekstringThe week, as YYYYWW: 202642. Weeks start on Sunday

Field names follow the yDrink Data Integrations dictionary. Questions: your yDrink contact, or howdy@ydrink.net. Access is permitted under license. © yDrink. All rights reserved.