REST API OCST - Send a Promotion Code to a Customer

URI

/customers/<customerID>/mails

Http Method

POST

Short Description

Puts a promotion code into the mail queue for the customer.

Query Parameters

 

Example Requests

/customers/egkKDgANTq4AAAFF31gHyCE_/mails

HTTP Status Codes

204 No content - If the mail was transferred to the mail service and sent

400 Bad Request - If the input data is not understandable

500 Internal Server Error - If the mail service encountered an error

Description

Puts a promotion code into the mail queue for the customer. This is done by performing a POST that includes as its entity the data received when creating the promotion code (see REST API OCST - Create a Promotion Code):

  1. Create code.
  2. Store response.
  3. Send mail by adding the response (the promotion code) to the user's mail queue.

The code will be sent by the E-Mail-Service to the customer.

Cartridge

app_sf_contactcenter_rest

Application

ContactCenter

Product Version

7.8

Product To Version

 
Status

New Labels

JSON

Request Data Format

application/json

Request related java object

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

Request 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"
}

Response Data Format

application/json

Response related java object

n/a

Response Example

n/a

XML

XML Request Data Format

text/xml

XML Request Java Objects

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

XML Request 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>

XML Response Data Format

text/xml

XML Response Java Objects

n/a

XML Response Example

n/a

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