Create Objects

APIs related to creating Limio Objects

Create Promo Code Objects

This API allows you to create a new promo code object in Limio. Only promo codes v2 are supported.

SecuritybearerAuth
Request
Request Body schema: application/json
required
name
required
string

The object name. Not included values will not be updated and nested values will require the structure to update. Updates will only occur for the id provided. WARNING! Changing this field might break integrations

id
required
string

The object id. This is the record_type and name concatenated such as promo_code_v2-abc123. Not included values will not be updated and nested values will require the structure to update. Updates will only occur for the id provided. WARNING! Changing this field might break integrations

required
PromoCodeWholeBasket (object) or PromoCodeSelectedItems (object)
One of:
applicationLevel
required
string

Specifies if the promo code applies to the whole basket.

Value: "wholeBasket"
promoCode
required
string

The object name. Not included values will not be updated and nested values will require the structure to update. Updates will only occur for the id provided. WARNING! Changing this field might break integrations

status
required
boolean

Sets the status of the promo code. If true, the promo code is active. If false, the promo code is inactive.

description
string

A brief description of the promo code.

promoStartDate
string <date>

The start date for the promo code. If no start date is provided, the promo code will be active immediately providing the status is set to active.

promoExpiryDate
string <date>

The expiry date for the promo code. If no expiry date is provided, the promo code will be active indefinitely.

required
object (PromoCodeProductDetails)
required
object
required
object
object
availableQuantity
number

The number of times the promo code can be used. If undefined, the promo code can be used an unlimited number of times.

required
Discount Type Percentage (object) or Discount Type Fixed Amount (object)
One of:
discountType
string
Value: "DiscountPercentage"
percentageDiscount
number

The percentage discount. Can be specified to 2 decimal places. This should only be set if the discountType is DiscountPercentage.

durationLength
integer

The duration length of the discount.

durationType
string

The duration type (e.g., months).

Enum: "Days" "Weeks" "Months" "Years"
Responses
200

OK

400

Bad request (missing required fields)

401

Unauthorized

404

Not found

post/objects/limio/promo_codes_v2
Request samples
application/json
{
  • "name": "abc123",
  • "id": "promo_code_v2-abc123",
  • "data": {
    }
}
Response samples
application/json
{
  • "id": "promo_code_v2-CODE123",
  • "name": "CODE123",
  • "status": "active",
  • "record_type": "promo_code_v2",
  • "service": "limio",
  • "data": {
    }
}