Limio
WebsiteHelp Desk
  • Home
  • Custom Components
    • Getting Started with Custom Components
    • Connecting External CI
    • Development Guidelines
    • Prop Types
    • Custom subcomponents
    • Connecting to External Service
  • Limio SDK
    • Getting Started with Limio SDK
    • Basket (Cart), Promo Code
    • Page, Offer, and Add-On
    • User, Subscription, Invoice & Address
    • Advanced Methods
      • Express Checkout
      • Core Utilities and Helpers
  • API Docs
    • Authentication Schemes
      • OAuth Bearer Token
      • API Key (Catalog API-only)
    • Catalog API
    • Promo Codes API
    • Order API
    • Objects API
    • Shop Build & Publish API
    • External Identities API
  • Webhooks
    • Using Webhooks
    • Webhooks Overview
  • I want to...
    • Retrieve abandoned baskets
    • Enable self-service on a CPQ order
Powered by GitBook
On this page

Was this helpful?

  1. API Docs

Promo Codes API

Limio allows you to create promo codes programmatically.

PreviousCatalog APINextOrder API

Last updated 1 day ago

Was this helpful?

Create Promo Code Objects

post

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

Authorizations
Body
namestringRequired

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

Example: abc123
idstringRequired

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

Example: promo_code_v2-abc123
dataone ofRequired
all ofOptional
and
or
all ofOptional
and
Responses
200
OK
application/json
400
Bad request (missing required fields)
401
Unauthorized
application/json
404
Not found
post
POST /api/objects/limio/promo_codes_v2 HTTP/1.1
Host: your-environment.prod.limio.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 449

{
  "name": "abc123",
  "id": "promo_code_v2-abc123",
  "data": {
    "applicationLevel": "wholeBasket",
    "promoCode": "abc123",
    "status": true,
    "description": "",
    "promoStartDate": "2024-11-11",
    "promoExpiryDate": "2024-12-31",
    "productDetails": {
      "product": {
        "path": "/products/Discounts"
      },
      "ratePlan": {
        "path": "'30% Off Monthly' 1 month only"
      }
    },
    "usage": {
      "availableQuantity": 100
    },
    "discount": {
      "discountType": "text",
      "percentageDiscount": 12,
      "durationLength": 1,
      "durationType": "Months"
    }
  }
}
{
  "id": "promo_code_v2-CODE123",
  "name": "CODE123",
  "status": "active",
  "record_type": "promo_code_v2",
  "service": "limio",
  "data": {
    "promoStartDate": "2024-10-07"
  }
}