Revel 2.79 API Updates

Welcome to the 2.79 Revel API Changelog!

In 2.79 we made some changes to Modifier, Product, ViewPurchaseOrderProduct, ProductPurchase Discount and DiscountCode endpoints. In addition to these changes, we added an doordash_marketplace_menu field to CustomMenu, ProductGroup and ProductGroupAction endpoints to support DoorDash marketplace menus. Please review the changes below in order to test and update your integration accordingly.

Modifier endpoint changes

In an effort to make the Modifier related API calls more performant, we have added a query string parameter to remove printer detail. When the user sets the query string parameter to false, they will no longer get the printer details which will significantly reduce the payload size of the response.

These API modifications were made to /resources/Modifier/ and /resources/Modifier/{id}:

A new optional query string parameter, expand_printers has been added.

Query String Parameter name: expand_printers

Value type : boolean as string (case-insensitive)

Default value: True (if not passed in or invalid value set)

Description: If the query string parameter is set to false then the printers field in the response will be an array of URIs rather than an array of JSON objects. The response will include printers value as an array of JSON objects when: value set to true, no recognized value set, no value set, field not passed in the call

Endpoints that use this parameter:

GET /resources/Modifier/

GET /resources/Modifier/{id}/

This query string parameter allows integrated partners to reduce payload size of the response for the printers.

The query string parameter will have a string value of a boolean, it will default to true.

Examples of responses based on parameter value:

Query String Parameter Passed in as False (casing doesn't matter)

{
  "sort": 1,
  "conv_ordering_disp": true,
  "kds_tags": [
    
  ],
  "kitchen_print_name": null,
  "cost": "0.0000",
  "created_by": "/enterprise/User/7/",
  "is_conditional_mod": false,
  "id": 103192,
  "description": "",
  "sku": "",
  "uuid": "18c42e88-a319-42de-a48f-4611b5befd07",
  "is_quick": false,
  "updated_by": "/enterprise/User/2830/",
  "substitutions": [
    
  ],
  "display_in_kiosk": true,
  "do_not_print": false,
  "printers": [
    "/resources/Device/615/",
    "/resources/Device/616/",
    "/resources/Device/2215/"
  ],
  "substitute_modifiers": false,
  "img_url": null,
  "updated_date": "2023-11-16T11:20:32.282978",
  "color_code": 0,
  "deleted": false,
  "price": 0.0,
  "barcode": "100000003275",
  "modifierClass": "/resources/ModifierClass/27294/",
  "active": true,
  "name": "Buffalo",
  "kitchen_description": "",
  "display_online": true,
  "prep_recipe": false,
  "third_party_name": "",
  "establishment": "/enterprise/Establishment/160/",
  "no_modifier_substitute": false,
  "prep_yield": null,
  "created_date": "2022-05-19T07:41:23.648726",
  "is_hot": false,
  "conv_ordering_sort_order": null,
  "track_recipe": false,
  "resource_uri": "/resources/Modifier/103192/"
}

Query String Parameter Passed in as True or not passed in at all (casing doesn't matter)

{
  "sort": 1,
  "conv_ordering_disp": true,
  "kds_tags": [
    
  ],
  "kitchen_print_name": null,
  "cost": "0.0000",
  "created_by": "/enterprise/User/7/",
  "is_conditional_mod": false,
  "id": 103192,
  "description": "",
  "sku": "",
  "uuid": "18c42e88-a319-42de-a48f-4611b5befd07",
  "is_quick": false,
  "updated_by": "/enterprise/User/2830/",
  "substitutions": [
    
  ],
  "display_in_kiosk": true,
  "do_not_print": false,
  "printers": [
{
      "user_pswd": null,
      "scale_measurement_unit": 0,
      "swipe_type": 0,
      "bumpbar_type": 0,
      "print_coordinator": null,
      "third_party_id": "",
      "printer_language": null,
      "device_type": 1,
      "printer_type": 18,
      "barcode_scanner_type": null,
      "printer_encoding": "pc858",
      "port": null,
      "model_num": null,
      "printer_pos_or_items": 1,
      "uuid": "1b5695c6-1a3b-41df-8429-d31e65b986a5",
      "platform": "",
      "id": 615,
      "os_version": null,
      "printer_delegate": null,
      "version": null,
      "establishment": "/enterprise/Establishment/102/",
      "printer_expo": false,
      "label_template": null,
      "printer_cash_drawer_signal_type": "LOW",
      "kitchen_printer_chime": false,
      "printer_model": 15,
      "deviceextraparameters": [
        
      ],
      "mac": "...",
      "printer_template": null,
      "rfid_reader_type": 0,
      "fire_course_template": null,
      "active": true,
      "ip_address": null,
      "scale_type": 0,
      "name": "U220-1",
      "printer_render_mode": null,
      "user_code": null,
      "kitchen_flow_views": [
        
      ],
      "void_receipt_template": null,
      "bumpbar_orientation": 0,
      "gift_receipt_template": null,
      "resource_uri": "/resources/Device/615/"
    },
    {
      "user_pswd": null,
      "scale_measurement_unit": 0,
      "swipe_type": 0,
      "bumpbar_type": 0,
      "print_coordinator": null,
      "third_party_id": "",
      "printer_language": null,
      "device_type": 1,
      "printer_type": 18,
      "barcode_scanner_type": null,
      "printer_encoding": "pc858",
      "port": null,
      "model_num": null,
      "printer_pos_or_items": 1,
      "uuid": "14eccb3b-3ccf-4d6a-b25a-a31e3dbea3a3",
      "platform": "",
      "id": 616,
      "os_version": null,
      "printer_delegate": null,
      "version": null,
      "establishment": "/enterprise/Establishment/102/",
      "printer_expo": false,
      "label_template": null,
      "printer_cash_drawer_signal_type": "LOW",
      "kitchen_printer_chime": false,
      "printer_model": 15,
      "deviceextraparameters": [
        
      ],
      "mac": "...",
      "printer_template": null,
      "rfid_reader_type": 0,
      "fire_course_template": null,
      "active": true,
      "ip_address": null,
      "scale_type": 0,
      "name": "U220-2",
      "printer_render_mode": null,
      "user_code": null,
      "kitchen_flow_views": [
        
      ],
      "void_receipt_template": null,
      "bumpbar_orientation": 0,
      "gift_receipt_template": null,
      "resource_uri": "/resources/Device/616/"
    },
    {
      "user_pswd": null,
      "scale_measurement_unit": 0,
      "swipe_type": 0,
      "bumpbar_type": 0,
      "print_coordinator": null,
      "third_party_id": "",
      "printer_language": null,
      "device_type": 1,
      "printer_type": 18,
      "barcode_scanner_type": null,
      "printer_encoding": "pc858",
      "port": null,
      "model_num": null,
      "printer_pos_or_items": 1,
      "uuid": "4fca807e-1f50-4c1c-8111-244e8a288479",
      "platform": "",
      "id": 125,
      "os_version": null,
      "printer_delegate": null,
      "version": null,
      "establishment": "/enterprise/Establishment/27/",
      "printer_expo": false,
      "label_template": null,
      "printer_cash_drawer_signal_type": "LOW",
      "kitchen_printer_chime": false,
      "printer_model": 15,
      "deviceextraparameters": [
        
      ],
      "mac": "",
      "printer_template": "/resources/PosTemplate/274/",
      "rfid_reader_type": 0,
      "fire_course_template": null,
      "active": true,
      "ip_address": null,
      "scale_type": 0,
      "name": "U220-1",
      "printer_render_mode": null,
      "user_code": null,
      "kitchen_flow_views": [
        
      ],
      "void_receipt_template": null,
      "bumpbar_orientation": 0,
      "gift_receipt_template": null,
      "resource_uri": "/resources/Device/125/"
    },
  ],
  "substitute_modifiers": false,
  "img_url": null,
  "updated_date": "2023-11-16T11:20:32.282978",
  "color_code": 0,
  "deleted": false,
  "price": 0.0,
  "barcode": "100000003275",
  "modifierClass": "/resources/ModifierClass/27294/",
  "active": true,
  "name": "Buffalo",
  "kitchen_description": "",
  "display_online": true,
  "prep_recipe": false,
  "third_party_name": "",
  "establishment": "/enterprise/Establishment/160/",
  "no_modifier_substitute": false,
  "prep_yield": null,
  "created_date": "2022-05-19T07:41:23.648726",
  "is_hot": false,
  "conv_ordering_sort_order": null,
  "track_recipe": false,
  "resource_uri": "/resources/Modifier/103192/"
}

Product, ViewPurchaseOrderProduct and ProductPurchase endpoint changes

A new field, is_alcohol has been added to Product objects.

Field name: is_alcohol

Value type: boolean

Description: specifies whether or not a given product contains alcohol. This is required information for customers selling alcohol related products through 3rd party ordering services (DoorDash, UberEats, Grubhub, etc.).

Example GET request to /resources/Product/ would return the following response (is_alcohol appears on line 41 in the code sample):

{
    "objects": [
        {
            "original_price": null,
            "is_cold": false,
            "bin_value": null,
            "conv_ordering_disp": true,
            "quick_pick_group": null,
            "allow_price_override": false,
            "is_combo": 0,
            "upsell_combo_price": "0",
            "product_weight_unit": 0,
            "label_date": "2015-06-01T11:15:39.174838",
            "purchase_product_age": null,
            "sku": "6666",
            "increase_group_combo_price_based_on_upcharge": false,
            "attribute_parent": null,
            "purchase_reward_multiplier": 1.0,
            "flat_tax_units": 1,
            "created_by": "/enterprise/User/4/",
            "min_price": null,
            "categories": [
                "/products/ProductCategory/70/"
            ],
            "printers": [],
            "uom": "Unit",
            "dynamic_combo": null,
            "updated_by": "/enterprise/User/4/",
            "show_on_pos": true,
            "crv_value": null,
            "product_brand": null,
            "shopify_sku": null,
            "product_weight": null,
            "item_no": null,
            "sorting": 1,
            "attribute_2": null,
            "name": "Test Product",
            "attribute_1": null,
            "limit_type": 0,
            "size_chart": null,
            "is_alcohol": false,
            "eligible_for_purchase_rewards": true,
            "point_redeem": null,
            "negative_sales_restricted": false,
            "combo_product_8": null,
            "commission_type": 0,
            "prevent_sales": false,
            "is_food": false,
            "sold_by_weight": false,
            "preparation_time": 0,
            "combo_product_2": null,
            "prompt_for_upsell": 0,
            "combo_product_4": null,
            "combo_product_5": null,
            "combo_product_6": null,
            "combo_product_7": null,
            "kitchen_print_name": null,
            "product_price_in_combo": null,
            "cost": "0.0000",
            "export": true,
            "parent_dynamic_combo": null,
            "pos_column_width": 3,
            "variable_pricing": false,
            "shelf_label_quantity": 1,
            "variable_pricing_by": 0,
            "category": "/products/ProductCategory/70/",
            "set_price_per_group_for_combos": false,
            "comments": null,
            "unit_size": null,
            "course_number": null,
            "display_on_kiosk": false,
            "combo_upcharge": "0.0000",
            "color_code": 0,
            "alternate_lookup": [],
            "barcode": "200000000004",
            "crv_enabled": false,
            "list_printers": null,
            "point_value": null,
            "active": false,
            "uuid": "b6fce1d2-f25f-4a01-a137-1c9b8c4de58f",
            "kitchen_description": null,
            "display_online": true,
            "product_width": null,
            "tax_class": 0,
            "attribute_value_2": null,
            "tax_included": false,
            "attribute_value_1": null,
            "retail": null,
            "combo_productsets": [],
            "image": null,
            "kds_tags": [],
            "default_inventory": false,
            "limit_value": "0.0",
            "promotional_product": null,
            "product_length_unit": null,
            "receipt_text": null,
            "commission": "0.0000",
            "price_embedded": false,
            "is_drink": false,
            "attribute_1_name": "",
            "combo_product_1": null,
            "manufacturer": null,
            "product_group": [
                "/resources/ProductGroup/10/"
            ],
            "start_date": null,
            "external_shipping_addresses": [],
            "print_tags": true,
            "combo_product_3": null,
            "end_date": null,
            "service_duration": 0,
            "dining_options": "[0, 1, 2, 3, 4, 5, 6, 7]",
            "conv_ordering_sort_order": null,
            "prep_recipe": false,
            "product_width_unit": null,
            "disable_modifier_popup": false,
            "max_threshold_price": null,
            "type": 0,
            "percent_markup": null,
            "delivery_method": null,
            "dept": null,
            "prompt_for_quantity": false,
            "product_height": null,
            "third_party_id": null,
            "attribute_2_name": "",
            "redemption_level": null,
            "msrp": null,
            "crv_label": null,
            "purchase_product_age_msg": null,
            "tax": null,
            "seasonal_item": false,
            "rti_combo": false,
            "id": 919,
            "surcharge": "0",
            "price_tiers": [],
            "product_length": null,
            "combo_discount_products": [],
            "tare": null,
            "productclass": null,
            "parent_product": null,
            "establishment": "/enterprise/Establishment/1/",
            "ebt_no": false,
            "updated_date": "2022-02-27T16:43:34.713712",
            "discountable": true,
            "combo_saving_productset": null,
            "description": "",
            "attribute_type": 0,
            "price": 100.0,
            "created_date": "2015-06-01T11:15:39.174838",
            "tax_codes": [],
            "track_in_inventory": true,
            "require_serial_number": false,
            "upsell_combos": [],
            "product_height_unit": null,
            "happy_hour_price": null,
            "max_price": null,
            "prep_yield": null,
            "not_returnable": false,
            "track_recipe": false,
            "resource_uri": "/resources/Product/919/"
        },
    ]
}

Example POST request to /resources/Product/:

curl --request POST \
     --url https://api-sandbox-revel.revelup.com/resources/Product/ \
     --header 'API-AUTHENTICATION: key:secret' \
     --header 'content-type: application/json' \
     --data '
{
  "is_alcohol": true,
  "name": "XL mojito",
  "price": 22,
  "attribute_type": 0,
  "tax_class": 0,
  "created_by": "/enterprise/User/1/",
  "category": "/products/ProductCategory/1326/",
  "establishment": "/enterprise/Establishment/1/",
  "sorting": 1,
  "updated_by": "/enterprise/User/1/",
  "variable_pricing_by": 1
}
'

Example GET request to /resources/ProductPurchase/(is_alcohol visible on line 29 in code sample):

{
    "objects": [
        {
            "original_price": null,
            "is_cold": false,
            "bin_value": null,
            "conv_ordering_disp": true,
            "quick_pick_group": null,
            "allow_price_override": false,
            "is_combo": 0,
            "product_weight_unit": 0,
            "label_date": "2015-06-01T11:15:39.174838",
            "purchase_product_age": null,
            "sku": "6666",
            "uuid": "b6fce1d2-f25f-4a01-a137-1c9b8c4de58f",
            "purchase_reward_multiplier": 1.0,
            "flat_tax_units": 1,
            "min_price": null,
            "uom": "Unit",
            "show_on_pos": true,
            "crv_value": null,
            "product_brand": null,
            "shopify_sku": null,
            "product_weight": null,
            "item_no": null,
            "sorting": 1,
            "name": "Test Product",
            "limit_type": 0,
            "is_alcohol": false,
            "eligible_for_purchase_rewards": true,
            "point_redeem": null,
            "negative_sales_restricted": false,
            "orderitems": [],
            "commission_type": 0,
            "prevent_sales": false,
            "limit_value": "0.0",
            "sold_by_weight": false,
            "msrp": null,
            "preparation_time": 0,
            "prompt_for_upsell": 0,
            "kitchen_print_name": null,
            "product_price_in_combo": null,
            "cost": "0.0000",
            "third_party_id": null,
            "crv_label": null,
            "pos_column_width": 3,
            "variable_pricing": false,
            "shelf_label_quantity": 1,
            "variable_pricing_by": 0,
            "set_price_per_group_for_combos": false,
            "comments": null,
            "unit_size": null,
            "course_number": null,
            "display_on_kiosk": false,
            "combo_upcharge": "0.0000",
            "color_code": 0,
            "alternate_lookup": null,
            "barcode": "200000000004",
            "list_printers": null,
            "point_value": null,
            "active": false,
            "manufacturer": null,
            "kitchen_description": null,
            "display_online": true,
            "product_width": null,
            "tax_class": 0,
            "tax_included": false,
            "created_date": "2015-06-01T11:15:39.174838",
            "retail": null,
            "kds_tags": "[]",
            "default_inventory": false,
            "promotional_product": null,
            "increase_group_combo_price_based_on_upcharge": false,
            "product_length_unit": null,
            "commission": "0.0000",
            "price_embedded": false,
            "is_drink": false,
            "type": 0,
            "start_date": null,
            "print_tags": true,
            "end_date": null,
            "service_duration": 0,
            "product_height_unit": null,
            "product_width_unit": null,
            "disable_modifier_popup": false,
            "max_threshold_price": null,
            "percent_markup": null,
            "delivery_method": null,
            "dept": null,
            "prompt_for_quantity": false,
            "product_height": null,
            "export": true,
            "attribute_2_name": "",
            "redemption_level": null,
            "dining_options": "[0, 1, 2, 3, 4, 5, 6, 7]",
            "purchase_product_age_msg": null,
            "seasonal_item": false,
            "rti_combo": false,
            "id": 919,
            "surcharge": "0",
            "track_in_inventory": true,
            "not_returnable": false,
            "tare": null,
            "establishment": "/enterprise/Establishment/1/",
            "ebt_no": false,
            "updated_date": "2022-02-27T16:43:34.713712",
            "discountable": true,
            "crv_enabled": false,
            "description": "",
            "attribute_type": 0,
            "price": 100.0,
            "require_serial_number": false,
            "attribute_1_name": "",
            "prep_recipe": false,
            "conv_ordering_sort_order": null,
            "prep_yield": null,
            "max_price": null,
            "product_length": null,
            "track_recipe": false,
            "resource_uri": "/resources/ProductPurchase/919/"
        },
    ]
}

Example GET request to /resources/ViewPurchaseOrderProduct/(is_alcohol visible on line 29 in code sample):

{
    "objects": [
        {
            "original_price": null,
            "is_cold": false,
            "bin_value": null,
            "conv_ordering_disp": true,
            "quick_pick_group": null,
            "allow_price_override": false,
            "is_combo": 0,
            "product_weight_unit": 0,
            "label_date": "2015-06-01T11:15:39.174838",
            "purchase_product_age": null,
            "sku": "6666",
            "uuid": "b6fce1d2-f25f-4a01-a137-1c9b8c4de58f",
            "purchase_reward_multiplier": 1.0,
            "flat_tax_units": 1,
            "min_price": null,
            "uom": "Unit",
            "show_on_pos": true,
            "crv_value": null,
            "product_brand": null,
            "shopify_sku": null,
            "eligible_for_purchase_rewards": true,
            "product_weight": null,
            "item_no": null,
            "sorting": 1,
            "name": "Test Product",
            "is_alcohol": false,
            "attribute_2_name": "",
            "point_redeem": null,
            "negative_sales_restricted": false,
            "commission_type": 0,
            "prevent_sales": false,
            "sold_by_weight": false,
            "preparation_time": 0,
            "prompt_for_upsell": 0,
            "kitchen_print_name": null,
            "product_price_in_combo": null,
            "cost": "0.0000",
            "third_party_id": null,
            "crv_label": null,
            "pos_column_width": 3,
            "variable_pricing": false,
            "shelf_label_quantity": 1,
            "variable_pricing_by": 0,
            "set_price_per_group_for_combos": false,
            "comments": null,
            "unit_size": null,
            "course_number": null,
            "display_on_kiosk": false,
            "combo_upcharge": "0.0000",
            "color_code": 0,
            "alternate_lookup": null,
            "barcode": "200000000004",
            "list_printers": null,
            "point_value": null,
            "active": false,
            "manufacturer": null,
            "kitchen_description": null,
            "display_online": true,
            "product_width": null,
            "tax_class": 0,
            "tax_included": false,
            "created_date": "2015-06-01T11:15:39.174838",
            "retail": null,
            "kds_tags": "[]",
            "default_inventory": false,
            "promotional_product": null,
            "increase_group_combo_price_based_on_upcharge": false,
            "product_length_unit": null,
            "commission": "0.0000",
            "price_embedded": false,
            "is_drink": false,
            "type": 0,
            "print_tags": true,
            "track_in_inventory": true,
            "service_duration": 0,
            "dining_options": "[0, 1, 2, 3, 4, 5, 6, 7]",
            "product_height_unit": null,
            "product_width_unit": null,
            "disable_modifier_popup": false,
            "max_threshold_price": null,
            "percent_markup": null,
            "dept": null,
            "prompt_for_quantity": false,
            "product_height": null,
            "export": true,
            "msrp": null,
            "purchase_product_age_msg": null,
            "seasonal_item": false,
            "rti_combo": false,
            "id": 919,
            "surcharge": "0",
            "not_returnable": false,
            "tare": null,
            "inventory": {
                "updated_date": "2015-06-01T10:15:39.437858",
                "product": "/resources/Product/919/",
                "quantity_in_hand": null,
                "quantity_in_layaway": null,
                "cost": null,
                "threshold": "0.0000",
                "id": 919,
                "resource_uri": "/resources/Inventory/919/"
            },
            "establishment": "/enterprise/Establishment/1/",
            "ebt_no": false,
            "updated_date": "2022-02-27T16:43:34.713712",
            "discountable": true,
            "crv_enabled": false,
            "description": "",
            "attribute_type": 0,
            "price": 100.0,
            "require_serial_number": false,
            "attribute_1_name": "",
            "prep_recipe": false,
            "conv_ordering_sort_order": null,
            "prep_yield": null,
            "max_price": null,
            "product_length": null,
            "track_recipe": false,
            "resource_uri": "/resources/ViewPurchaseOrderProduct/919/"
        },
    ]
}

Discount and DiscountCode endpoint changes

The following features are not widely available until a full release to production. Until further notice, please contact the partnership team to request these features.

Description
Discount codes are managed at the EMS or at the single store level. All children establishments no longer have edit access to discount codes or barcode that have been created by a parent establishment. To adapt to this paradigm shift, the 3rd Party API was changed to fit this hierarchy and behavior.

Discount Resource changes

PUT/PATCH - /resources/Discount/{id} (barcodes are only thing affected by changes)

Endpoint now uses discount code service ownership to determine who can edit. If an establishment without permission tries to edit a discount barcode it will get:

403 Response

{
  "error": "This action is not supported on this establishment. Function managed by EMS"
}

DiscountCode Resource Changes

GET - /resources/DiscountCode/

  1. Max allowed limit per page is 1000 discount codes, any larger amount in request will be overridden during API call.
  2. Filtering capabilities have been removed
    1. i.e. order_by, used, type
  3. Sending a request (https//revel.revelup.com/resources/DiscountCode/) without a discount_id can only be used as a health check endpoint and returns below response:
{
    "objects": [],
    "meta": {
        "page_count": 0,
        "limit": 20,
        "next": null
    }
}
  1. No Error response, will always receive example in #3 if no codes exist or other failures occur in the process of retrieving codes.

PUT - /resources/DiscountCode/{DiscountCodeId}/

PATCH - /resources/DiscountCode/{DiscountCodeId}/

  1. Empty body, bad attributes, or setting a type, used attribute to original status will fail with 400 bad request
  2. Either type or used must be present for update to occur
  3. Both establishment and discount must be present and have the proper permissions to edit otherwise a 403 forbidden error will occur. If one or both is not present it will throw a 400 bad request
  4. The code itself cannot be updated using this endpoint. If you need a discount code with a different code then post and/or import a new one

POST - /resources/DiscountCode/

When the discount is managed from EMS, it can take some time to process the first discount code that is being added only to the base establishment’s discount.

In case if the discount was involved in an EMS push, the request will be rejected with HTTP 403 Forbidden unless the establishment of this discount is the base establishment of that EMS push or the base establishment of the original/top EMS level in case if the discount was pushed to multiple EMS levels.

Available fields

GET - /resources/DiscountCode/

Field NameDescription
discount_id(optional) ID specific to the discount that is used to retrieve a list of discount codes associated
limit(optional) defaults to 20, an integer used to express the amount of discount codes in each paginated request. Max limit = 1000
next(INTERNAL ONLY) token used in API request to find next page of discount codes. This token will be provided via url in response metadata

PUT - /resources/DiscountCode/{DiscountCodeId}/

PATCH - /resources/DiscountCode/{DiscountCodeId}/

Field NameDescription
usedFlag which shows used this DiscountCode or not
typeType of DiscountCode: (0: Multiple time use, 1: One time use)
resource_uriNot required but allowed (will be ignored if provided)
discountdiscount_id of the code (required, used for permission checks)
establishmentestablishment_id of discount (required, used for permission checks)
codebackwards compatibility. Is ignored by service.

POST - /resources/DiscountCode/

Field NameDescription
codeNew discount code. Up to 200 characters long. Required.
typeType of DiscountCode: (0: Multiple time use, 1: One time use). Required.
discountURI of the discount for this discount code. Required.
usedBoolean. Allows to create already used discount codes if you set it to true . Optional, defaults to false.
callback_urlOptional. When the discount is managed from EMS but is on the base establishment for the discount’s EMS level, this POST request will be handled asynchronously and discount code will not be created immediately. You can provide a webhook URL to receive the status for this request.

It will be ignored in case if the discount is not managed from EMS or when the discount already has discount codes that aren’t pushed to the EMS level yet.

Example

GET - /resources/DiscountCode/

Request

https//revel.revelup.com/resources/DiscountCode/?discount_id=123&limit=500&next=0:1

👍

200 response

{
    "objects": [
        {
            "code": "2. .3. .",
            "establishment": "/enterprise/Establishment/1/",
            "discount": "/resources/Discount/141/",
            "used": false,
            "type": 1,
            "id": 402080,
            "resource_uri": "/resources/DiscountCode/402080/"
        },
        {
            "code": "tet5",
            "establishment": "/enterprise/Establishment/1/",
            "discount": "/resources/Discount/141/",
            "used": false,
            "type": 1,
            "id": 402088,
            "resource_uri": "/resources/DiscountCode/402088/"
        }
    ],
    "meta": {
        "page_count": 2,
        "limit": 2,
        "next": "/resources/DiscountCode/?discount_id=141&limit=2&next=2:1"
    }
}

PUT - /resources/DiscountCode/{DiscountCodeId}/

PATCH - /resources/DiscountCode/{DiscountCodeId}/

Request

https//revel.revelup.com/resources/DiscountCode/{{discount_code_id}}/

Body

{
    "code": "cat100002",
    "establishment": "/enterprise/Establishment/1/",
    "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/"
}

❗️

400 response

{}

POST - /resources/DiscountCode/

Body

{
  "code": "42375",
  "type": 0,
  "used": false,
  "discount": "/resources/Discount/14/",
  "establishment": "/enterprise/Establishment/2/"
}

👍

201 Response

{
  "message": "code created successfully"
}

👍

202 Response

{
  "message": "This discount is managed from EMS. The request is being processed asynchronously."
}

🚧

302 Response

Can happen when multiple clients are attempting to create codes for the same discount that is managed from EMS. The first client will get 202 response and the rest clients will be redirected to the same endpoint until the first client’s request gets processed.

❗️

400 Response

{
  "DiscountCode": {
    "discount": [
      "Could not find the provided object via resource URI '/resources/Discount/14/'"
    ]
  }
}

❗️

403 Response

{
  "error": "This action is not supported on this establishment. Function managed by EMS"
}

CustomMenu, ProductGroup and ProductGroupAction endpoint changes

A new field, doordash_marketplace_menu has been added to:

Field name: doordash_marketplace_menu

Value type: boolean

Description: specifies whether or not a given custom menu is an active (True) or inactive (False) DoorDash custom menu. This is required for multi-menu support for our DoorDash integration.

Context: Previously, merchants needed to explicitly name a custom menu DD Marketplace in order to support the DoorDash Marketplace integration. This previous version only supported single menus. However, in order to support multiple menus in DoorDash Marketplace, there was a need to remove the dependency on this naming convention and instead indicate whether a custom menu was a DoorDash Marketplace menu through a setting in the Custom Menu page. As a result, merchants can now customize their menu names and connect these custom menus to DoorDash Marketplace by enabling this setting. Note that this field is only visible with application_type = mode and mode = multi-channel. Setting application type and mode to any other values will hide the setting from the user.

The field will default to false, unless explicitly set to true by user.

Endpoints affected:

All endpoints for the CustomMenu resource will now return this new field in the response:

All endpoints for the ProductGroup resource will now return this new field in the response:

All endpoints for the ProductGroupAction resource will now return this new field in the response:

Example requests/responses

Example GET request to /resources/CustomMenu/ returns the following response (doordash_marketplace_menu appears on line 103 in the code sample):

{
    "objects": [
        {
            "updated_date": "2015-11-18T05:44:57.121391",
            "restricted_products": false,
            "stations": [],
            "application_type": 2,
            "price_tier": null,
            "active": true,
            "third_party_price_upcharge": null,
            "mode": 2,
            "timetable": {
                "updated_date": "2015-11-18T05:44:57.121391",
                "updated_by": "/enterprise/User/2/",
                "type": 1,
                "timetable_data": [
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 0,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 1,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 1,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 2,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 2,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 3,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 3,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 4,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 4,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 5,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 5,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 6,
                        "open_time": "00:00:00"
                    },
                    {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "close_time": "23:59:00",
                        "updated_by": "/enterprise/User/2/",
                        "created_by": "/enterprise/User/2/",
                        "day_of_week": 6,
                        "created_date": "2015-11-18T05:44:57.121391",
                        "timetable": "/resources/Timetable/13/",
                        "id": 7,
                        "open_time": "00:00:00"
                    }
                ],
                "created_by": "/enterprise/User/2/",
                "from_date": "1900-01-01",
                "to_date": "2100-01-01",
                "created_date": "2015-11-18T05:44:57.121391",
                "active": true,
                "establishment": "/enterprise/Establishment/1/",
                "id": 13
            },
            "doordash_marketplace_menu": false,
            "product_group": {
                "updated_date": "2015-11-18T05:44:57.121391",
                "sorting": 0,
                "updated_by": "/enterprise/User/2/",
                "created_by": "/enterprise/User/2/",
                "name": "Kiosk",
                "created_date": "2015-11-18T05:44:57.121391",
                "active": true,
                "establishment": "/enterprise/Establishment/1/",
                "id": 9,
                "resource_uri": "/resources/ProductGroup/9/"
            },
            "id": 1,
            "resource_uri": "/resources/CustomMenu/1/"
        },
    ]
}

Example GET request to /resources/ProductGroup/ returns the following response (doordash_marketplace_menu appears on line 111 in the code sample):

{
    "objects": [
        {
            "updated_date": "2015-11-18T05:44:57.121391",
            "sorting": 0,
            "updated_by": "/enterprise/User/2/",
            "establishment": "/enterprise/Establishment/1/",
            "actions": [
                {
                    "active": true,
                    "action_data": {
                        "updated_date": "2015-11-18T05:44:57.121391",
                        "restricted_products": false,
                        "stations": [],
                        "application_type": 2,
                        "price_tier": null,
                        "active": true,
                        "third_party_price_upcharge": null,
                        "mode": 2,
                        "timetable": {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "updated_by": "/enterprise/User/2/",
                            "type": 1,
                            "timetable_data": [
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 0,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 1,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 1,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 2,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 2,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 3,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 3,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 4,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 4,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 5,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 5,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 6,
                                    "open_time": "00:00:00"
                                },
                                {
                                    "updated_date": "2015-11-18T05:44:57.121391",
                                    "close_time": "23:59:00",
                                    "updated_by": "/enterprise/User/2/",
                                    "created_by": "/enterprise/User/2/",
                                    "day_of_week": 6,
                                    "created_date": "2015-11-18T05:44:57.121391",
                                    "timetable": "/resources/Timetable/13/",
                                    "id": 7,
                                    "open_time": "00:00:00"
                                }
                            ],
                            "created_by": "/enterprise/User/2/",
                            "from_date": "1900-01-01",
                            "to_date": "2100-01-01",
                            "created_date": "2015-11-18T05:44:57.121391",
                            "active": true,
                            "establishment": "/enterprise/Establishment/1/",
                            "id": 13
                        },
                        "doordash_marketplace_menu": false,
                        "product_group": "/resources/ProductGroup/9/",
                        "id": 1,
                        "resource_uri": "/resources/CustomMenu/1/"
                    },
                    "action_type": "CustomMenu",
                    "resource_uri": "/resources/ProductGroupAction/9/"
                }
            ],
            "id": 9,
            "discounts": false,
            "products": [],
            "created_by": "/enterprise/User/2/",
            "created_date": "2015-11-18T05:44:57.121391",
            "tax_rule": 0,
            "resource_uri": "/resources/ProductGroup/9/",
            "active": true,
            "display": false,
            "name": "Kiosk"
        },
    ]
}

👍

Example POST request to /resources/ProductGroup/ returning response 201:

curl --request POST \
     --url https://api-sandbox-revel.revelup.com/resources/ProductGroup/ \
     --header 'API-AUTHENTICATION: key:secret' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "Test Product Group 1",
  "created_by": "/enterprise/User/1/",
  "establishment": "/enterprise/Establishment/1/",
  "sorting": 1,
  "updated_by": "/enterprise/User/1/",
  "actions": [
    {
      "action_data": {
        "doordash_marketplace_menu": true
      }
    }
  ]
}
'

