POST 3dCartWebAPI/v1/Products/{catalogid}/Discount
Adds a new discount to the system
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
catalogid |
Catalog ID |
integer |
Required |
Body Parameters
A Json or XML object containing the new discount
DiscountName | Description | Type | Additional information |
---|---|---|---|
DiscountID |
Primary key, auto-incremented. database reference = pricing.id |
integer |
None. |
DiscountPriceLevel |
database reference = pricing.price_level |
integer |
None. |
DiscountLowbound |
database reference = pricing.lowbound |
decimal number |
None. |
DiscountUpbound |
database reference = pricing.upbound |
decimal number |
None. |
DiscountPrice |
database reference = pricing.price |
decimal number |
None. |
DiscountPercentage |
database reference = pricing.percentage |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "DiscountID": 1, "DiscountPriceLevel": 1, "DiscountLowbound": 1.1, "DiscountUpbound": 1.1, "DiscountPrice": 1.1, "DiscountPercentage": true }
application/xml, text/xml
Sample:
<Discount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <DiscountID>1</DiscountID> <DiscountPriceLevel>1</DiscountPriceLevel> <DiscountLowbound>1.1</DiscountLowbound> <DiscountUpbound>1.1</DiscountUpbound> <DiscountPrice>1.1</DiscountPrice> <DiscountPercentage>true</DiscountPercentage> </Discount>
Sample Request |
|
Please click here to download the C# Rest API Client project from GitHub.
not yet available
not yet available
Response Information
application/json, text/json
Sample:
[ { "Key":"DiscountID", "Value":"1234", "Status":"201", "Message":"Created successfully", } ]
Resource Description
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |