---
title: "getLineDefinitionById"
url: "https://developer.migros.ch/apis/m-menuplan-api-1/versions/e5598a88-4f00-47ee-a264-df022bb82e77/operations/getLineDefinitionById"
---

> Full API specification: https://developer.migros.ch/apis/m-menuplan-api-1/versions/e5598a88-4f00-47ee-a264-df022bb82e77.md

# getLineDefinitionById

`GET` `/migros/products/menuplan/v1/{tenant}/{subtenant}/LineDefinitions/{lineDefinitionId}`

Operation ID: `getLineDefinitionById`

Get the line definition by id.

## Path parameters

- `lineDefinitionId` (string, uuid, required)
- `tenant` (string, required)
- `subtenant` (string, required)

## Responses

- `200` - OK
- `400` - Bad Request
- `404` - Not Found
- `500` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.0.4
info:
  title: M-Menuplan API
  version: "1.0"
servers:
  - url: https://api.migros.ch/
paths:
  /migros/products/menuplan/v1/{tenant}/{subtenant}/LineDefinitions/{lineDefinitionId}:
    get:
      tags:
        - MasterData
      description: Get the line definition by id.
      operationId: getLineDefinitionById
      parameters:
        - name: lineDefinitionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: tenant
          in: path
          required: true
          schema:
            type: string
        - name: subtenant
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Migros.MenuPlan.Service.Queries.ViewModels.LineDefi\
                  nitionView"
            application/json:
              schema:
                $ref: "#/components/schemas/Migros.MenuPlan.Service.Queries.ViewModels.LineDefi\
                  nitionView"
            text/json:
              schema:
                $ref: "#/components/schemas/Migros.MenuPlan.Service.Queries.ViewModels.LineDefi\
                  nitionView"
        "400":
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
            text/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
        "404":
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
            text/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
        "500":
          description: Internal Server Error
      security:
        - apiKeyAuth: []
security:
  - apiKeyAuth: []
components:
  schemas:
    Migros.MenuPlan.Service.Queries.ViewModels.LineDefinitionView:
      required:
        - id
        - identifier
        - isActive
        - isVisibleOnline
        - nameTranslations
        - owner
        - type
      type: object
      properties:
        id:
          type: string
          format: uuid
        identifier:
          type: string
          nullable: true
        type:
          $ref: "#/components/schemas/Migros.MenuPlan.Infrastructure.Enums.PlanningType"
        owner:
          $ref: "#/components/schemas/Migros.MenuPlan.Infrastructure.Enums.Owner"
        nameTranslations:
          type: object
          additionalProperties:
            type: string
          nullable: true
        isActive:
          type: boolean
        isVisibleOnline:
          type: boolean
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    Migros.MenuPlan.Infrastructure.Enums.PlanningType:
      enum:
        - 1
        - 2
      type: integer
      format: int32
    Migros.MenuPlan.Infrastructure.Enums.Owner:
      enum:
        - 1
        - 2
      type: integer
      format: int32
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: api-key
      in: header
```
