# Queries / Promotions

# Promotions

**Query**
## promotion — Returns [Promotion](/documentation/Objects/Promotions#Promotion)

**Scopes required:** see_promotions

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the promotion to retrieve |

**Example Query**

```graphql
query GetPromotion($id: ID!) {
    promotion(id: $id) {
        id,
        mdbId,
        mdbSyncing,
        clientId,
        name
    }
}

# Example variables
{
    "id": "<ID>"
}
```

**Query**
## promotions — Returns [ConnectionType](/documentation/General/Connections) of [Promotion](/documentation/Objects/Promotions#Promotion)

**Scopes required:** see_promotions

### Sortable Fields
*Fields from [Promotion](/documentation/Objects/Promotions#Promotion) that can be used to sort the connection items*

- name
- createdAt
- updatedAt

| Arguments | Type | Description |
| --- | --- | --- |
| search | *String* | Searches for a promotion that contains this string |
| promotionCategories | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that are in these promotion categories |
| outlets | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that are in these outlets |
| products | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that contain these products |
| brands | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that contain these brands |
| categories | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that contain these categories |
| families | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that contain these families |
| tags | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that contain these tags |
| showInactive | *Boolean* | Whether to extend the search to include inactive promotions |
| customerGroups | [[ID]](/documentation/Types/UUID#UUID) | Searches for promotions that apply to these customer groups |
| current | *Boolean* | Get only promotions that may be running right now (or false for only promotions that are not running right now) |
| start | [DateTime](/documentation/Types/Date-Time#DateTime) | Get promotions that start after this time (inclusive) (using this will exclude promotions with no start date) |
| end | [DateTime](/documentation/Types/Date-Time#DateTime) | Get promotions that end before this time (inclusive) (using this will exclude promotions with no end date) |
| endedSince | [DateTime](/documentation/Types/Date-Time#DateTime) | Get the promotions that have ended since this time (inclusive) |

**Example Query**

```graphql
query GetPromotions($search: String) {
    promotions(search: $search) {
        edges {
            node {
                id,
                mdbId,
                mdbSyncing,
                clientId,
                name
            }
        },
        pageInfo {
            hasNextPage,
            endCursor
        }
    }
}

# Example variables
{
    "search": "<SEARCH>"
}
```