# Resgatar Voucher

## ResgatarVoucher

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

Quando o "CodigoResposta" for 100 quer dizer que o voucher acabou de ser resgatado com sucesso, caso o retorno do "CodigoResposta" for 119 quer dizer que o voucher já estava previamente resgatado.

Exemplo no POSTMAN - <https://www.postman.com/fidelimax/workspace/fidelimax-api-1-0/request/18773698-a50e342d-69e3-4247-b02d-8d63e9f38629>

#### Headers

| Name                                             | Type   | Description                                                                                                    |
| ------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------- |
| Authentication<mark style="color:red;">\*</mark> | string | Token de integração que está 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                                                                                                                                                                                             |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| voucher<mark style="color:red;">\*</mark> | string | Identificador único vinculado que será enviado ao cliente quando ele resgatar o prêmio, ele será um voucher/cupom que é gerado na sua loja online que pode dar descontos/frete grátis ao seus clientes. |

{% tabs %}
{% tab title="200 CodigoResposta - Identificação numérica da resposta
MensagemErro - Mensagem retornada pela API, quando há uma resposta diferente de OK
voucher - Objeto que contém as informações vinculadas a um voucher
voucher.identificador - Identificador único vinculado que será enviado ao cliente quando ele resgatar o prêmio, ele será um voucher/cupom que é gerado na sua loja online que pode dar descontos/frete grátis ao seus clientes.
voucher.resgatado - Quando "true" indica que o voucher já foi baixado no programa de fidelidade voucher.data\_resgate - Data em que o voucher foi resgatado, quando a propriedade "resgatado" estiver como "true"
voucher.valor\_cashback - Quando a plataforma de fidelidade tiver a opção de cashback habilitado o valor de cashback relativo ao voucher é retornada" %}

```
{
	"CodigoResposta": 100,
	"MensagemErro": null,
	"voucher": 
	{
			"identificador": "PCX111",
			"resgatado": true,
			"data_resgate": "26/07/2017",
			"valor_cashback": 27.22,			
	}
}
```

{% 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/voucher/resgatar-voucher.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.
