# Get discount details

`GET /api/v1.1/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-v1.1

## 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.discountType` | integer (int32) | no | Allowed values: `0`, `1`. |
| `discount.orderFormats` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, `159`, `191`. |
| `discount.validPeriod` | object or null | no |  |
| `discount.validPeriod.from` | string (date-time) | no |  |
| `discount.validPeriod.to` | string (date-time) | no |  |
| `discount.validDayOfWeek` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `31`, `32`, `64`, `96`, `127`. |
| `discount.validTimePeriod` | object or null | no |  |
| `discount.validTimePeriod.from` | string (time) | no |  |
| `discount.validTimePeriod.duration` | string (date-span) | no |  |
| `discount.allValue` | number (double) or null | no |  |
| `discount.discountAvailabilities` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `4`, `8`, `16`, `32`. |
| `discount.products` | array<object> or null | no |  |
| `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 |  |
| `discount.productGroups[].id` | string (uuid) | no |  |
| `discount.productGroups[].name` | string or null | no |  |
| `discount.productGroups[].value` | number (double) | no |  |
| `discount.outlets` | array<object> or null | no |  |
| `discount.outlets[].id` | string (uuid) | no |  |
| `discount.outlets[].name` | string or null | no |  |

#### Example

```json
{
  "discount": {
    "id": "e88400ca-e390-426b-8e05-6ff07a5b5140",
    "name": "Festival Event",
    "code": "FEST25",
    "allowMultipleUses": true,
    "discountType": 0,
    "orderFormats": 159,
    "validPeriod": {
      "from": "2023-01-01T00:00:00Z",
      "to": "2023-12-31T23:59:59Z"
    },
    "validDayOfWeek": 127,
    "validTimePeriod": {
      "from": "11:00:00",
      "duration": "08:00:00"
    },
    "allValue": null,
    "discountAvailabilities": 12,
    "products": null,
    "productGroups": [
      {
        "id": "15dc0def-e6b3-4c85-8531-24c83e679d0a",
        "name": "Food",
        "value": 0.25
      },
      {
        "id": "d71188a1-9fd7-4775-bf75-aafc84d0429e",
        "name": "Drinks",
        "value": 0.25
      }
    ],
    "outlets": [
      {
        "id": "cb1bac5d-732d-4841-b3e3-fb8ec3170d69",
        "name": "Superb Restaurant"
      }
    ]
  }
}
```

### 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.1/Tenants/{tenantId}/Discounts/{discountId}" \
  -H "Access-Token: $ANCON_TOKEN"
```
