Revel 2.73 API Updates

Welcome to the 2.73 Revel API changelog!

In Revel 2.73, we have made important changes to our Discount, Products, and WebOrders resources.

Please review the changes below in order to test and update your integration accordingly. Select version 'v2022.2.0' to see changes in the API reference section.

You can learn more about the general 2.73 release here.

Modified Resources

Modifications were made to the Discounts resource:
  1. For the /resources/Discount endpoint, two optional fields were added: floor and reduce_by_product_upcharge_value.

    • Floor (type: Float) sets the lowest price that can be charged for a product under this discount, including modifiers. This does not apply to reprice or alternative price discounts. Items with stacked discounts may have their prices lowered below the floor.
    • reduce_by_product_upcharge_value (type: Boolean) behaves in the according manner. If the discounted product has an upcharge, the discount amount will be lessened by the amount of the upcharge. For example, if you want to discount all t-shirts to $15.00, but x-large shirts should still cost an extra $2.00, you will want to use this setting.
    • For the POST, PUT, PATCH endpoints: Added two optional query parameters: floor and reduce_by_product_upcharge_value
    • For the GET endpoints: Added two optional String values to the fields array of Strings: floor and reduce_by_product_upcharge_value
Modifications were made to the Products resource:
  1. For the /resources/ServiceFee/ endpoint, two new fields were added to the ServiceFee model called: use_zone and zone_geojson.

    • This API change allows service fees to be based on zones which provides an alternative to distance-based fees for deliveries. This change applies to all request types: POST, PUT, PATCH, and GET endpoints.
    • use_zone (type: Boolean): a true/false flag to determine whether or not to use zone-based service fees. If true, fees are assessed against the Customer’s address. In the case of overlapping zones, the lowest fee will be assessed. Currently, zone-based service fees can only be applied to delivery orders.
    • zone_geojson (type: Object): Allows you to input your geojson delivery zone string. Geojson may be generated using a tool like geojson.io. Currently, only polygon-based zones are supported.
    • Note: Delivery zone-based service fees will be automatically calculated in the background by the WebOrders API if a zone-based fee is set. There are no changes to the WebOrders API as the totals will be calculated accordingly.
  2. For the /resources/ProductModifier endpoint, an optional parameter was added called default_modifier_qty.

    • This API change allows customers to set a quantity for default modifiers. For example, if a product called "Cauliflower wings" has a modifier called "sauce" set as a default and they would like to set the default quantity of the "sauce" modifier to be 2.
    • For the POST, PUT, PATCH endpoints: Added a new optional body parameter called default_modifier_qty
    • For the GET endpoints: Added an optional String value to the fields array of Strings: default_modifier"qty
    • Note: Additional modifications were made to the WebOrders resource to allow customers to call the menu and retrieve the default quantity value for a product modifier. (see Modifications were made to the WebOrders resource section below)
Field name: default_modifier_qty (optional)
Value type: Integer
Description: For default modfiers, set default quantity between 1-99 
Modifications were made to the WebOrders resource:
  1. Modifications made to the WebOrders menu, product_upcharge, and modifiers endpoints to support changes made for setting default modifier quantities (see Modifications were made to the Products resource section above)

    • For the /weborders/menu, /weborders/product_upcharge/, and /weborders/modifiers endpoints, a new field is returned in the response called default_modifier_qty
  2. A bug fix was made for the situations where specialresources/cart/calculate, and specialresources/cart/validate were calculating incorrect totals when leveraging linked combos. Previously, when a single linked combo was submitted, the system was miscalculating the totals because more than one linked combo was being calculated resulting in a much higher than expected total.

    • We will no longer include prices of linked combos that are not included in the product_sets section of the request
  3. We added the ability to allow orders to be submitted with multiple payment types rather than accepting only a single payment object. The following WebOrder endpoints have been modified: specialresources/cart/calculate, specialresources/cart/validate, specialresources/cart/submit.

    • A new field amount has been added to specialresources/cart/submit. amount reflects how much each payment object will be submitted with. It is required when submitting a payment object through the array format using this endpoint.
    • Note: Integrations submitting only a single payment type will not need to make changes to their integration unless they wish to support multiple payment types via the array format.

Added ability to accept paymentInfo as an object/objects in an array:

"paymentInfo":
   [ {
      "tip":"XXX",
      "amount":"XXX",
      "transaction_id":"XXX",
        "type":200
    }]

Example of paymentInfo object which accepts multiple payment types:

"paymentInfo":
[{
        "type": 7,
        "tip":"XXX",
        "amount":"XXX",
        "cardInfo": {
            "firstDigits": "XXXX",
            "lastDigits": "XXXX",
            "firstName": "XXX",
            "lastName": "XXX",
            "address": null
        }
   },
   {
        "tip":"XXX",
        "type":5,
        "amount":"XXX",
        "cardInfo": {
            "cardNumber": "XXX"
        }
    },
    {
        "tip":"XXX",
        "transaction_id": "XXX",
        "amount":"XXX",
        "type":209
    },
    {
        "tip":"XXX",
        "amount":"XXX",
        "type":4
    }]

Planned Deprecation

  • We're continuing deprecation of the OrderAllInOne resource. This resource is no longer available for new third-party integrations. If you are still using it, please reach out to [email protected] for information on more suitable alternatives.