<commit_before>---
layout: documentation
categories:
- documentation
- deals-api
---

{: .article}
# Deals API

Use the Deals API to find content that is interesting to your audience.
{: .lead}

##Overview
{: ##overview}

### Authentication
Clients will be provided an API key from Ticketmaster which should be tagged to the end of every resource endpoint call. 

Example `https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=YourApiKey`

### Best Practices
Clients should expect that new attributes may be added at any time.  However, attributes will not be removed or changed without notice.
{: .body}

### Host and API endpoint information
Production Base URL: `https://app.ticketmaster.com/dc/content/`

QA Base URL: `https://app.ticketmaster.com/dc/content-qa/`

All connections must be made over **SSL** using https.

### Contact
Ticketmaster Distributed Commerce team <a href="mailto:<EMAIL>"><EMAIL></a>

## Group Ticket Deals
{: .article #group-ticket-deals}

### Example Requests

Find events with deals that are exclusive to the affiliate audience to me as an affiliate in the California area:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&state=CA&exclusivities=EXCLUSIVE
{: .code .red}
---

Find events with deals in the Greater Los Angeles market area:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&marketIds=27
{: .code .red}
---

Find events within 2 miles of Hollywood, CA that have deals:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&radius=2&radiusUnit=miles&latitude=34.101279&longitude=-118.343552
{: .code .red}
---

## Search for Events with Deals [/deals/events]
{: #search-events-deals}

+ **Parameters:**
    + **exclusivities** (optional `Array[string]`) ... Default is `"EXCLUSIVE,NONEXCLUSIVE"`.  Allowable values: `EXCLUSIVE`, `NONEXCLUSIVE`
    + **marketIds** (optional `Array[number]`) ...  Default is null.  See Appendix: Market Ids for values.
    + **startRow** (optional `number`) ... Paging start row.  Default is `0`.
    + **rows** (optional `number`) ... Paging page size.  Default is `25`.  Maximum allowed value is `500`.
    + **country** (optional `string`) ... Search country code.  Default is `'US'`
    + **city** (optional `string`) ... Search city.  Default is `null`.
    + **state** (optional `string`) ... Search state.  Default is `null`.
    + **latitude** (optional `number`) ... Search location, required if longitude is sent.  Default is `null`.
    + **longitude** (optional `number`) ... Search location, required if latitude is sent.  Default is `null`.
    + **radius** (optional `number`) ... Search location distance from lat/long radius, Default is `10`.
    + **radiusUnit** (optional `string`) ... Search location radius unit of measurement, Default is `'kilometers'`.  Allowable values: `miles`, `kilometers`
    + **majorGenreId** (optional `number`) ... Search for events with the specified `major genre`.
    + **minorGenreId** (optional `number`) ... Search for events with the specified `minor genre`.
    + **venueId** (optional `number`) ... Search for events at the specified `venue`.
    + **attractionId** (optional `number`) ... Search for events with the specified `attraction/artist`.
    + **timeRangeStart** (optional `string`) ... Search for events starting at or after the time specified. (ISO 8601 Date Time Format. Ex: `2001-07-18T00:00:00Z`)
    + **timeRangeEnd** (optional `string`) ... Search for events starting before the time specified. (ISO 8601 Date Time Format. Ex: `2001-07-18T00:00:00Z`)


### Search for Events with Deals [GET]
Find events that have promotional deals associated with them.

>[Request](#req)
>[Response](#res)
{: .reqres}<commit_msg>Mod: change list to table<commit_after>---
layout: documentation
categories:
- documentation
- deals-api
---

{: .article}
# Deals API

Use the Deals API to find content that is interesting to your audience.
{: .lead}

##Overview
{: ##overview}

### Authentication
Clients will be provided an API key from Ticketmaster which should be tagged to the end of every resource endpoint call. 

Example `https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=YourApiKey`

### Best Practices
Clients should expect that new attributes may be added at any time.  However, attributes will not be removed or changed without notice.
{: .body}

### Host and API endpoint information
Production Base URL: `https://app.ticketmaster.com/dc/content/`

QA Base URL: `https://app.ticketmaster.com/dc/content-qa/`

All connections must be made over **SSL** using https.

### Contact
Ticketmaster Distributed Commerce team <a href="mailto:<EMAIL>"><EMAIL></a>

## Group Ticket Deals
{: .article #group-ticket-deals}

### Example Requests

Find events with deals that are exclusive to the affiliate audience to me as an affiliate in the California area:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&state=CA&exclusivities=EXCLUSIVE
{: .code .red}
---

Find events with deals in the Greater Los Angeles market area:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&marketIds=27
{: .code .red}
---

Find events within 2 miles of Hollywood, CA that have deals:

https://app.ticketmaster.com/dc/content/v1/deals/events?apikey=D9WFY74lF0f0ICkqDJiPQwQWqMAQuWtD&radius=2&radiusUnit=miles&latitude=34.101279&longitude=-118.343552
{: .code .red}
---

## Search for Events with Deals [/deals/events]
{: #search-events-deals}

| Parameter | Description | Type        | Default Value | Required |
| --------- | ----------- | ----------- | ------------- | -------- |
| `exclusivities` | Allowable values: EXCLUSIVE, NONEXCLUSIVE |Array[string] | 'EXCLUSIVE, NONEXCLUSIVE' | No |
| `marketIds`     | See Appendix: Market Ids for values | Array[number] | null | No |
| `startRow`      | Paging start row. | number | 0 | No |
| `rows`          | Paging page size.  Maximum allowed value is 500 | number | 25 | No |
| `country`       | Search country code. | string  | 'US' | No |
| `city`          | Search city. | string | null | No |
| `state`         | Search state. | string |  null | No |
| `latitude`      | Search location, required if longitude is sent. | number | null | No |
| `longitude`     | Search location, required if latitude is sent. | number | null | No |
| `radius`        | Search location distance from lat/long radius. | number | 10 | No |
| `radiusUnit`    | Search location radius unit of measurement. Allowable values: miles, kilometers. | string | 'kilometers' | No |
| `majorGenreId`  | Search for events with the specified *major genre*. | number |    | No |
| `minorGenreId`  | Search for events with the specified *minor genre*. | number |    | No |
| `venueId`       | Search for events at the specified *venue*. | number |    | No |
| `attractionId`  | Search for events with the specified *attraction/artist*. | number |      | No |
| `timeRangeStart` | Search for events starting at or after the time specified. (ISO 8601 Date Time Format. Ex: 2001-07-18T00:00:00Z)| string |     | No |
| `timeRangeEnd`  | Search for events starting before the time specified. (ISO 8601 Date Time Format. Ex: 2001-07-18T00:00:00Z) | string |      | No |

### Search for Events with Deals [GET]
Find events that have promotional deals associated with them.

>[Request](#req)
>[Response](#res)
{: .reqres}
{'fraction_non_alphanumeric': 0.1388592750533049, 'fraction_numerical': 0.022388059701492536, 'mean_word_length': 3.8263665594855305, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7545907', 'n_tokens_mistral': 2494, 'n_tokens_neox': 2307, 'n_words': 769}