Operations related to authentication tokens
DealPOS API (3.1.0)
Request
Also available as HTTP POST (endpoint: /api/v3/PromotionCoupon/p)
Get List of Promotion Coupons
Required Group Role: "Promotion" - "VIEW"
Type of promotion coupon
Status Coupon usage (If value null it will show only Active Coupon)
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://subdomain.dealpos.net/api/v3/PromotionCoupon \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"From": "2019-12-01T00:00:00",
"To": "2019-12-19T00:00:00",
"Type": "DiscountPercentage",
"UsageStatus": "Active",
"PageNumber": 1,
"PageSize": 10,
"Code": "Disc99"
}'[ { "Code": "Disc99", "Limit": 5, "Balance": 5, "Discount": 99, "Created": "2019-12-17T14:58:15.447", "StartDate": "2019-12-01T00:00:00", "ExpiryDate": "2019-12-19T00:00:00", "Type": "DiscountPercentage", "MinimumSpending": 100000, "Description": "Discount percentage 99%", "CustomerCode": "DP-001", "CustomerID": "8b13ba50-14b1-486c-9ad2-207ade23c0d6" }, { "Code": "Disc100", "Limit": 5, "Balance": 5, "Discount": 100000, "Created": "2019-12-17T14:58:15.447", "StartDate": "2019-12-01T00:00:00", "ExpiryDate": "2019-12-19T00:00:00", "Type": "DiscountAmount", "MinimumSpending": 100000, "Description": "Discount amount 100k", "CustomerCode": "DP-001", "CustomerID": "8b13ba50-14b1-486c-9ad2-207ade23c0d6" } ]
- Default
- Create with CustomerCode
- Create with ReferenceID
- Create with CustomerID
- Create with Requirement Type Variant
- Create with Requirement Type Category
Number of percentage or amount that given from promotion coupon (Only take effect for type Discount Percentage or Discount Amount)
Minimum spending amount that allow to use the coupon code. Only for Type DiscountAmount and DiscountPercentage.
Only use if DiscountType Percentage. If set to "true", coupon discounts apply to regular-priced products
Only use if DiscountType Percentage. The maximum discount amount achievable with this coupon
Type of promotion coupon
ID of the customer assigned to this Coupon. Restrict coupon usage by attaching the ID of the Customer.
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://subdomain.dealpos.net/api/v3/PromotionCoupon \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'ReferenceIDUniqueValidation: false' \
-d '{
"Code": "Disc99",
"Limit": "5\"",
"Discount": 99,
"MinimumAmount": 100000,
"FullPriceItemOnly": "No",
"MaximumDiscount": 100000,
"ExpiryDate": "2019-11-18",
"Description": "Discount percentage 99%",
"Type": "DiscountPercentage"
}'{ "ID": "c0472252-57ad-47dd-9aa7-f61129e88831" }
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://subdomain.dealpos.net/api/v3/PromotionCoupon \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"Code": "Disc99"
}'{ "Message": "Coupon has been delete!" }
Request
Also available as HTTP POST with the same endpoint
Get List of Promotion Coupons
Required Group Role: "Promotion" - "VIEW"
Type of promotion coupon
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon/WithTotalCount
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://subdomain.dealpos.net/api/v3/PromotionCoupon/WithTotalCount \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"From": "2019-12-17",
"To": "2019-12-19",
"Type": "Discount",
"PageNumber": 1,
"PageSize": 10
}'{ "Data": [ { … }, { … } ], "TotalCount": 100 }
Request
Also available as HTTP POST (endpoint: /api/v3/PromotionCoupon/p)
Get Promotion Coupon Detail by Coupon Code
Required Group Role: "Promotion" - "VIEW"
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon/ByCode
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://subdomain.dealpos.net/api/v3/PromotionCoupon/ByCode?Code=889977' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The payload response that users will get.
Type of requirement for this coupon. If this property not set, the coupon will be available for all items.
List of variants that required for this coupon
List of categories that required for this coupon
{ "Code": "889977", "Limit": 10, "Balance": 5, "Discount": 10, "Created": "2019-12-17T14:58:15.447", "StartDate": "2019-12-17T14:58:15.447", "ExpiryDate": "2019-12-19T00:00:00", "Type": "Discount", "Description": "Discount percentage 99%", "CustomerCode": "CUST001", "RequirementType": "Variant", "MultipleItemRequirementDiscount": 0, "ListRequirementVariants": [ { … }, { … } ], "ListRequirementCategories": [] }
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon/ListCode
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://subdomain.dealpos.net/api/v3/PromotionCoupon/ListCode \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
"Coupon001",
"Coupon002"
]'{ "Message": "2 Coupon Key has been deleted successfully!" }
- Production Serverhttps://subdomain.dealpos.net/api/v3/PromotionCoupon/ByReferenceID
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://subdomain.dealpos.net/api/v3/PromotionCoupon/ByReferenceID?ReferenceID=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "Code": "889977", "Limit": 5, "Balance": 5, "Discount": 99, "Created": "2019-12-17T14:58:15.447", "StartDate": "2019-12-01T00:00:00", "ExpiryDate": "2019-12-19T00:00:00", "Type": "Discount", "Description": "Discount percentage 99%", "CustomerCode": "DP-001" }