REST API OCST - Create a Promotion Code

URI

/channels/<channelID>/promotions/<promotionID>/codes

Http Method

POST

Short Description

Creates a new promotion code for an existing promotion.

Query Parameters

Example Requests

/channels/PrimeTech-PrimeTechSpecials/promotions/CC_20EUR_OrderDiscount/codes

HTTP Status Codes

200

Description

Creates a new promotion code for an existing promotion that references a valid promotion code group.

POST an empty object to this collection resource to create a new item. The created code is returned.

Cartridge

app_sf_contactcenter_rest

Application

ContactCenter

Product Version

7.5.1

Product To Version

Status

New Labels

JSON

Request Data Format

n.a.

Request related java object

com.intershop.application.contactcenter.capi.rest.resource.PromotionCodeListResource

Request Example

Response Data Format

application/json

Response related java object

com.intershop.application.contactcenter.capi.rest.resource.PromotionCodeListResource

com.intershop.application.contactcenter.capi.rest.resourceobject.PromotionCodeRO

Response Example

{
    "type": "PromotionCode",
    "code": "CC2M8Y5VY4MW",
    "promotion":
    {
        "type": "Link",
        "description": "Contact Center 10 EUR order discount coupon.",
        "title": "10 EUR Order discount ",
        "uri": "ContactCenter/-/channels/PrimeTech-PrimeTechSpecials/promotions/CC_10EUR_OrderDiscount",
        "relation": "about"
    },
    "promotionID": "CC_10EUR_OrderDiscount",
    "channelID": "PrimeTech-PrimeTechSpecials"
}

XML

XML Request Data Format

n.a.

XML Request Java Objects

com.intershop.application.contactcenter.capi.rest.resource.PromotionCodeListResource

XML Request Example

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.application.contactcenter.capi.rest.resource.PromotionCodeListResource

com.intershop.application.contactcenter.capi.rest.resourceobject.PromotionCodeRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PromotionCode type="PromotionCode">
  <channelID>PrimeTech-PrimeTechSpecials</channelID>
  <code>CCZN413KW8RK</code>
  <promotion type="Link">
    <description>Contact Center 10 EUR order discount coupon.</description>
    <relation>about</relation>
    <title>10 EUR Order discount </title>
    <uri>ContactCenter/-/channels/PrimeTech-PrimeTechSpecials/promotions/CC_10EUR_OrderDiscount</uri>
  </promotion>
  <promotionID>CC_10EUR_OrderDiscount</promotionID>
</PromotionCode>
Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

The Intershop Customer Support website uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties.

Further information on privacy can be found in the Intershop Privacy Policy and Legal Notice.
Customer Support
Knowledge Base
Product Resources
Tickets