# Get product list

`GET /api/v1/Tenants/{tenantId}/Products`

Core API · Products · base URL `https://core-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/core/products/get-product-list

### Available filter properties
- created (datetime)
- name (string)
- producttype (enum)
- variant.name (string)
- description (string)
- hasvariants (boolean)
- productgroup.id (guid)
- productgroup.name (string)
- menutree.branchid (guid)
- menutree.branchname (string)
- course.id (nullable guid)
- course.name (string)
- course.code (string)
- tag.id (guid)
- tag.name (string)
- tag.type (enum)
- availability.systemvisibility (enum)
- availability.orderformat (enum flags)

## Path parameters

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

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MetaFilter` | map<string, array<string>> | no |  |
| `Offset` | integer (int32) | no | Offset the result, defaults to 0 |
| `Limit` | integer (int32) | no | Limits how many items to get, defaults to 100 min 0, max 1000. |
| `Order` | string | no | Order the result. |
| `Search` | string | no |  |
| `Filter` | map<string, array<string>> | no | Filter the result. Filter[created]=gte:2022-01-02 12:00:00&Filter[created]=lte:2022-08-03 22:00:00 |

## Header parameters

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

## Responses

| Status | Description |
| --- | --- |
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array<object> or null | no |  |
| `items[].id` | string (uuid) | no |  |
| `items[].surrogateId` | string (uuid) | no |  |
| `items[].productType` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`. |
| `items[].name` | string or null | no |  |
| `items[].description` | string or null | no |  |
| `items[].allergyInformation` | string or null | no |  |
| `items[].image` | string (uuid) or null | no |  |
| `items[].productGroup` | object or null | no |  |
| `items[].productGroup.id` | string (uuid) | no |  |
| `items[].productGroup.name` | string or null | no |  |
| `items[].mandatoryToPickVariant` | boolean | no |  |
| `items[].variants` | array<object> or null | no |  |
| `items[].variants[].id` | string (uuid) | no |  |
| `items[].variants[].name` | string or null | no |  |
| `items[].variants[].isMainProductVariant` | boolean | no |  |
| `items[].variants[].useBasePrice` | boolean | no |  |
| `items[].variants[].isOpenPrice` | boolean | no |  |
| `items[].variants[].variantPrice` | object or null | no |  |
| `items[].variants[].variantPrice.unitPrice` | object or null | no |  |
| `items[].variants[].variantPrice.unitPrice.amount` | number (double) | no |  |
| `items[].variants[].variantPrice.unitPrice.currency` | string or null | no |  |
| `items[].variants[].variantPrice.additionalPrice` | object or null | no |  |
| `items[].variants[].variantPrice.additionalPrice.amount` | number (double) | no |  |
| `items[].variants[].variantPrice.additionalPrice.currency` | string or null | no |  |
| `items[].variants[].materialCost` | object or null | no |  |
| `items[].variants[].materialCost.unitPrice` | object or null | no |  |
| `items[].variants[].materialCost.unitPrice.amount` | number (double) | no |  |
| `items[].variants[].materialCost.unitPrice.currency` | string or null | no |  |
| `items[].variants[].materialCost.additionalPrice` | object or null | no |  |
| `items[].variants[].materialCost.additionalPrice.amount` | number (double) | no |  |
| `items[].variants[].materialCost.additionalPrice.currency` | string or null | no |  |
| `items[].variants[].position` | integer (int32) | no |  |
| `items[].variants[].hasPricePresets` | boolean | no |  |
| `items[].variants[].hasPriceOverrides` | boolean | no |  |
| `items[].outletShares` | array<object> or null | no |  |
| `items[].outletShares[].id` | string (uuid) | no |  |
| `items[].outletShares[].name` | string or null | no |  |
| `items[].outletShares[].productShareType` | integer (int32) | no | Allowed values: `0`, `1`. |
| `items[].tags` | array<object> or null | no |  |
| `items[].tags[].id` | string (uuid) | no |  |
| `items[].tags[].name` | string or null | no |  |
| `items[].tags[].type` | integer (int32) | no | Allowed values: `0`, `1`, `2`, `3`. |
| `items[].metadata` | any or null | no |  |
| `meta` | object or null | no |  |
| `meta.count` | integer (int32) | no |  |
| `meta.offset` | integer (int32) | no |  |

#### Example (from schema)

```json
{
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "surrogateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "productType": 0,
      "name": "string",
      "description": "string",
      "allergyInformation": "string",
      "image": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "productGroup": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string"
      },
      "mandatoryToPickVariant": true,
      "variants": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string",
          "isMainProductVariant": true,
          "useBasePrice": true,
          "isOpenPrice": true,
          "variantPrice": {
            "unitPrice": {},
            "additionalPrice": {}
          },
          "materialCost": {
            "unitPrice": {},
            "additionalPrice": {}
          },
          "position": 0,
          "hasPricePresets": true,
          "hasPriceOverrides": true
        }
      ],
      "outletShares": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string",
          "productShareType": 0
        }
      ],
      "tags": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string",
          "type": 0
        }
      ],
      "metadata": null
    }
  ],
  "meta": {
    "count": 0,
    "offset": 0
  }
}
```

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

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

#### Delivery request is not valid

```json
{
  "message": "Delivery information is not valid!",
  "errorCode": "41fcedd1-dfef-4d0d-a5b3-2e28da7dfc9a",
  "additionalData": null
}
```

### 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}/Products" \
  -H "Access-Token: $ANCON_TOKEN"
```
