Get a discount
Returns one discount by its id. The response is the bare object, without the standard {status, message, data} envelope.
BearerAuthAuthorizationBearer <JWT>id*integerID of the record.
int64OK
*/*- response
id*integerUnique ID of the discount. Set by the server; use it as discountId on items.
int64name*stringDiscount name, up to 100 characters. Required and unique for the merchant.
discountType*integerKind of discount: 1 = fixed amount, 2 = percentage, 3 = buy X get Y, 4 = tiered quantity. Any other value is rejected.
int32rate*numberDiscount value: an amount in the merchant's currency for type 1, a percentage for type 2; for type 4 it applies once the tier quantity is reached.
modifiedTime*stringWhen the discount was last saved. Set by the server.
date-timestatus*stringStatus text, for example active (the default when omitted).
buyQuantity?|Buy X get Y only (type 3): number of units the customer must buy. Required and greater than zero for that type.
int32getQuantity?|Buy X get Y only (type 3): number of units that then get the discount. Required and greater than zero for that type.
int32getDiscountPercent?|Buy X get Y only (type 3): discount on the get units, above 0 and up to 100 (100 = free).
tierMinQuantity?|Tiered quantity only (type 4): line quantity at which rate starts to apply. Required and greater than zero for that type.
int32curl -X GET 'https://beta.iotoms.com/api/v1/catalog/attributes/discounts/0'{ "id": 0, "name": "string", "discountType": 0, "rate": 0, "modifiedTime": "2019-08-24T14:15:22Z", "status": "string", "buyQuantity": 0, "getQuantity": 0, "getDiscountPercent": 0, "tierMinQuantity": 0}