# Get your API key

You get your key yourself, in this portal. No email, no waiting for approval.

## Steps

1. Sign in with Google or an email and password.
2. Go to **Account**.
3. Select **Register a storefront** and fill in the form (fields below).
4. Open your new storefront and select **Create a key**: give it a name and, optionally, the
   day it stops working. A key works for at most 90 days; without a day, it stops working 90
   days after you create it.
5. Copy the key once, into your server's secret store. It is shown only at creation and cannot
   be read again.

## Storefront fields

| Field | Required | Rules |
|---|---|---|
| Display name | Yes | At most 60 characters. Letters A to Z and accented letters such as é or ü, digits, spaces and `& ' . , ! -` only. Cannot contain "Groupon" or "LivingSocial", also not in other letter case, with accents, with spaces between the letters, or with digits or signs standing for letters (such as "Gr0upon"); no words that present it as Groupon's own account (official, support, admin), an offensive word, a web address, an email address, a phone number, or invisible characters. Shown to shoppers on Groupon's checkout page. |
| Contact name | Yes | Up to 255 characters. |
| Contact email | Yes | A monitored address. Groupon uses it to reach you. |
| Logo URL | No | Absolute `https://` URL. Shown on Groupon's checkout page so the shopper sees the order came from you. |
| Redirect URL | No | Absolute `https://` URL, with no username or password in it. After payment, Groupon sends the shopper here with `grouponOrderUuid` added as a query parameter. Without it, the shopper ends on Groupon's receipt page. |
| Inventory scope: states | No | Full US state names, exactly as listed below. Leave empty for every state. |
| Inventory scope: category1 | No | Groupon category permalinks. Leave empty for every category. |
| Inventory scope: category2 | No | Groupon subcategory permalinks. Leave empty for every category. |

Your inventory scope is enforced by Groupon: the products list only ever returns deals inside
it, and a filter naming a state or category outside it is rejected.

**States** (50 values; fields `inventoryStates`, `state`)

Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming

**Top-level category** (1 values; fields `category0`)

local

**Categories** (38 values; fields `category1`)

air-inclusive, all-inclusive, auto-and-home-improvement, automotive, baby-kids-and-toys, beach-destinations, beauty-and-spas, casinos, city, cruises, culinary, electronics, entertainment-and-media, family-trips, food-and-drink, for-the-home, gift-cards, grocery-and-household, health-and-beauty, health-and-fitness, home-improvement, hotel-travel, jewelry-and-watches, luxury, mens-clothing-shoes-and-accessories, outdoor-activities-recreation, personal-services, pet-supplies, retail, romantic, spa-and-wellness, sports-and-outdoors, things-to-do, toys, unique-lodging, v1-personalized-items, waterparks, womens-clothing-shoes-and-accessories

**Subcategories** (207 values; fields `category2`)

