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": {
    "a9190d3b-259f-47c9-bd13-1b44793d5f1c": 2,
    "ee02342d-a3fd-4c7a-99b3-aa18925d8d95": 4
  },
  "DeliveryTypeRowGuid": "6955872b-3768-4f52-b13f-9da89cf17b24",
  "Promotions": [
    {
      "RowGuid": "0942d33d-8028-42a2-81d7-49fefeb2fa7f",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "0942d33d-8028-42a2-81d7-49fefeb2fa7f",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    }
  ],
  "ShowRowGuid": "a49109a0-7669-4818-b90e-c4c47e804413",
  "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>6955872b-3768-4f52-b13f-9da89cf17b24</DeliveryTypeRowGuid>
  <OrderedTickets xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfguidint>
      <d2p1:Key>a9190d3b-259f-47c9-bd13-1b44793d5f1c</d2p1:Key>
      <d2p1:Value>2</d2p1:Value>
    </d2p1:KeyValueOfguidint>
    <d2p1:KeyValueOfguidint>
      <d2p1:Key>ee02342d-a3fd-4c7a-99b3-aa18925d8d95</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>0942d33d-8028-42a2-81d7-49fefeb2fa7f</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>0942d33d-8028-42a2-81d7-49fefeb2fa7f</RowGuid>
    </Promotion>
  </Promotions>
  <ShowRowGuid>a49109a0-7669-4818-b90e-c4c47e804413</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": "fa0e1d80-d491-47f9-bd30-c40dd4af6e53",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "fa0e1d80-d491-47f9-bd30-c40dd4af6e53",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    }
  ],
  "Failed": [
    {
      "RowGuid": "fa0e1d80-d491-47f9-bd30-c40dd4af6e53",
      "Name": "sample string 2",
      "CouponCode": "sample string 3",
      "DiscountOnTotalOrderPrice": 4.0
    },
    {
      "RowGuid": "fa0e1d80-d491-47f9-bd30-c40dd4af6e53",
      "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>fa0e1d80-d491-47f9-bd30-c40dd4af6e53</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>fa0e1d80-d491-47f9-bd30-c40dd4af6e53</RowGuid>
    </Promotion>
  </Failed>
  <Validated>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>fa0e1d80-d491-47f9-bd30-c40dd4af6e53</RowGuid>
    </Promotion>
    <Promotion>
      <CouponCode>sample string 3</CouponCode>
      <DiscountOnTotalOrderPrice>4</DiscountOnTotalOrderPrice>
      <Name>sample string 2</Name>
      <RowGuid>fa0e1d80-d491-47f9-bd30-c40dd4af6e53</RowGuid>
    </Promotion>
  </Validated>
</PromotionValidationResult>