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

# Get a Channel

> Returns a single affiliate channel by ID for the authenticated user

## Get a Channel

Retorna um canal específico do afiliado autenticado.

### HTTP Request

```http theme={null}
GET https://api-beta.lomadee.com.br/affiliate/channels/{channelId}
```

### Path Parameters

<ParamField path="channelId" type="string" required>
  Identificador único do canal
</ParamField>

### Example Request

```bash theme={null}
curl -X GET "https://api-beta.lomadee.com.br/affiliate/channels/b328b5ff-af33-405a-994b-70192267419c" \
  -H "x-api-key: your-api-key"
```

### Response Format

<ResponseField name="data" type="object">
  Objeto do canal
</ResponseField>

### Channel Object

<ResponseField name="id" type="string">
  Identificador único do canal
</ResponseField>

<ResponseField name="name" type="string">
  Nome do tipo de canal
</ResponseField>

<ResponseField name="active" type="boolean">
  Se o canal está ativo
</ResponseField>

<ResponseField name="createdAt" type="string">
  Data de criação (ISO 8601)
</ResponseField>

### Example Response

```json theme={null}
{
  "data": {
    "id": "b328b5ff-af33-405a-994b-70192267419c",
    "name": "Blog",
    "active": true,
    "createdAt": "2025-01-15T10:30:00.000Z"
  }
}
```

### Error Responses

| Status | Descrição                                   |
| ------ | ------------------------------------------- |
| `401`  | API key ausente, inválida ou tipo incorreto |
| `403`  | Escopo `channels:read` ausente na chave     |
| `404`  | Afiliado ou canal não encontrado            |
| `429`  | Rate limit excedido                         |


## OpenAPI

````yaml GET /affiliate/channels/{channelId}
openapi: 3.1.0
info:
  title: Lomadee Public API
  description: >-
    REST API for affiliate brands, channels, campaigns, orders, products, and
    link shortener. Authenticate with x-api-key. Rate limit: 60 req/60s per key
    and IP.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.lomadee.com.br/
    description: Production — target URL for all integrations
  - url: https://api-beta.lomadee.com.br/
    description: Beta (legacy) — available during transition; will be retired soon
security:
  - x-api-key: []
paths:
  /affiliate/channels/{channelId}:
    get:
      description: Returns a single affiliate channel by ID for the authenticated user
      parameters:
        - name: channelId
          in: path
          description: The id of the channel to return
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Channel response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateChannelDetail'
          headers:
            X-RateLimit-Limit:
              description: Max requests per window
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Remaining requests in window
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp when window resets
              schema:
                type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Affiliate or channel not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    AffiliateChannelDetail:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AffiliateChannelItem'
    Error:
      required:
        - message
        - error
        - statusCode
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message
        error:
          type: string
          description: Error type/category
        statusCode:
          type: integer
          format: int32
          description: HTTP status code
    AffiliateChannelItem:
      type: object
      properties:
        id:
          type: string
          description: Channel identifier
        name:
          type: string
          description: Available channel type name
        active:
          type: boolean
          description: Whether the channel is active
        createdAt:
          type: string
          format: date-time
          description: Channel creation date
  responses:
    Unauthorized:
      description: API key missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
              code:
                type: string
    Forbidden:
      description: Valid key without required scope
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
              code:
                type: string
    TooManyRequests:
      description: Rate limit exceeded (60 req/60s per key + IP)
      headers:
        X-RateLimit-Limit:
          description: Max requests per window
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp when window resets
          schema:
            type: integer
        Retry-After:
          description: Seconds until retry
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
              code:
                type: string
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````