lenius-app Butikker API

Butiksliste og butiksdetaljer

GitHub OpenAPI

Operations 5

GET /v1/cities Hent alle byer med aktive butikker #
GET /v1/discover Hent alt nødvendigt til forsiden #
GET /v1/stores Hent aktive butikker #
POST /v1/stores Opret eller opdatér en butik #
GET /v1/stores/{guid} Hent en butik via GUID #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lenius-app:lenius-app-butikker-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lenius-app-butikker-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lenius Butikker API
  version: 1.0.0
  description: API til Lenius-appens butikker og butikskategorier.
tags:
- name: Butikker
  description: Butiksliste og butiksdetaljer
paths:
  /v1/cities:
    get:
      tags:
      - Butikker
      summary: Hent alle byer med aktive butikker
      description: Én række pr. by og postnummer, sorteret alfabetisk på dansk. Dubletter samles uanset store/små bogstaver og omgivende mellemrum. Tomme bynavne og postnumre udelades. Ingen sideinddeling eller afstandsbegrænsning. Koordinaterne er gennemsnittet af de aktive butikkers placeringer i byen/postdistriktet, ikke et officielt bycentrum.
      responses:
        '200':
          description: Alle byer med aktive butikker; items er tom, hvis ingen findes.
          headers:
            Cache-Control:
              description: Caches i 60 sekunder, med stale-while-revalidate=300.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/City'
        '500':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1Cities
      x-operation-id-source: derived
  /v1/discover:
    get:
      tags:
      - Butikker
      summary: Hent alt nødvendigt til forsiden
      description: Returnerer topkategorier og aktive butikker sorteret efter afstand fra positionen. Med q søges der på butiksnavne og aktive butikskategorier med pg_trgm; alle søgeord skal matche. Eksakte delordsmatches rangeres før stavefejlsmatches og derefter efter afstand. storeCategoryId er et separat præcist kategorifilter. Søgesvar med q caches ikke. Butikskategorier medtages kun, når de er aktive og koblet til mindst én aktiv butik, der matcher søgningen. Ingen matchende butikker giver både tomme stores og storeCategories. postalCode begrænser butikkerne til det præcise postnummer. Udelad postalCode ved GPS-søgning, og send radiusKm for kun at vise butikker inden for den angivne luftlinjeafstand. Uden radiusKm bruges 15 km som standard. postalCode tilsidesætter radiusKm. Radius gælder både butikker, søgning og kategoriudvalg. latitude og longitude er fortsat påkrævet; brug koordinaterne fra /v1/cities ved byvalg.
      parameters:
      - name: latitude
        in: query
        required: true
        description: Brugerens breddegrad
        schema:
          type: number
          format: double
          minimum: -90
          maximum: 90
        example: 55.699
      - name: longitude
        in: query
        required: true
        description: Brugerens længdegrad
        schema:
          type: number
          format: double
          minimum: -180
          maximum: 180
        example: 12.554
      - name: postalCode
        in: query
        required: false
        description: Eksakt postnummer fra /v1/cities. Omgivende mellemrum fjernes. Ukendte postnumre giver en tom butiksliste.
        schema:
          type: string
          minLength: 1
          maxLength: 20
        example: '5000'
      - name: limit
        in: query
        required: false
        description: Aktiverer cursor-pagination. Appen bruger 30; højst 100. Uden limit bevares den ældre upaginerede kontrakt.
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: cursor
        in: query
        required: false
        description: nextCursor fra sidste side. Kræver limit og uændret søgning, position, filtre og sortering. Ugyldig cursor giver 400 INVALID_CURSOR.
        schema:
          type: string
          maxLength: 2048
      - name: sort
        in: query
        required: false
        description: 'Server-sortering ved limit. Recommended: relevans, afstand, UUID. Distance: afstand, UUID. Reviews: rating faldende (null sidst), afstand, UUID.'
        schema:
          type: string
          enum:
          - recommended
          - distance
          - reviews
          default: recommended
      - name: partnerOnly
        in: query
        required: false
        description: 'Ved limit: filtrér partnere før antal og pagination.'
        schema:
          type: boolean
          default: false
      - name: radiusKm
        in: query
        required: false
        description: Maksimal luftlinjeafstand i kilometer ved GPS-søgning. Standard er 15 km, når parameteren udelades. Ignoreres, når postalCode er angivet, så alle butikker i postnummeret kan vises.
        schema:
          type: number
          minimum: 1
          maximum: 50
          default: 15
        example: 15
      - name: q
        in: query
        required: false
        description: Søgetekst. Tom tekst giver almindelig discover. Stavefejl tillades fra 3 tegn pr. ord.
        schema:
          type: string
          maxLength: 120
        example: piza
      - name: storeCategoryId
        in: query
        required: false
        description: Butikskategoriens UUID, kombineret med søgetekst og postnummer.
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        required: false
        description: Topkategori. Kun food understøttes i første version.
        schema:
          type: string
          enum:
          - food
          default: food
      responses:
        '200':
          description: Samlet indhold til forsiden
          headers:
            Cache-Control:
              description: Pagination og fritekstsøgning bruger no-store; ældre kald uden limit/q kan caches i 60 sekunder.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverResponse'
        '400':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1Discover
      x-operation-id-source: derived
  /v1/stores:
    get:
      tags:
      - Butikker
      summary: Hent aktive butikker
      parameters:
      - name: storeCategoryId
        in: query
        description: Filtrér på butikskategoriens UUID
        schema:
          type: string
          format: uuid
      - name: limit
        in: query
        description: Maksimalt antal butikker
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 30
      responses:
        '200':
          description: Butikker sorteret efter navn
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Store'
        '400':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1Stores
      x-operation-id-source: derived
    post:
      tags:
      - Butikker
      summary: Opret eller opdatér en butik
      description: Idempotent synkronisering fra Manager. Butikkens UUID bruges som stabil nøgle. Butik, billeder og varegruppekoblinger gemmes samlet i én transaktion; fejler den, er intet af det ændret, og billedjob sættes ikke i kø.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreSyncRequest'
      responses:
        '200':
          description: Butikken blev opdateret
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreSyncResponse'
        '201':
          description: Butikken blev oprettet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreSyncResponse'
        '400':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'SLUG_CONFLICT: slug bruges allerede af en anden butik. Intet er gemt.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1Stores
      x-operation-id-source: derived
  /v1/stores/{guid}:
    get:
      tags:
      - Butikker
      summary: Hent en butik via GUID
      description: Returnerer en aktiv butik og dens butikskategorier ud fra butikkens stabile UUID.
      parameters:
      - name: guid
        in: path
        required: true
        description: Butikkens stabile GUID
        schema:
          type: string
          format: uuid
        example: 7e24b35f-ef02-4208-ae3e-ba9ea4b9c75d
      responses:
        '200':
          description: Butiksdetaljer med butikskategorier
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Store'
                - type: object
                  properties:
                    storeCategories:
                      type: array
                      items:
                        $ref: '#/components/schemas/StoreCategoryReference'
                    menu:
                      type:
                      - object
                      - 'null'
                      additionalProperties: true
                      description: Importeret menukort i JSON-format.
        '400':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: API-fejl
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1StoresByGuid
      x-operation-id-source: derived
