ApexERPHost

<back to all web services

GetCoupon

Get discount coupons

Requires Authentication
The following routes are available for this service:
GET/Coupons/{Code}
GetCoupon Parameters:
NameParameterData TypeRequiredDescription
CodepathstringYes
GetCouponResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
CouponformCouponNo
Coupon Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CodeformstringNo
CouponTypeformintNo
ExpirationDateformDateTimeNo
VoidedformboolNo
UsedformboolNo
UseTimeformDateTime?No
DataformCouponDataNo
CouponStatusformint?No
ActivateIdformGuid?No
SpendIdformGuid?No
CouponData Parameters:
NameParameterData TypeRequiredDescription
ProdsformList<CouponProd>No
CouponProd Parameters:
NameParameterData TypeRequiredDescription
ProdIdformstringNo
IsServiceformintNo
TypeformintNo
SCountformdecimalNo
ValueTypeformintNo
ValueformdecimalNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .x-protobuf suffix or ?format=x-protobuf

HTTP + X-PROTOBUF

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /Coupons/{Code} HTTP/1.1 
Host: apex.nikoratrade.ge 
Accept: application/x-protobuf
HTTP/1.1 200 OK
Content-Type: application/x-protobuf
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Coupon":{"Id":0,"Code":"String","CouponType":0,"ExpirationDate":"\/Date(-62135596800000-0000)\/","Voided":false,"Used":false,"UseTime":"\/Date(-62135596800000-0000)\/","Data":{"Prods":[{"ProdId":"String","IsService":0,"Type":0,"SCount":0,"ValueType":0,"Value":0}]},"CouponStatus":0,"ActivateId":"00000000000000000000000000000000","SpendId":"00000000000000000000000000000000"}}