Follow the question structure recommended by Dev Bot before submitting your integration questions.
| Parameter | Type | Required | Description |
|---|---|---|---|
idBranch | int32 | No | ID of the branch where the voucher will be created. If not informed, the current branch of the authenticated user will be used. Only applicable for keys with multi-location permission. |
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Name of the voucher. |
qtde | int32 | Conditional | Quantity of available uses. Required if flIlimitado = false. |
flUtilizarSite | boolean | Yes | If true, the voucher can be used on the site. |
validade | date-time | Yes | Expiration date of the voucher. |
inicio | date-time | Yes | Date from which the voucher is valid. |
flCodigoUnico | boolean | Yes | If true, a unique code will be generated for each use. |
tipoDesconto | int32 | Yes | Type of general discount applied:1 = percentage2 = fixed amount |
valor | double | Yes | Value of the discount (percentage or fixed, according to tipoDesconto). |
flContrato | boolean | Yes | If true, the voucher is linked to contracts. |
idsContratos | array<int32> | No | List of contract IDs that accept this voucher. |
idsServicos | array<int32> | No | List of service IDs that accept this voucher. |
idsFiliais | array<int32> | No | List of branch IDs where the voucher can be used. |
tipoDescontoAnuidade | int32 | No | Type of discount for annual fee:1 = percentage2 = fixed amount |
tipoDescontoServicoUnico | int32 | No | Type of discount for single service:1 = percentage2 = fixed amount |
valorDescontoAnuidade | double | No | Value of the discount for annual fee. |
valorDescontoServicoUnico | double | No | Value of the discount for single service. |
flDescontoAnuidade | boolean | No | If true, applies discount on annual fee. |
flDescontoServicoUnico | boolean | No | If true, applies discount on single service. |
mesesDescontoRecorrente | int32 | No | Number of months with recurring discount. |
flDebitoRecorrente | boolean | No | If true, applies to recurring debts. |
flNaoPermiteConvenio | boolean | No | If true, the voucher cannot be used together with agreements. |
username:passwordAuthorization: Basic *****************{
"nome": "string",
"qtde": 0,
"flUtilizarSite": true,
"validade": "2019-08-24T14:15:22.123Z",
"inicio": "2019-08-24T14:15:22.123Z",
"flCodigoUnico": true,
"flIlimitado": true,
"tipoDesconto": 0,
"valor": 0,
"flContrato": true,
"idsContratos": [
0
],
"idsServicos": [
0
],
"idsFiliais": [
0
],
"tipoDescontoAnuidade": 0,
"tipoDescontoServicoUnico": 0,
"valorDescontoAnuidade": 0,
"valorDescontoServicoUnico": 0,
"flDescontoAnuidade": true,
"flDescontoServicoUnico": true,
"mesesDescontoRecorrente": 0,
"flDebitoRecorrente": true,
"flNaoPermiteConvenio": true
}curl --location 'https://evo-integracao-api.w12app.com.br/api/v2/voucher?idBranch=undefined' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json-patch+json' \
--data '{
"nome": "string",
"qtde": 0,
"flUtilizarSite": true,
"validade": "2019-08-24T14:15:22.123Z",
"inicio": "2019-08-24T14:15:22.123Z",
"flCodigoUnico": true,
"flIlimitado": true,
"tipoDesconto": 0,
"valor": 0,
"flContrato": true,
"idsContratos": [
0
],
"idsServicos": [
0
],
"idsFiliais": [
0
],
"tipoDescontoAnuidade": 0,
"tipoDescontoServicoUnico": 0,
"valorDescontoAnuidade": 0,
"valorDescontoServicoUnico": 0,
"flDescontoAnuidade": true,
"flDescontoServicoUnico": true,
"mesesDescontoRecorrente": 0,
"flDebitoRecorrente": true,
"flNaoPermiteConvenio": true
}'{
"voucherId": 0
}