components:
  schemas:
    StoreImageVariants:
      type: object
      required:
      - mobile
      - desktop
      properties:
        mobile:
          type: string
          format: uri
          description: URL til mobilvariant
        desktop:
          type: string
          format: uri
          description: URL til desktopvariant
    City:
      type: object
      required:
      - name
      - postalCode
      - latitude
      - longitude
      properties:
        name:
          type: string
          example: Odense C
        postalCode:
          type: string
          example: '5000'
        latitude:
          type: number
          format: double
          example: 55.4038
        longitude:
          type: number
          format: double
          example: 10.3883
    StoreCategoryReference:
      type: object
      required:
      - id
      - name
      - backgroundColor
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        backgroundColor:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          example: '#FFD9D2'
    StoreSyncRequest:
      type: object
      required:
      - id
      - slug
      - name
      - description
      - street
      - postalCode
      - city
      - latitude
      - longitude
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
          pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
          example: koebenhavn-sushi-house
        name:
          type: string
          example: Sushi House
        description:
          type: string
        storeCategoryGroup:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 255
          example: Restaurant
          description: Valgfrit gruppenavn. Gruppen findes via navnet og oprettes med UUID, hvis den ikke findes.
        teaser:
          type:
          - string
          - 'null'
        email:
          type:
          - string
          - 'null'
        phone:
          type:
          - string
          - 'null'
        cvr:
          type:
          - string
          - 'null'
        imageUrls:
          type: array
          maxItems: 20
          description: Billeder i ønsket rækkefølge. Første URL bliver butikkens imageUrl i svaret. Tom eller udeladt liste får et kategori-passende stockfoto.
          items:
            type: string
            format: uri
        logoUrl:
          type:
          - string
          - 'null'
          format: uri
          description: Logo importeres til R2 via samme kø som billederne.
        facebookUrl:
          type:
          - string
          - 'null'
          format: uri
        instagramUrl:
          type:
          - string
          - 'null'
          format: uri
        trustPilotUrl:
          type:
          - string
          - 'null'
          format: uri
        googleReviewUrl:
          type:
          - string
          - 'null'
          format: uri
        orderUrl:
          type:
          - string
          - 'null'
          format: uri
        woltUrl:
          type:
          - string
          - 'null'
          format: uri
        leniusUrl:
          type:
          - string
          - 'null'
          format: uri
        menu:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: Importeret menukort i JSON-format; det gemmes og returneres ved UUID-opslag.
        smileyUrl:
          type:
          - string
          - 'null'
          format: uri
        street:
          type: string
        postalCode:
          type: string
        city:
          type: string
        latitude:
          type: number
          format: double
          minimum: -90
          maximum: 90
        longitude:
          type: number
          format: double
          minimum: -180
          maximum: 180
        ratingAverage:
          type:
          - number
          - 'null'
          minimum: 0
          maximum: 5
        active:
          type: boolean
          default: true
        partnerStore:
          type: boolean
          default: false
        acceptingOrders:
          type: boolean
          default: true
        storeCategories:
          type: array
          description: Kategorier genbruges efter navn (uanset store/små bogstaver) og oprettes automatisk, hvis de ikke findes.
          items:
            type: object
            required:
            - name
            properties:
              name:
                type: string
                example: Kebab
          default: []
    DiscoverStore:
      type: object
      required:
      - id
      - slug
      - name
      - category
      - description
      - storeCategoryGroup
      - latitude
      - longitude
      - partnerStore
      - distanceMeters
      - isOpen
      - storeCategories
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
          example: sushi-house
        name:
          type: string
          example: Sushi House
        category:
          type: string
          example: Mad
        description:
          type: string
        storeCategoryGroup:
          $ref: '#/components/schemas/StoreCategoryGroup'
        teaser:
          type:
          - string
          - 'null'
        imageUrl:
          type:
          - string
          - 'null'
          format: uri
        imageVariants:
          $ref: '#/components/schemas/StoreImageVariants'
        logoUrl:
          type:
          - string
          - 'null'
          format: uri
        logoVariants:
          $ref: '#/components/schemas/StoreImageVariants'
        latitude:
          type: number
          format: double
          example: 55.6761
        longitude:
          type: number
          format: double
          example: 12.5683
        rating:
          type:
          - number
          - 'null'
          format: double
          example: 4.7
        partnerStore:
          type: boolean
        distanceMeters:
          type: integer
          example: 1450
        isOpen:
          type: boolean
        storeCategories:
          type: array
          items:
            $ref: '#/components/schemas/StoreCategoryReference'
    StoreCategory:
      type: object
      required:
      - id
      - name
      - description
      - symbol
      - backgroundColor
      properties:
        storeCount:
          type: integer
          minimum: 0
          description: 'Ved pagineret discover: alle matchende butikker i gruppen, før cursor/limit.'
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Sushi
        description:
          type: string
          example: Nigiri, maki og bowls
        symbol:
          type: string
          example: 🍣
        backgroundColor:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          example: '#FFD9D2'
    DiscoverResponse:
      type: object
      required:
      - categories
      - storeCategories
      - stores
      properties:
        totalCount:
          type: integer
          minimum: 0
          description: 'Ved limit: alle matchende butikker, uafhængigt af cursor.'
        nextCursor:
          type:
          - string
          - 'null'
          description: 'Ved limit: cursor til næste side, null ved sidste side.'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/TopCategory'
        storeCategories:
          type: array
          items:
            $ref: '#/components/schemas/StoreCategory'
        stores:
          type: array
          items:
            $ref: '#/components/schemas/DiscoverStore'
    TopCategory:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
          example: food
        name:
          type: string
          example: Mad
    StoreSyncResponse:
      type: object
      required:
      - store
      - storeCategories
      - createdStoreCategoryNames
      properties:
        store:
          $ref: '#/components/schemas/Store'
        storeCategories:
          type: array
          items:
            $ref: '#/components/schemas/StoreCategoryReference'
        createdStoreCategoryNames:
          type: array
          description: Kategorier der blev oprettet under denne synkronisering.
          items:
            type: string
    Store:
      type: object
      required:
      - id
      - slug
      - name
      - description
      - storeCategoryGroup
      - street
      - postalCode
      - city
      - latitude
      - longitude
      - acceptingOrders
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
          example: sushi-house
        name:
          type: string
          example: Sushi House
        description:
          type: string
        storeCategoryGroup:
          $ref: '#/components/schemas/StoreCategoryGroup'
        teaser:
          type:
          - string
          - 'null'
        email:
          type:
          - string
          - 'null'
        phone:
          type:
          - string
          - 'null'
        cvr:
          type:
          - string
          - 'null'
        imageUrl:
          type:
          - string
          - 'null'
          format: uri
        imageVariants:
          $ref: '#/components/schemas/StoreImageVariants'
        images:
          type: array
          items:
            $ref: '#/components/schemas/StoreImage'
        logoUrl:
          type:
          - string
          - 'null'
          format: uri
        logoVariants:
          $ref: '#/components/schemas/StoreImageVariants'
        facebookUrl:
          type:
          - string
          - 'null'
          format: uri
        instagramUrl:
          type:
          - string
          - 'null'
          format: uri
        trustPilotUrl:
          type:
          - string
          - 'null'
          format: uri
        googleReviewUrl:
          type:
          - string
          - 'null'
          format: uri
        orderUrl:
          type:
          - string
          - 'null'
          format: uri
        woltUrl:
          type:
          - string
          - 'null'
          format: uri
        leniusUrl:
          type:
          - string
          - 'null'
          format: uri
        smileyUrl:
          type:
          - string
          - 'null'
          format: uri
        street:
          type: string
        postalCode:
          type: string
        city:
          type: string
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
        ratingAverage:
          type:
          - number
          - 'null'
          format: double
        partnerStore:
          type: boolean
        acceptingOrders:
          type: boolean
    StoreImage:
      type: object
      required:
      - url
      - variants
      properties:
        url:
          type: string
          format: uri
        variants:
          $ref: '#/components/schemas/StoreImageVariants'
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: STORE_NOT_FOUND
            message:
              type: string
              example: Butikken blev ikke fundet.
    StoreCategoryGroup:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Restaurant
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer