v1

latestOpenAPI 3.0.32026-07-12254440.6 KB
Coupon

deleteCoupon

Delete a specific coupon entity by a given id

delete/v1/coupon/{couponId}

Path parameters

couponIdstring uuid required
Example:123e4567-e89b-12d3-a456-426614174000

The coupon id

Response

Coupon entity response

_idstring uuid
_schema'coupon' required
_orgstring required

Organization Id the entity belongs to

_tagsstring[] nullable
_titlestring
_created_atstring date-time
_updated_atstring date-time
namestring required
descriptionstring
type'fixed' | 'percentage' required
category'discount' | 'cashback' required
percentage_valuestring

Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.

fixed_valuenumber

Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.

fixed_value_decimalstring

Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.

fixed_value_currencystring

Three-letter ISO currency code, in lowercase. Must be a supported currency. ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html

cashback_period'0' | '12'

The cashback period, for now it's limited to either 0 months or 12 months

activeboolean required
requires_promo_codeboolean

Whether the coupon requires a promo code to be applied

promo_code_usageobject

Map of ids of promo codes with their usage count

_purposestring[] nullable
_manifeststring[]

Manifest ID used to create/update the entity

__additionalobject nullable

Additional fields that are not part of the schema

Example response

{
  "_id": "123e4567-e89b-12d3-a456-426614174000",
  "_files": {
    "$relation": [
      {
        "entity_id": "123e4567-e89b-12d3-a456-426614174000"
      }
    ]
  },
  "_owners": [
    {
      "org_id": "123",
      "user_id": "123"
    }
  ],
  "_acl": {
    "view": [
      "org:456"
    ],
    "edit": [
      "org:456"
    ],
    "delete": [
      "org:456"
    ]
  },
  "fixed_value_currency": "EUR",
  "prices": {
    "$relation": [
      {
        "entity_id": "123e4567-e89b-12d3-a456-426614174000"
      }
    ]
  },
  "_manifest": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "__additional": {}
}