POST api/giftcards

Request Information

URI Parameters

None.

Body Parameters

GiftCardDto
NameDescriptionTypeAdditional information
CardNumber

string

None.

PinCode

string

None.

CurrencyCode

string

None.

Balance

decimal number

None.

InvokedDate

date

None.

ExpirationDate

date

None.

LatestTransaction

date

None.

InfoText

string

None.

IsTestCard

boolean

None.

Transactions

Collection of TransactionHistoryDto

None.

Request Formats

application/json, text/json

Sample:
{
  "CardNumber": "sample string 1",
  "PinCode": "sample string 2",
  "CurrencyCode": "sample string 3",
  "Balance": 1.0,
  "InvokedDate": "2024-10-05T03:51:40.8650047+02:00",
  "ExpirationDate": "2024-10-05T03:51:40.8650047+02:00",
  "LatestTransaction": "2024-10-05T03:51:40.8650047+02:00",
  "InfoText": "sample string 4",
  "IsTestCard": true,
  "Transactions": [
    {
      "Amount": 1.0,
      "CreatedDate": "2024-10-05T03:51:40.8650047+02:00",
      "GiftCardId": 3,
      "TransactionId": "fb098073-3cef-4322-83be-b4c27f974aaa",
      "ConvertedFromCurrencyCode": "sample string 5",
      "RelatedOrderNumber": "sample string 6",
      "ConvertedFromAmount": 1.0
    },
    {
      "Amount": 1.0,
      "CreatedDate": "2024-10-05T03:51:40.8650047+02:00",
      "GiftCardId": 3,
      "TransactionId": "fb098073-3cef-4322-83be-b4c27f974aaa",
      "ConvertedFromCurrencyCode": "sample string 5",
      "RelatedOrderNumber": "sample string 6",
      "ConvertedFromAmount": 1.0
    }
  ]
}

application/xml, text/xml

Sample:
<GiftCardDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SnsGiftcardShop.API.Models.Giftcards">
  <Balance>1</Balance>
  <CardNumber>sample string 1</CardNumber>
  <CurrencyCode>sample string 3</CurrencyCode>
  <ExpirationDate>2024-10-05T03:51:40.8650047+02:00</ExpirationDate>
  <InfoText>sample string 4</InfoText>
  <InvokedDate>2024-10-05T03:51:40.8650047+02:00</InvokedDate>
  <IsTestCard>true</IsTestCard>
  <LatestTransaction>2024-10-05T03:51:40.8650047+02:00</LatestTransaction>
  <PinCode>sample string 2</PinCode>
  <Transactions xmlns:d2p1="http://schemas.datacontract.org/2004/07/SnsGiftcardShop.API.Models.Transactions">
    <d2p1:TransactionHistoryDto>
      <d2p1:Amount>1</d2p1:Amount>
      <d2p1:ConvertedFromAmount>1</d2p1:ConvertedFromAmount>
      <d2p1:ConvertedFromCurrencyCode>sample string 5</d2p1:ConvertedFromCurrencyCode>
      <d2p1:CreatedDate>2024-10-05T03:51:40.8650047+02:00</d2p1:CreatedDate>
      <d2p1:GiftCardId>3</d2p1:GiftCardId>
      <d2p1:RelatedOrderNumber>sample string 6</d2p1:RelatedOrderNumber>
      <d2p1:TransactionId>fb098073-3cef-4322-83be-b4c27f974aaa</d2p1:TransactionId>
    </d2p1:TransactionHistoryDto>
    <d2p1:TransactionHistoryDto>
      <d2p1:Amount>1</d2p1:Amount>
      <d2p1:ConvertedFromAmount>1</d2p1:ConvertedFromAmount>
      <d2p1:ConvertedFromCurrencyCode>sample string 5</d2p1:ConvertedFromCurrencyCode>
      <d2p1:CreatedDate>2024-10-05T03:51:40.8650047+02:00</d2p1:CreatedDate>
      <d2p1:GiftCardId>3</d2p1:GiftCardId>
      <d2p1:RelatedOrderNumber>sample string 6</d2p1:RelatedOrderNumber>
      <d2p1:TransactionId>fb098073-3cef-4322-83be-b4c27f974aaa</d2p1:TransactionId>
    </d2p1:TransactionHistoryDto>
  </Transactions>
</GiftCardDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.