POST api/product/charity

Request Information

URI Parameters

None.

Body Parameters

ProductCharitySaveRequestModel
NameDescriptionTypeAdditional information
Products

Collection of CommonProductSaveRequestModel

None.

CharityName

string

None.

CharityPercentage

decimal number

None.

CharityLink

string

None.

Request Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "products": [
    {
      "productID": 1
    },
    {
      "productID": 1
    }
  ],
  "charityName": "sample string 1",
  "charityPercentage": 2.0,
  "charityLink": "sample string 3"
}

application/xml, text/xml

Sample:
<ProductCharitySaveRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NFTWardsV2.Core.RequestModel">
  <CharityLink>sample string 3</CharityLink>
  <CharityName>sample string 1</CharityName>
  <CharityPercentage>2</CharityPercentage>
  <Products>
    <CommonProductSaveRequestModel>
      <ProductID>1</ProductID>
    </CommonProductSaveRequestModel>
    <CommonProductSaveRequestModel>
      <ProductID>1</ProductID>
    </CommonProductSaveRequestModel>
  </Products>
</ProductCharitySaveRequestModel>

multipart/form-data

Sample:
<ProductCharitySaveRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NFTWardsV2.Core.RequestModel"><CharityLink>sample string 3</CharityLink><CharityName>sample string 1</CharityName><CharityPercentage>2</CharityPercentage><Products><CommonProductSaveRequestModel><ProductID>1</ProductID></CommonProductSaveRequestModel><CommonProductSaveRequestModel><ProductID>1</ProductID></CommonProductSaveRequestModel></Products></ProductCharitySaveRequestModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ProductCharitySaveRequestModel'.

Response Information

Resource Description

CommonResponseDataModel
NameDescriptionTypeAdditional information
ReturnID

integer

Required

Message

string

Required

Successful

boolean

Required

Code

integer

None.

TotalRecord

integer

None.

Response Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "returnID": 1,
  "message": "sample string 2",
  "successful": true,
  "code": 4,
  "totalRecord": 5
}

application/xml, text/xml

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NFTWards.Core.DataModel">
  <Code>4</Code>
  <Message>sample string 2</Message>
  <ReturnID>1</ReturnID>
  <Successful>true</Successful>
  <TotalRecord>5</TotalRecord>
</CommonResponseDataModel>

multipart/form-data

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NFTWards.Core.DataModel"><Code>4</Code><Message>sample string 2</Message><ReturnID>1</ReturnID><Successful>true</Successful><TotalRecord>5</TotalRecord></CommonResponseDataModel>