# Resgate de Prêmio

## ResgataPremio

<mark style="color:green;">`POST`</mark> `https://api.fidelimax.com.br/api/Integracao/ResgataPremio`

O voucher retornado neste endpoint é gerado automaticamente e não eventuais vouchers de sistemas terceiros cadastrados no endpoint de "Cadastro de Voucher"\
\
Exemplo no POSTMAN - <https://www.postman.com/fidelimax/workspace/fidelimax-api-1-0/request/18773698-17fe32d8-f964-4460-b125-6190ed6b8bce>

#### Headers

| Name                                           | Type   | Description                                                                                                    |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| AuthToken<mark style="color:red;">\*</mark>    | string | Token de integração que esta na sua plataforma de controle em Integrações > API da Fidelimax > Quero Integrar. |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json                                                                                               |

#### Request Body

| Name                                                    | Type    | Description                                                                                                                                                                                                                                                     |
| ------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cpf                                                     | string  | CPF do Consumidor. Campo obrigatório se os campos cartao, telefone não forem enviados                                                                                                                                                                           |
| telefone                                                | string  | Telefone do Consumidor, formato (11)99999-9999. Campo obrigatório se os campos cpf, cartao não forem enviados                                                                                                                                                   |
| premio\_identificador<mark style="color:red;">\*</mark> | string  | Identificador customizado pelo cliente no cadastro do prêmio na plataforma                                                                                                                                                                                      |
| quantidade                                              | integer | Quantidade de prêmios que serão resgatados, se nulo, será resgatado uma quandidade do prêmio                                                                                                                                                                    |
| complemento                                             | string  | Descrição adicional para detalhar a transação do resgate de prêmio, com até 100 caracteres. Essa descrição aparecerá no extrato para o consumidor, geralmente utilizado em trasações que somente o nome do prêmio não é o suficiente para o detalhe do resgate. |

{% tabs %}
{% tab title="200 voucher - Voucher automático gerado pelo sistema para identificar o resgate do prêmio
CodigoResposta - Identificação numérica da resposta
MensagemErro - Mensagem retornada pela API, quando há uma resposta diferente de OK" %}

```
{
  "voucher": "ADF84C",
  "CodigoResposta": 100,
  "MensagemErro": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fidelimax.com.br/premios/resgate-de-premio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
