> ## Documentation Index
> Fetch the complete documentation index at: https://docs.buylo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Download the EAN registry

> Returns the full EAN registry available to the company behind the bearer token.

Privacy is controlled by the tenant-level `private_ean_registry` feature flag:
- When the flag is **enabled**, only the tenant's own EAN records are returned.
- When the flag is **disabled**, the shared/global EAN pool is returned.

The endpoint returns the full registry in a single response (no pagination).
A hard cap of 5000 records per response protects the server. If the registry
exceeds 5000 entries, only the first 5000 are returned and `truncated` is
set to `true`.




## OpenAPI

````yaml https://app.buylo.ai/api/documentation/swagger/openapi.yaml get /api/external/ean-registry
openapi: 3.1.1
info:
  title: Buylo - company external API
  version: 1.0.0
  description: >-
    API endpoints for managing products and EPCs in the Buylo system. Use
    company token for authentication.
servers:
  - url: https://app.buylo.ai/
security:
  - bearerAuth: []
paths:
  /api/external/ean-registry:
    get:
      tags:
        - EAN Registry
      summary: Download the EAN registry
      description: >
        Returns the full EAN registry available to the company behind the bearer
        token.


        Privacy is controlled by the tenant-level `private_ean_registry` feature
        flag:

        - When the flag is **enabled**, only the tenant's own EAN records are
        returned.

        - When the flag is **disabled**, the shared/global EAN pool is returned.


        The endpoint returns the full registry in a single response (no
        pagination).

        A hard cap of 5000 records per response protects the server. If the
        registry

        exceeds 5000 entries, only the first 5000 are returned and `truncated`
        is

        set to `true`.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EanRegistryEntry'
                  total:
                    type: integer
                    description: >-
                      Number of entries returned in this response (equals
                      `items.length`).
                    example: 137
                  truncated:
                    type: boolean
                    description: >-
                      True if the registry exceeded the 5000-record cap and the
                      response was truncated.
                    example: false
                required:
                  - items
                  - total
                  - truncated
        '403':
          description: Invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    EanRegistryEntry:
      type: object
      properties:
        id:
          type: integer
          example: 42
        ean:
          type: string
          description: European Article Number (barcode).
          example: '8591234567890'
        name:
          type: object
          description: Localized product name keyed by locale code.
          additionalProperties:
            type: string
          example:
            en: Brazil Santos Coffee
            cs: Brazilská káva Santos
        description:
          type: object
          description: Localized product description keyed by locale code.
          additionalProperties:
            type: string
          example:
            en: Roasted Arabica coffee beans from Brazil
            cs: Pražená arabica z Brazílie
        prices:
          type: array
          items:
            type: object
            properties:
              currency:
                type: string
                nullable: true
                example: CZK
              price:
                type: number
                nullable: true
                example: 249.9
        category:
          type: string
          nullable: true
          example: Coffee
        brand:
          type: string
          nullable: true
          example: Santos
        vat_rate:
          type: number
          nullable: true
          example: 21
        unit:
          type: string
          nullable: true
          example: kg
        status:
          type: string
          example: active
      required:
        - id
        - ean
        - name
        - description
        - prices
        - status
    InvalidResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message describing the issue
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````