Skip to main content
Skip table of contents

API Create products and offer

Step 1: Generate an OAuth token

See Create an OAuth token for details.

Step 2: Create Products (V16+)

  • PR_OSS_SUBSCRIPTION_FEE which is an optional one shot fee paid due at subscription

  • PR_REC_MONTHLY_1ST which is a recurrent product, mandatory

POST {{opencell.url}}/v2/catalog/productManagement/createProductSimpleOneshot

CODE
{
     "productCode": "PR_OSS_SUBSCRIPTION_FEE",
     "label": "Price for subscription fee",
     "price": 500,
     "oneShotChargeTemplateType": "SUBSCRIPTION",
}

POST {{opencell.url}}/v2/catalog/productManagement/createProductSimpleRecurring

CODE
{
     "productCode": "PR_REC_MONTHLY_1ST",
     "description": "Recurring charge",
     "price": 100,
     "calendar": "MONTHLY",
     "subscriptionProrata": true,
     "terminationProrata": true,
     "applyInAdvance": true,
     "anticipateEndOfSubscription": true
}

Step 3: Create Offer

We will create an offer OF_REC that includes:

  • PR_REC_MONTHLY_1ST which is a recurrent product, mandatory

  • PR_OSS_SUBSCRIPTION_FEE which is an optional one shot fee paid due at subscription

POST {{opencell.url}}/catalog/offerTemplate/createOrUpdate

CODE
{
    "code": "OF_REC",
    "name": "c",
    "description": "Simple monthly recurring with optional subscription fee",
    "disabled": false,
    "lifeCycleStatus": "ACTIVE",
    "offerTemplateCategoryCode": null,
    "validFrom": "2022-01-01",
    "offerProducts": [
        {
            "product": {
                "code": "PR_REC_MONTHLY_1ST"
            },
            "mandatory": true,
            "quantityDefault": 1,
            "quantityMin": 1,
            "quantityMax": 1
        },
        {
            "product": {
                "code": "PR_OSS_SUBSCRIPTION_FEE"
            },
            "mandatory": false,
            "quantityDefault": 0,
            "quantityMin": 0
        }
    ]
}

and ind cURL:

CODE
curl --location 'https://sandbox.opencell.com/opencell/api/rest/catalog/offerTemplate/createOrUpdate' \
--header 'Content-Type: application/json' \
--data '{
    "code": "OF_REC",
    "name": "Demo recurring offer",
    "description": "Simple monthly recurring with optional subscription fee",
    "disabled": false,
    "lifeCycleStatus": "ACTIVE",
    "offerTemplateCategoryCode": null,
    "validFrom": "2022-01-01",
    "offerProducts": [
        {
            "product": {
                "code": "PR_REC_MONTHLY_1ST"
            },
            "mandatory": true,
            "quantityDefault": 1,
            "quantityMin": 1,
            "quantityMax": 1
        },
        {
            "product": {
                "code": "PR_OSS_SUBSCRIPTION_FEE"
            },
            "mandatory": false,
            "quantityDefault": 0,
            "quantityMin": 0
        }
    ]
}'

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.