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. |