HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference

Energy coupon templates / Create

Create a new energy coupon template for promotional campaigns

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Payload for creating an energy coupon template

string
required
length ≤ 50

Unique redemption code for the template

string
required
length ≤ 255

Template name

integer
required
1 to 4000000000

Energy amount in watt-hours granted per redemption

integer
≥ 0

Maximum number of redemptions allowed. Omitted means unlimited.

string
enum
required

Validity type for energy coupon templates:

  • fixed_dates: Coupons have fixed start and end dates
  • period: Coupons are valid for a number of days from the moment of redemption
Allowed:
integer
≥ 1

Number of days the coupon is valid from the moment of redemption. Required when validityType is period.

date

Uses the YYYY-MM-DD date format.

date

Uses the YYYY-MM-DD date format.

date

Uses the YYYY-MM-DD date format.

date

Uses the YYYY-MM-DD date format.

redemptionRules
object

Rules that restrict who can redeem this template. Each rule is an independent check; enabling multiple rules stacks them.

restrictions
object

Restrictions that limit where and by whom coupons can be used. All sub-restrictions are always returned.

string
length ≤ 255

An optional external identifier for integration purposes

tags
array of strings

Tags associated with this template

tags
integer

Operator ID. Required for global admin tokens. Defaults to the token's operator for operator-scoped tokens.

Responses

Language
Credentials
Bearer
API Token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json