# Get discount details

`GET /api/v1/Tenants/{tenantId}/Discounts/{discountId}`

Core API · Discounts · base URL `https://core-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/core/discounts/get-discount-details

**Deprecated.**

Will no longer work after 2025-10-01 00:00, move over to 1.1 version instead.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string (uuid) | yes |  |
| `discountId` | string (uuid) | yes |  |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `correlationId` | string | no | Correlation Id for the request |

## Responses

| Status | Description |
| --- | --- |
| 200 | OK |
| 401 | Unauthorized |
| 404 | Not Found |

### 200 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `discount` | object or null | no |  |
| `discount.id` | string (uuid) | no |  |
| `discount.name` | string or null | no |  |
| `discount.code` | string or null | no |  |
| `discount.allowMultipleUses` | boolean | no |  |
| `discount.outlets` | array<object> or null | no |  |
| `discount.outlets[].id` | string (uuid) | no |  |
| `discount.outlets[].name` | string or null | no |  |
| `discount.orderFormats` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, `159`, `191`. |
| `discount.validPeriod` | object or null | no | The period this discount is valid for. Null means it's always valid. |
| `discount.validPeriod.from` | string (date-time) | no |  |
| `discount.validPeriod.to` | string (date-time) | no |  |
| `discount.validDayOfWeek` | integer (int32) | no | The day of weeks this discount is valid for. Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `31`, `32`, `64`, `96`, `127`. |
| `discount.validTimePeriod` | object or null | no | The time period this discount is valid for. Null means it's valid all day. From time is in UTC format. |
| `discount.validTimePeriod.from` | string (time) | no |  |
| `discount.validTimePeriod.duration` | string (date-span) | no |  |
| `discount.allValue` | number (double) or null | no | The discount value that will be applied to everything. If null then only the products or product groups specified in the Ancon.Wildcat.Core.Api.Models.Public.V1.V0.Discounts.Queries.Detail.DiscountModel.Products and Ancon.Wildcat.Core.Api.Models.Public.V1.V0.Discounts.Queries.Detail.DiscountModel.ProductGroups will be discounted. |
| `discount.discountType` | integer (int32) | no | Allowed values: `0`, `1`. |
| `discount.discountAvailabilities` | integer (int32) | no | Gets the systems this discount is available for. Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `32`. |
| `discount.products` | array<object> or null | no | Gets which products this discount will work for. |
| `discount.products[].id` | string (uuid) | no |  |
| `discount.products[].name` | string or null | no |  |
| `discount.products[].value` | number (double) | no |  |
| `discount.productGroups` | array<object> or null | no | Gets which product groups this discount will work for. |
| `discount.productGroups[].id` | string (uuid) | no |  |
| `discount.productGroups[].name` | string or null | no |  |
| `discount.productGroups[].value` | number (double) | no |  |

#### Example

```json
{
  "discount": {
    "id": "39338ea1-1514-4e1a-a321-7fb1e06883bd",
    "name": "Festival Event",
    "code": "FEST25",
    "allowMultipleUses": true,
    "outlets": [
      {
        "id": "55b211d3-96e8-41fe-952d-e3111b01697a",
        "name": "Superb Restaurant"
      }
    ],
    "orderFormats": 159,
    "validPeriod": {
      "from": "2023-01-01T00:00:00Z",
      "to": "2023-12-31T23:59:59Z"
    },
    "validDayOfWeek": 127,
    "validTimePeriod": {
      "from": "13:00:00",
      "duration": "08:00:00"
    },
    "allValue": null,
    "discountType": 0,
    "discountAvailabilities": 12,
    "products": null,
    "productGroups": [
      {
        "id": "92a40328-20fd-492b-89e5-41d4501f802a",
        "name": "Food",
        "value": 0.25
      },
      {
        "id": "e418be53-3ab3-4168-939e-5ba40e97c15b",
        "name": "Drinks",
        "value": 0.25
      }
    ]
  }
}
```

### 401 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |

#### Example (from schema)

```json
{
  "message": "string"
}
```

### 404 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

## Example request

```bash
curl -X GET "https://core-api.ancon.io/api/v1/Tenants/{tenantId}/Discounts/{discountId}" \
  -H "Access-Token: $ANCON_TOKEN"
```
