POST api/Book/ApplyCouponDiscount

Request Information

URI Parameters

None.

Body Parameters

FPDiscountCouponRequest
NameDescriptionTypeAdditional information
DiscountRequest

DiscountCouponRequest

None.

SoapAuthentication

SoapAuthentication

None.

Request Formats

application/json, text/json

Sample:
{
  "DiscountRequest": {
    "ContractId": 1,
    "ContractLocatorKey": "sample string 2",
    "CouponCode": "sample string 3"
  },
  "SoapAuthentication": {
    "UserName": "sample string 1",
    "Password": "sample string 2"
  }
}

text/html

Sample:
{"DiscountRequest":{"ContractId":1,"ContractLocatorKey":"sample string 2","CouponCode":"sample string 3"},"SoapAuthentication":{"UserName":"sample string 1","Password":"sample string 2"}}

application/xml, text/xml

Sample:
<FPDiscountCouponRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FPWebBox.BusinessObjects">
  <DiscountRequest>
    <ContractId>1</ContractId>
    <ContractLocatorKey>sample string 2</ContractLocatorKey>
    <CouponCode>sample string 3</CouponCode>
  </DiscountRequest>
  <SoapAuthentication>
    <Password>sample string 2</Password>
    <UserName>sample string 1</UserName>
  </SoapAuthentication>
</FPDiscountCouponRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

DiscountCouponResponse
NameDescriptionTypeAdditional information
ContractId

integer

None.

DiscountResponseKey

string

None.

Discount

decimal number

None.

Message

string

None.

ErrorCode

string

None.

ErrorNode

string

None.

FlightsInsurance

Collection of Insurance

None.

Response Formats

application/json, text/json

Sample:
{
  "ContractId": 1,
  "DiscountResponseKey": "sample string 2",
  "Discount": 3.1,
  "Message": "sample string 4",
  "ErrorCode": "sample string 5",
  "ErrorNode": "sample string 6",
  "FlightsInsurance": [
    {
      "PaxType": "sample string 1",
      "BasicInsAmt": 2.1,
      "ChoiceInsAmt": 3.1,
      "ChoicePlusInsAmt": 4.1,
      "UpgradeInsAmt": 5.1
    },
    {
      "PaxType": "sample string 1",
      "BasicInsAmt": 2.1,
      "ChoiceInsAmt": 3.1,
      "ChoicePlusInsAmt": 4.1,
      "UpgradeInsAmt": 5.1
    }
  ]
}

text/html

Sample:
{"ContractId":1,"DiscountResponseKey":"sample string 2","Discount":3.1,"Message":"sample string 4","ErrorCode":"sample string 5","ErrorNode":"sample string 6","FlightsInsurance":[{"PaxType":"sample string 1","BasicInsAmt":2.1,"ChoiceInsAmt":3.1,"ChoicePlusInsAmt":4.1,"UpgradeInsAmt":5.1},{"PaxType":"sample string 1","BasicInsAmt":2.1,"ChoiceInsAmt":3.1,"ChoicePlusInsAmt":4.1,"UpgradeInsAmt":5.1}]}

application/xml, text/xml

Sample:
<DiscountCouponResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FPWebBox.BusinessObjects">
  <ContractId>1</ContractId>
  <ContractLocatorKey>sample string 8</ContractLocatorKey>
  <CouponCode>sample string 7</CouponCode>
  <Discount>3.1</Discount>
  <DiscountResponseKey>sample string 2</DiscountResponseKey>
  <ErrorCode>sample string 5</ErrorCode>
  <ErrorNode>sample string 6</ErrorNode>
  <FlightsInsurance>
    <Insurance>
      <BasicInsAmt>2.1</BasicInsAmt>
      <ChoiceInsAmt>3.1</ChoiceInsAmt>
      <ChoicePlusInsAmt>4.1</ChoicePlusInsAmt>
      <PaxType>sample string 1</PaxType>
      <UpgradeInsAmt>5.1</UpgradeInsAmt>
    </Insurance>
    <Insurance>
      <BasicInsAmt>2.1</BasicInsAmt>
      <ChoiceInsAmt>3.1</ChoiceInsAmt>
      <ChoicePlusInsAmt>4.1</ChoicePlusInsAmt>
      <PaxType>sample string 1</PaxType>
      <UpgradeInsAmt>5.1</UpgradeInsAmt>
    </Insurance>
  </FlightsInsurance>
  <Message>sample string 4</Message>
</DiscountCouponResponse>