Example GET request to /resources/ProductGroupAction/ returns the following response (doordash_marketplace_menu appears on line 105 in the code sample):

{
    "objects": [
        {
            "active": true,
            "action_data": {
                "updated_date": "2015-11-18T05:44:57.121391",
                "restricted_products": false,
                "stations": [],
                "application_type": 2,
                "price_tier": null,
                "active": true,
                "third_party_price_upcharge": null,
                "mode": 2,
                "timetable": {
                    "updated_date": "2015-11-18T05:44:57.121391",
                    "updated_by": "/enterprise/User/2/",
                    "type": 1,
                    "timetable_data": [
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 0,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 1,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 1,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 2,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 2,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 3,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 3,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 4,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 4,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 5,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 5,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 6,
                            "open_time": "00:00:00"
                        },
                        {
                            "updated_date": "2015-11-18T05:44:57.121391",
                            "close_time": "23:59:00",
                            "updated_by": "/enterprise/User/2/",
                            "created_by": "/enterprise/User/2/",
                            "day_of_week": 6,
                            "created_date": "2015-11-18T05:44:57.121391",
                            "timetable": "/resources/Timetable/13/",
                            "id": 7,
                            "open_time": "00:00:00"
                        }
                    ],
                    "created_by": "/enterprise/User/2/",
                    "from_date": "1900-01-01",
                    "to_date": "2100-01-01",
                    "created_date": "2015-11-18T05:44:57.121391",
                    "active": true,
                    "establishment": "/enterprise/Establishment/1/",
                    "id": 13
                },
                "doordash_marketplace_menu": false,
                "product_group": "/resources/ProductGroup/9/",
                "id": 1,
                "resource_uri": "/resources/CustomMenu/1/"
            },
            "action_type": "CustomMenu",
            "resource_uri": "/resources/ProductGroupAction/9/"
        },
    ]
}

👍

Example POST request to /resources/ProductGroupAction/ returning response 201

curl --request POST \
     --url https://api-sandbox-revel.revelup.com/resources/ProductGroupAction/ \
     --header 'API-AUTHENTICATION: key:secret' \
     --header 'content-type: application/json' \
     --data '
{
  "action_data": {
    "active": false,
    "doordash_marketplace_menu": true,
    "price_tier": {
      "active": true,
      "is_admin": false
    },
    "timetable": {
      "active": false,
      "type": 0
    }
  }
}
'