# Conventions

## Base URL

There is one environment. Every path in these guides is written relative to `https://api-staging-core.livingsocial.com`, and
every path lives under `/partner_storefront/`.

## Authentication

Send your key in the `Authorization` header on every request, as a Bearer token:

```bash
curl -s "https://api-staging-core.livingsocial.com/partner_storefront/products?country=US&limit=10" \
  -H "Authorization: Bearer $GROUPON_API_KEY" \
  -H "User-Agent: MyStore/1.0 (+https://mystore.example)"
```

A missing, wrong or revoked key returns HTTP 401. See [Handling errors](/docs/handling-errors.md).

## Headers

| Header | When | Value |
|---|---|---|
| Authorization | Always | `Bearer` followed by your API key |
| Content-Type | POST, PATCH | `application/json` |
| x-request-id | Recommended | A UUID you generate per request. Groupon echoes it back as `details.requestId` in every error body that carries `details.error`. A value that is not a UUID is replaced by one Groupon makes, which the error body then carries. Quote it when contacting support. |
| User-Agent | Always | Your own, for example `MyStore/1.0 (+https://mystore.example)`. A generic client default is rejected. |

## Identifiers

| Name | Where it comes from | Used as |
|---|---|---|
| Product id | The products list | `productId` in cart requests |
| Option id | The products list, each entry of a product's options | `optionId` in cart requests, and the id of the cart line |
| Cart id | A create-cart response | `cartId` in every later cart call |
| grouponOrderUuid | The query parameter on your redirect URL | `bookingId` in the booking call |

## Money

Money is always an integer in minor units (cents for USD). `2500` with `currencyPrecision: 2`
means $25.00. Display amount = amount / 10^currencyPrecision.

## Market

Only US inventory is exposed: every deal the API returns is a US deal. Always send `country=US`.

## Dates

Dates and times are ISO 8601 with a timezone designator, for example `2026-09-18T12:10:44Z` or
`2026-09-18T08:10:44-04:00`.
