Venflow API
V1DescuentosPor ID

Actualizar un Descuento

PATCH
/v1/discounts/{id}
Api-Key<token>

Tu clave API privada (comienza con pvk_)

In: header

Organization<token>

Tu ID de organización

In: header

Path Parameters

idstring
Formatuuid
active?boolean

Whether the discount is active

amount_off?number

Fixed amount discount in USD. Mutually exclusive with percent_off

Formatdouble
Range0.01 <= value
duration?string

How long the discount applies

Value in"once" | "forever" | "repeating"
duration_periods?integer

Number of billing cycles the discount applies (only for repeating)

Range1 <= value <= 10000
name?string

Display name for the discount

Length1 <= length <= 255
percent_off?number

Percentage discount. Mutually exclusive with amount_off

Formatdouble
Range0.01 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.venflow.app/v1/discounts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "15% de descuento",    "active": true  }'
{
  "active": true,
  "amount_off": 0,
  "created": 0.1,
  "duration": "once",
  "duration_periods": 0,
  "id": "string",
  "livemode": true,
  "name": "string",
  "object": "discount",
  "percent_off": 0
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}