Revel 2.76 API Updates
Welcome to the 2.76 Revel API changelog!
In Revel 2.76, we made some useful changes to our Orders resources.
Please review the changes below in order to test and update your integration accordingly.
Modified resources:
API modifications made to /resources/Order:
-
A new field,
loyalty_account_id
has been added.
Field name:loyalty_account_id
Value type: string
Description: Identifier of the loyalty account that was applied to the order. Note: This data is only populated for Paytronix orders at this time. -
All endpoints for the Orders resource will now return this new field in the response:
GET /resources/Orders/
POST /resources/Orders/
GET /resources/Orders/{OrderId}/
PATCH /resources/Orders/{OrderId}/
PUT /resources/Orders/{OrderId}/
-
This field allows integrated partners to retrieve the Paytronix loyalty account associated with a specific order.
The field will have a string value of the Paytronix loyalty account identifier if an account was applied to the order, otherwise it will default tonull
.
The new field is read only and cannot be updated.
Example of an order with the loyalty_account_id
:
{
"running_tax_number": "18",
"web_order": true,
"has_items": true,
"registry_data": {
"coo_counter": 0,
"custom_data": "W3siYmOjB9XQ",
"fiscale_sale_id": "5768330B",
"id": 2215,
"order": "/resources/Order/216962/",
"printer_serial": "10000101",
"resource_uri": "/resources/OrderRegistryData/2215/"
},
"exchange_discount": true,
"gift_reward_data": "{'shell_reward_data':{'card_number':'1234','awarding':{'purchase_points':10}}}",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"created_by": "/enterprise/User/7/",
"service_fee_untaxed": 26.73,
"discount_tax_amount_included": 26.73,
"discount_amount": 26.73,
"sent": true,
"exchanged": true,
"updated_by": "/enterprise/User/7/",
"check_sum": "31a942ce2956c20bf0e6f32909557463",
"delivery_employee": "/enterprise/User/7/",
"crv_value": 26.73,
"delivery_duration": 2673,
"table_owner": "/enterprise/User/7/",
"surcharge_excluded": 26.73,
"taxable_surcharge_excluded": 26.73,
"number_of_people": 2673,
"notes": "hello world",
"applied_discounts": [
{
"discount": "/resources/Discount/5/",
"discount_amount": "5.0000",
"discount_code": "",
"discount_function": 0,
"id": 13,
"name": "Test",
"qty": 1,
"resource_uri": "/resources/AppliedDiscountOrder/19/",
"rule_amount": "5.0000",
"rule_type": 0,
"stackable_type": 0,
"tax_amount_included": "5.0000",
"taxed": false,
"uuid": "d067a585-3fe9-45ac-8fa3-32a2c228bddc"
}
],
"pos_mode": "T",
"ha_applied": true,
"deleted_discounts": "{'service_fees':[21],'discounts':['188']}",
"points_added": 2673,
"bills_info": "Divided bills",
"tax_excluded_amount": 26.73,
"auto_grat_pct": 26.73,
"is_discounted": true,
"tax_rounding_model": 0,
"notification_email_sent": false,
"delivery_distance": 2673,
"gratuity_type": 0,
"order_history": [
"/resources/OrderHistory/1/"
],
“loyalty_account_id”: “10685000000071”,
"closed": true,
"tax_country": "usa",
"discount_code": "1234",
"pickup_time": "2015-01-29T13:01:03",
"pickup_data": {
"email": "[email protected]",
"status": 0,
"call_name": "The order has been created for testing",
"pickup_type": 0,
"phone_number": "1234567890",
"vehicle_make": "Tesla",
"vehicle_type": "Car",
"vehicle_color": "White",
"customer_arrived": false,
"send_confirmation": false
},
"asap": true,
"deleted": true,
"has_delivery_info": true,
"reporting_id": 2673,
"discount_nontaxable_surcharge_included": 26.73,
"taxable_surcharge": 26.73,
"delivery_address": {
"active": true,
"city": "San Francisco",
"company_name": "Revel",
"country": "US",
"created_date": "2019-06-10T20:54:53.158483",
"delivery_instructions": "Leave package on front desk.",
"email": "[email protected]",
"id": 0,
"name": "Home address",
"phone_number": "+01234567",
"primary_billing": false,
"primary_shipping": false,
"resources_uri": "string",
"state": "California",
"street_1": "170 columbus ave",
"street_2": "6th floor, door 601",
"updated_date": "2019-06-10T20:54:53.158483",
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"zipcode": "string"
},
"final_total": 26.73,
"discount": "resources/Discount/11/",
"is_invoice": true,
"delivery_clock_in": "2015-01-29T13:01:03",
"created_date": "2015-01-29T13:01:03",
"delivery_clock_out": "2015-01-29T13:01:03.845062",
"discount_tax_amount": 26.73,
"rounding_delta": 26.73,
"is_unpaid": true,
"tax_rebate": 26.73,
"table": "/resources/Table/11/",
"discount_reason": "RE-Price",
"notification_text_sent": true,
"last_updated_at": "/resources/PosStation/23/",
"subtotal": 26.73,
"vehicle": "/resources/CustomerVehicle/1/",
"discount_taxed": true,
"applied_taxes": [
{
"dining_options": "\"[0, 1, 2, 3, 4, 5, 6, 7]\"",
"fiscal_rate": 2,
"id": 1379,
"is_prevailing": true,
"local_tax_id": 141,
"max_quantity_threshold": 2673,
"max_threshold": "5.0000",
"min_quantity_threshold": 2673,
"min_threshold": "5.0000",
"name": "Prevailing Tax",
"on_full_price": true,
"order": "/resources/Order/2196/",
"resource_uri": "/resources/AppliedTaxOrder/1379/",
"rounding_type": 0,
"tax_rate": "3.1400",
"tax_table": "/resources/TaxTable/1/",
"tax_type": 0,
"uuid": "d067a585-3fe9-45ac-8fa3-32a2c228bddc"
}
],
"prevailing_tax": 26.73,
"invoice_date": "2015-01-29T13:01:03",
"discount_rule_type": 0,
"service_charge": 26.73,
"customer": "/resources/Customer/1/",
"applied_service_fee": [
{
"amount": "1.000000",
"application_type": 0,
"apply_to": 0,
"created_date": "2016-12-29T15:30:34",
"deleted": false,
"id": 17617,
"include_employee_pass_through_fee_in": 0,
"invoice_document_uuid": null,
"item": "/resources/OrderItem/391553/",
"local_service_fee_id": 824,
"name": "Item SF_eatin",
"order": "/resources/Order/330600/",
"parent_uuid": "b435d358-70fc-4f24-8635-5c090869b7f4",
"passthrough_amount": "0.000000",
"passthrough_type": 0,
"pass_through_fee_type": -1,
"post_tax": false,
"resource_uri": "/resources/AppliedServiceFee/17617/",
"sort": 0,
"tax_amount": "0.067890",
"taxed": true,
"total_amount": "1.000000",
"type": 0,
"updated_date": "2016-12-29T15:30:34",
"uuid": "c1559168-8dfb-4d31-beaa-4789c56f77bf"
}
],
"package": [
"/resources/Package/171/"
],
"remaining_due": 26.73,
"has_history": true,
"tax": 26.73,
"bill_number": 2673,
"id": 2673,
"surcharge": 26.73,
"points_redeemed": 2673,
"call_number": 2673,
"delivery_estimated_distance": 2673,
"bill_parent": "/resources/Order/1/",
"establishment": "/enterprise/Establishment/1/",
"updated_date": "2015-01-29T13:01:03",
"prevailing_surcharge": 26.73,
"gratuity": 26.73,
"dining_option": 0,
"bills_type": 0,
"call_name": "The order has been created for testing",
"printed": true,
"customer_birthdate": "2015-01-29T13:01:03",
"device_id": "/resources/PosStation/23/",
"discounted_by": "/enterprise/User/7/",
"discount_rule_amount": 26.73,
"is_readonly": true,
"service_fee_taxed": 26.73,
"created_at": "/resources/PosStation/23/",
"service_fee_tax": 26.73,
"discount_total_amount": 26.73,
"crv_taxed": true,
"local_id": "232",
"external_sync": 2673,
"resource_uri": "/resources/Order/23/",
"customer_address_distance": 673,
"version": 2,
"virtual_data": "{}"
}