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

# Consultar Produto

> Consulta os detalhes completos de um produto específico

## Visão Geral

Este endpoint retorna todos os detalhes de um produto específico, incluindo suas ofertas associadas.

## Endpoint

```
GET https://api.klivopay.com.br/api/public/v1/products/{hash}
```

## Parâmetros

<ParamField path="hash" type="string" required>
  Hash identificador único do produto
</ParamField>

<ParamField query="api_token" type="string" required>
  Seu token de autenticação da API KlivoPay
</ParamField>

## Exemplo de Requisição

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://api.klivopay.com.br/api/public/v1/products/prod123abc?api_token=seu_token_aqui'
  ```

  ```javascript JavaScript theme={null}
  const hash = 'prod123abc';
  const response = await fetch(
    `https://api.klivopay.com.br/api/public/v1/products/${hash}?api_token=seu_token_aqui`
  );
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  hash_id = 'prod123abc'
  url = f'https://api.klivopay.com.br/api/public/v1/products/{hash_id}'
  params = {'api_token': 'seu_token_aqui'}

  response = requests.get(url, params=params)
  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $hash = 'prod123abc';
  $url = "https://api.klivopay.com.br/api/public/v1/products/{$hash}?api_token=seu_token_aqui";
  $response = file_get_contents($url);
  print_r(json_decode($response));
  ?>
  ```
</CodeGroup>

## Resposta de Sucesso

```json 200 OK theme={null}
{
  "success": true,
  "data": {
    "hash": "prod123abc",
    "title": "Curso de Marketing Digital",
    "cover": "https://cdn.klivopay.com.br/products/cover123.jpg",
    "sale_page": "https://meucurso.com.br/marketing",
    "product_type": "digital",
    "delivery_type": "email",
    "payment_type": 1,
    "amount": 29900,
    "category": {
      "id": 5,
      "name": "Educação"
    },
    "offers": [
      {
        "hash": "offer123",
        "title": "Oferta Especial",
        "amount": 19900,
        "cover": "https://cdn.klivopay.com.br/offers/offer123.jpg"
      }
    ],
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  }
}
```

## Códigos de Resposta

<ResponseField name="200" type="OK">
  Produto encontrado e retornado com sucesso
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Token de API inválido ou ausente
</ResponseField>

<ResponseField name="404" type="Not Found">
  Produto não encontrado
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Erro interno do servidor
</ResponseField>
