POST api/donation/{uid}

Update product.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
uid

ID of the product

integer

Required

Body Parameters

DTO of the donation

YSHDonationDTO
NameDescriptionTypeAdditional information
donation_uid

ID of the product

integer

None.

product_name

Name of the product

string

None.

donator_uid

User ID of the seller

integer

None.

donator_display_name

Name of the seller

string

None.

category_uid

Category Id of the product

integer

None.

category_name

Category Name of the product

string

None.

current_state_uid

Current State of the product

integer

None.

product_desc

Description of the produdct

string

None.

image_1_uid

URL of image 1 of product

integer

None.

image_2_uid

URL of image 2 of product

integer

None.

image_3_uid

URL of image 3 of product

integer

None.

image_1_path

URL of image 1 of product

string

None.

image_2_path

URL of image 2 of product

string

None.

image_3_path

URL of image 3 of product

string

None.

contact_name

Contact person name

string

None.

contact_phone

Contact person phone

string

None.

donation_create_date

Create Date of the Product

date

None.

Request Formats

application/json, text/json

Sample:
{
  "donation_uid": 1,
  "product_name": "sample string 2",
  "donator_uid": 3,
  "donator_display_name": "sample string 4",
  "category_uid": 5,
  "category_name": "sample string 6",
  "current_state_uid": 7,
  "product_desc": "sample string 8",
  "image_1_uid": 1,
  "image_2_uid": 1,
  "image_3_uid": 1,
  "image_1_path": "sample string 9",
  "image_2_path": "sample string 10",
  "image_3_path": "sample string 11",
  "contact_name": "sample string 12",
  "contact_phone": "sample string 13",
  "donation_create_date": "2018-01-23T02:20:37.8541823+08:00"
}

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 'YSHDonationDTO'.

Response Information

Resource Description

Detail of the Product

YSHDonationDTO
NameDescriptionTypeAdditional information
donation_uid

ID of the product

integer

None.

product_name

Name of the product

string

None.

donator_uid

User ID of the seller

integer

None.

donator_display_name

Name of the seller

string

None.

category_uid

Category Id of the product

integer

None.

category_name

Category Name of the product

string

None.

current_state_uid

Current State of the product

integer

None.

product_desc

Description of the produdct

string

None.

image_1_uid

URL of image 1 of product

integer

None.

image_2_uid

URL of image 2 of product

integer

None.

image_3_uid

URL of image 3 of product

integer

None.

image_1_path

URL of image 1 of product

string

None.

image_2_path

URL of image 2 of product

string

None.

image_3_path

URL of image 3 of product

string

None.

contact_name

Contact person name

string

None.

contact_phone

Contact person phone

string

None.

donation_create_date

Create Date of the Product

date

None.

Response Formats

application/json, text/json

Sample:
{
  "donation_uid": 1,
  "product_name": "sample string 2",
  "donator_uid": 3,
  "donator_display_name": "sample string 4",
  "category_uid": 5,
  "category_name": "sample string 6",
  "current_state_uid": 7,
  "product_desc": "sample string 8",
  "image_1_uid": 1,
  "image_2_uid": 1,
  "image_3_uid": 1,
  "image_1_path": "sample string 9",
  "image_2_path": "sample string 10",
  "image_3_path": "sample string 11",
  "contact_name": "sample string 12",
  "contact_phone": "sample string 13",
  "donation_create_date": "2018-01-23T02:20:37.8541823+08:00"
}