africa-and-middle-east, alcohol, apparel-local, appliances-goods, art, art-and-home-decor, arts-and-crafts, arts-and-entertainment-local, australia-and-nz, auto-cleaning, auto-parts-and-accessories, auto-repair, baby-gear, baby-toys, babys-fashion, bars, bath, bath-and-body, bath-and-potty, bedding, bird-supplies, blow-outs-and-styling, books-music-and-movies, breweries-wineries-and-distilleries, brow-and-lash, building-sets, cafes-and-treats, camera-video-and-surveillance, camping, camping-trips, car-electronics-and-gps, cat-supplies, cbd, cell-phones-and-accessories, charity, child-car-seats, childrens-books, childrens-jewelry, classes, cleaning-services, clothing-and-shoes, collectibles, computers-and-tablets, consultants, contractors, cosmetic-procedures, cosmetics, custom-baby-and-kids-items, custom-household-essentials, custom-jewelry, custom-kitchen-accessories, custom-novelty-items, custom-photo-prints, dental, diamond-jewelry, dog-supplies, dolls-and-action-figures, drinks, educational-toys, electrical, electronic-toys, electronics-local, electronics-repair, europe, event-rental-services, exercise-and-fitness, fan-shop, fashion-jewelry, fine-metal-jewelry, fire-pits-and-outdoor-heaters, fitness-classes, floor-care-and-cleaning, flooring, flowers-sweets-and-gift-baskets, food, fragrances, fun-and-leisure-activities, furniture, furniture-stores, games-and-puzzles, gemstone-and-pearl-jewelry, golf-goods, groceries-and-markets, gyms, hair-removal, hair-salons, hand-and-power-tools, health-and-beauty-local, health-and-safety, health-care, heating-and-cooling, home-and-garden-local, home-improvement-goods, home-repairs, hvac-and-electrical, interior-design, jewelry-accessories-and-storage, kids-activities, kids-bikes-and-ride-on-toys, kids-local, kitchen-and-dining, lab-grown-diamond-jewelry, lawn-and-garden, local-services, luggage, magazines, makeup, massage, massage-and-relaxation, maternity-clothes, medical, men, mens-accessories, mens-clothing, mens-jewelry, mens-shoes, mountains, movies-and-tv, musical-instruments, nail-salons, natural-medicine, nightlife, office-and-school-supplies, outdoor-decor, outdoor-grills-and-accessories, outdoors, parking, parks, party-supplies, patio-and-garden, patio-and-garden-products, personalized-bags, personalized-clothing-and-accessories, personalized-items, personalized-pets-items, personalized-stationery, pets, photo-book, photography, plumbing, plus-size-womens-clothing, portable-audio, pretend-play, recreation, remodeling, restaurants, rv-camper, salons, seasonal-decor, sightseeing-and-tours, ski-resorts, skin-care, small-animal-supplies, smart-home, software, spa, spa-getaways, sports, sports-and-outdoor-activities, sports-local, strollers, subscriptions, tanning, team-sports, television-and-home-theater, tickets-and-events, tobacco, toddler-and-baby-toys, toddler-and-kids-fashion, transportation, usa, v-books, v-food, v-heating-and-cooling, v-office-and-school-supplies, v-outdoor-power-equipment, v1-aromatherapy, v1-baby-feeding, v1-dental-care, v1-diapers, v1-gaming, v1-hair-care, v1-home-automation, v1-lighting, v1-maternity-clothes, v1-mattresses, v1-nursery, v1-outdoor-garden-decor, v1-outdoor-play, v1-personal-care, v1-personalized-home-decor, v1-sexual-health, v1-shaving, v1-skin-care, v1-storage-and-organization, v2-cycling, v2-gaming, v3-vitamins-and-supplements, vision, watches, wearable-technology, weight-loss, weight-loss-v2, womens-accessories, womens-clothing, womens-intimates, womens-shoes

## Limits

- At most 5 open storefronts per person; a closed one does not count.
- At most 3 new storefronts per person per 24 hours.
- At most 10 active API keys per storefront.
- An API key works for at most 90 days. The storefront's key list shows when each key stops
  working.

## Rotating a key yourself

1. Create a new key on the storefront.
2. Deploy it to your server.
3. Revoke the old key from the storefront's key list.

Deploying the new key before revoking the old one means no downtime. There is no need to email
anyone to rotate a key. Every key stops working within 90 days, so rotate before the date on the
key list: an expired key answers HTTP 401 like a revoked one.

## What a key can do

A key acts as the storefront that created it, and only that storefront: it reaches the Products,
Cart and Booking endpoints in these guides, and nothing else. It cannot change the storefront's
own registration or manage other keys; that happens in this portal, by a signed-in person.

## Changing your registration, and earning commission with CJ

You change your display name, contact, logo, redirect URL or inventory scope yourself: open the
storefront in this portal and choose **Edit registration**. Groupon's checkout shows the change
right away, and your API keys keep working.

To add a CJ (Commission Junction) publisher ID and start earning commission, email
req.partner.api@groupon.com with your storefront's partner id, shown on the storefront page.

## Closing a storefront

**Close storefront**, at the bottom of the storefront page, stops the storefront at Groupon for
good: its catalog and carts stop answering and every one of its API keys is revoked. It cannot be
reopened. A closed storefront no longer counts towards the five storefronts one account may own,
so you can register a new one.

## Handle the key as a secret

Treat your API key like a password. Write it straight to your server's secret store or
environment the moment it is shown. Never print it into chat, logs, a ticket or a repository,
and never put it in browser JavaScript, a mobile app, or a public repository. See [Rules for
your integration](/docs/rules.md).
