| POST | /Coupons |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CodeFrom | body | long | No | |
| Type | body | int | No | |
| ExpDate | body | DateTime | No | |
| CodeTo | body | long | No | |
| Prefix | body | string | No | |
| Suffix | body | string | No | |
| Data | body | string | No | |
| CodeLength | body | int | No | |
| CodeFill | body | Char | No | |
| CodeFillRight | body | bool | No | |
| Voided | body | bool | No | |
| Used | body | bool | No | |
| LastInsertedId | body | int | No | |
| Inserted | body | long | No | |
| Omitted | body | long | No | |
| Omittedlist | body | string | No | |
| Error | body | int | No | |
| CheckSumFrom | body | decimal? | No | |
| CheckSumTo | body | decimal? | No | |
| DiscountAmountLimit | body | decimal? | No | |
| DiscountSumLimit | body | decimal? | No | |
| SingleCouponPerCheck | body | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No | |
| lastInsertedId | form | int | No | |
| Inserted | form | long | No | |
| Omitted | form | long | No | |
| Omittedlist | form | string | No | |
| Error | form | int | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Coupons HTTP/1.1
Host: 10.10.0.107
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CodeFrom: 0,
Type: 0,
ExpDate: 0001-01-01,
CodeTo: 0,
Prefix: String,
Suffix: String,
Data: String,
CodeLength: 0,
CodeFill: ,
CodeFillRight: False,
Voided: False,
Used: False,
LastInsertedId: 0,
Inserted: 0,
Omitted: 0,
Omittedlist: String,
Error: 0,
CheckSumFrom: 0,
CheckSumTo: 0,
DiscountAmountLimit: 0,
DiscountSumLimit: 0,
SingleCouponPerCheck: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
lastInsertedId: 0,
Inserted: 0,
Omitted: 0,
Omittedlist: String,
Error: 0
}