Revel 2.80 API Updates
5 months ago by Antanas
Welcome to the 2.80 Revel API Changelog!
In 2.80 we made some changes to the Discount Code resources.
- Changes for the
Put
/Patch
Discount Codes endpoints:
PUT
/resources/DiscountCode/{DiscountCodeId}/
PATCH
/resources/DiscountCode/{DiscountCodeId}/
establishment
field has been removed from required and will thus no longer be validated by the endpoint. All establishment
field specific validations have been removed.
The discount
field will be used to determine the establishment of origin for the discount code (the same way it is used for the POST
/resources/DiscountCode/ endpoint) and any EMS errors will remain unchanged.
Example
PUT
/resources/DiscountCode/{DiscountCodeId}/
PATCH
/resources/DiscountCode/{DiscountCodeId}/
Request
https//revel.revelup.com/resources/DiscountCode/{{discount_code_id}}/
Body
{
"code": "cat100002",
"discount": "/resources/Discount/115/",
"used": true,
"type": 0,
"id": 102021,
"resource_uri": "/resources/DiscountCode/102021/"
}
200 Response
{
"code": "cat100002",
"establishment": "/enterprise/Establishment/1/",
"discount": "/resources/Discount/115/",
"used": false,
"type": 1,
"id": 102021,
"resource_uri": "/resources/DiscountCode/102021/"
}