Coupons
post/api/v1/coupons

Request

  • The document declares no server URL.
  • Auth
    HTTP bearer

Request body

codestring required
descriptionstring nullable
expires_atstring date-time nullable
plan_idsPlanId[]
recurring_valueinteger nullable
redemption_limitinteger nullable
reusableboolean

Example request

{
  "plan_ids": [
    "plan_7n42DGM5Tflk9n8mt7Fhc7"
  ]
}

Response

Coupon created

archived_atstring date-time nullable
codestring required
created_atstring date-time required
descriptionstring nullable
disabledboolean required
expires_atstring date-time nullable
idstring MeteroidId required
plan_idsPlanId[] required
recurring_valueinteger nullable
redemption_countinteger required
redemption_limitinteger nullable
reusableboolean required

Example response

{
  "id": "cou_7n42DGM5Tflk9n8mt7Fhc7",
  "plan_ids": [
    "plan_7n42DGM5Tflk9n8mt7Fhc7"
  ]
}

Changes

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became optional for the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • breaking

      removed from the request property oneOf list

    • breaking

      the ///// response's property format changed from decimal to no format for status

    • breaking

      the ///// response's property format changed from decimal to no format for status

    • info

      mapped value for discriminator key FIXED changed from to for request property

    • info

      mapped value for discriminator key PERCENTAGE changed from to for request property

    • info

      request discriminator property name changed for request property from discount_type to type

    • info

      added to the request property oneOf list

    • info

      response discriminator property name changed for response property from discriminator to type for the response status