POST api/Promotion

Request Information

URI Parameters

None.

Body Parameters

Order
NameDescriptionTypeAdditional information
AddReservationCosts

boolean

None.

OrderedTickets

Dictionary of globally unique identifier [key] and integer [value]

None.

DeliveryTypeRowGuid

globally unique identifier

None.

Promotions

Collection of Promotion

None.

ShowRowGuid

globally unique identifier

None.

TotalWithDiscount

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "AddReservationCosts": true,
  "OrderedTickets": {
    "01ed68ef-d59c-49df-a826-7654cae98a81": 2,
    "e9f0cb21-1a86-472a-aa83-26c1585ba0a9": 4
  },
  "DeliveryTypeRowGuid": "bd8c40ab-4aaa-4515-bc32-ad496b3835f5",
  "Promotions": [
    {
      "RowGuid": "c08574e8-fd09-4da5-bfa8-463a195dc3ed",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "c08574e8-fd09-4da5-bfa8-463a195dc3ed",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    }
  ],
  "ShowRowGuid": "4d275533-8383-492c-8071-6c596dd8b46f",
  "TotalWithDiscount": 4.0
}

application/xml, text/xml

Sample:
<Order xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RoodFluweel.Api.Models">
  <AddReservationCosts>true</AddReservationCosts>
  <DeliveryTypeRowGuid>bd8c40ab-4aaa-4515-bc32-ad496b3835f5</DeliveryTypeRowGuid>
  <OrderedTickets xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfguidint>
      <d2p1:Key>01ed68ef-d59c-49df-a826-7654cae98a81</d2p1:Key>
      <d2p1:Value>2</d2p1:Value>
    </d2p1:KeyValueOfguidint>
    <d2p1:KeyValueOfguidint>
      <d2p1:Key>e9f0cb21-1a86-472a-aa83-26c1585ba0a9</d2p1:Key>
      <d2p1:Value>4</d2p1:Value>
    </d2p1:KeyValueOfguidint>
  </OrderedTickets>
  <Promotions>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>c08574e8-fd09-4da5-bfa8-463a195dc3ed</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>c08574e8-fd09-4da5-bfa8-463a195dc3ed</RowGuid>
    </Promotion>
  </Promotions>
  <ShowRowGuid>4d275533-8383-492c-8071-6c596dd8b46f</ShowRowGuid>
  <TotalWithDiscount>4</TotalWithDiscount>
</Order>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

PromotionValidationResult
NameDescriptionTypeAdditional information
Validated

Collection of Promotion

None.

Failed

Collection of Promotion

None.

Response Formats

application/json, text/json

Sample:
{
  "Validated": [
    {
      "RowGuid": "09e6812c-e276-4036-b8b8-a37737fc98ca",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "09e6812c-e276-4036-b8b8-a37737fc98ca",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    }
  ],
  "Failed": [
    {
      "RowGuid": "09e6812c-e276-4036-b8b8-a37737fc98ca",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "09e6812c-e276-4036-b8b8-a37737fc98ca",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    }
  ]
}

application/xml, text/xml

Sample:
<PromotionValidationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RoodFluweel.Api.Models">
  <Failed>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>09e6812c-e276-4036-b8b8-a37737fc98ca</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>09e6812c-e276-4036-b8b8-a37737fc98ca</RowGuid>
    </Promotion>
  </Failed>
  <Validated>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>09e6812c-e276-4036-b8b8-a37737fc98ca</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>09e6812c-e276-4036-b8b8-a37737fc98ca</RowGuid>
    </Promotion>
  </Validated>
</PromotionValidationResult>