toasttab
Authentication API
The authentication API returns an authentication token that you can present when your integration client software uses other Toast APIs. For more information about authentication, see the Toast Developer Guide.
Menus API
Returns information about a restaurant's menus.
Important: Ordering integrations should use menus API V3. Other integration types should continue to use menus API V2 until further notice. See <a href="https://doc.toasttab.com/doc/devguide/apiComparingMenusAPIV2AndV3.html\">Comparing menus API V2 and V3 for more information.
Orders API
The orders API includes operations that create, update, and retrieve information about restaurant guest orders.
Information on orders includes the checks, items ordered, prices, payments, discounts, and customer data.
You can create a new order. The orders API includes an operation to retrieve the order prices before you POST the order.
You can add items to an existing check.
The orders API also allows you to retrieve payment information for the order and add a credit card payment to the order. You cannot update an existing payment, but you can update the tip amount.
For delivery orders, you can update the delivery information.
You can retrieve the applicable discounts for an order, and then add a discount to a menu item selection or a check.
The orders API supports email addresses that:
- Are up to 53 characters long.
- Start with the email prefix, ends with the email domain name, where the prefix and domain are separated by an @.
- Use the following supported characters:
- a-z
- A-Z
- 0-9
- _ (underscore)
- International characters are not supported
Labor API
Toast labor API is a set of REST web services that you can use to manage the employees, jobs, and shifts for your restaurant. The labor API is intended for software engineers, managers, and technical staff who are responsible for integrating third-party systems with the Toast platform.
Restaurants API
Returns information about the configuration of restaurant.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.1.2
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import toastapi
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import toastapi
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import toastapi
from toastapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ws-sandbox-api.eng.toasttab.com
# See configuration.py for a list of all supported configuration parameters.
configuration = toastapi.Configuration(
host = "https://ws-sandbox-api.eng.toasttab.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
async with toastapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = toastapi.AlternatePaymentTypesApi(api_client)
toast_restaurant_external_id = 'toast_restaurant_external_id_example' # str | The Toast POS GUID of the restaurant that the alternate payment type is configured for.
guid = 'guid_example' # str | The Toast POS GUID of the alternative form of payment.
try:
# Get an alternative payment type
api_response = await api_instance.get_alternate_payment_type_by_id(toast_restaurant_external_id, guid)
print("The response of AlternatePaymentTypesApi->get_alternate_payment_type_by_id:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AlternatePaymentTypesApi->get_alternate_payment_type_by_id: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://ws-sandbox-api.eng.toasttab.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AlternatePaymentTypesApi | get_alternate_payment_type_by_id | GET /config/v2/alternatePaymentTypes/{guid} | Get an alternative payment type |
| AlternatePaymentTypesApi | list_alternate_payment_types | GET /config/v2/alternatePaymentTypes | Get alternative payment types |
| AnalyticsApi | create_guest_reporting_data_request | POST /era/v1/guest/payments/{timeRange} | Post a guest reporting data request organized by payment for a specific time range |
| AnalyticsApi | get_guest_reporting_data | GET /era/v1/guest/payments/{reportRequestGuid} | Get the guest reporting data organized by payment |
| AuthenticationApi | login | POST /authentication/v1/authentication/login | Get an authentication token |
| BreakTypesApi | get_break_type_by_id | GET /config/v2/breakTypes/{guid} | Get a break type |
| BreakTypesApi | list_break_types | GET /config/v2/breakTypes | Get break types |
| CashDrawersApi | get_cash_drawer_by_id | GET /config/v2/cashDrawers/{guid} | Get a cash drawer |
| CashDrawersApi | list_cash_drawers | GET /config/v2/cashDrawers | Get cash drawers |
| DiningOptionsApi | get_dining_option_by_id | GET /config/v2/diningOptions/{guid} | Get a dining option |
| DiningOptionsApi | list_dining_options | GET /config/v2/diningOptions | Get dining options |
| DiscountsApi | add_check_level_discounts | POST /orders/v2/orders/{orderGuid}/checks/{checkGuid}/appliedDiscounts | Add check-level discounts |
| DiscountsApi | add_item_level_discounts | POST /orders/v2/orders/{orderGuid}/checks/{checkGuid}/selections/{selectionGuid}/appliedDiscounts | Add item-level discounts |
| DiscountsApi | get_applicable_discounts | POST /orders/v2/applicableDiscounts | Get applicable discounts |
| DiscountsApi | get_discount_by_id | GET /config/v2/discounts/{guid} | Get a discount |
| DiscountsApi | list_discounts | GET /config/v2/discounts | Get discounts |
| EmployeesApi | add_external_identifier_to_employee | POST /labor/v1/employees/{employeeId}/externalId | Add an external identifier |
| EmployeesApi | add_or_replace_external_identifier_to_employee | PUT /labor/v1/employees/{employeeId}/externalId | Add or replace an external identifier |
| EmployeesApi | create_employee | POST /labor/v1/employees | Add an employee |
| EmployeesApi | delete_employee | DELETE /labor/v1/employees/{employeeId} | Delete an employee |
| EmployeesApi | get_employee_by_id | GET /labor/v1/employees/{employeeId} | Get information about one employee |
| EmployeesApi | list_employees | GET /labor/v1/employees | Get employees |
| EmployeesApi | replace_jobs_list | PUT /labor/v1/employees/{employeeId}/jobs | Replace a jobs list |
| EmployeesApi | replace_wage_overrides | PUT /labor/v1/employees/{employeeId}/wageOverrides | Replace wage overrides |
| EmployeesApi | unarchive_employee | PUT /labor/v1/employees/{employeeId}/unarchive | Unarchive an employee |
| EmployeesApi | update_employee | PATCH /labor/v1/employees/{employeeId} | Update employee information |
| JobsApi | add_external_identifier_to_job | POST /labor/v1/jobs/{jobId}/externalId | Add an external identifier |
| JobsApi | add_or_replace_external_identifier_to_job | PUT /labor/v1/jobs/{jobId}/externalId | Add or replace an external identifier |
| JobsApi | get_job_by_id | GET /labor/v1/jobs/{jobId} | Get one job |
| JobsApi | list_jobs | GET /labor/v1/jobs | Get jobs |
| MenuGroupsApi | get_menu_group_by_id | GET /config/v2/menuGroups/{guid} | Get a menu group |
| MenuGroupsApi | list_menu_groups | GET /config/v2/menuGroups | Get menu groups |
| MenuItemsApi | get_menu_item_by_id | GET /config/v2/menuItems/{guid} | Get a menu item |
| MenuItemsApi | list_menu_items | GET /config/v2/menuItems | Get menu items |
| MenusV2Api | get_menus_metadata | GET /menus/v2/metadata | Get menu last modified timestamp (V2) |
| MenusV2Api | list_menus | GET /menus/v2/menus | Get menus (V2) |
| MenusV3Api | get_menus_metadata_v3 | GET /menus/v3/metadata | Get menu last modified timestamp |
| MenusV3Api | list_menus_v3 | GET /menus/v3/menus | Get menus |
| ModifierGroupsApi | get_menu_option_group_by_id | GET /config/v2/menuOptionGroups/{guid} | Get a modifier group |
| ModifierGroupsApi | list_menu_option_groups | GET /config/v2/menuOptionGroups | Get modifier groups |
| NoSaleReasonsApi | get_no_sale_reason_by_id | GET /config/v2/noSaleReasons/{guid} | Get a no sale reason |
| NoSaleReasonsApi | list_no_sale_reasons | GET /config/v2/noSaleReasons | Get no sale reasons |
| OrdersApi | add_items_to_check | POST /orders/v2/orders/{orderGuid}/checks/{checkGuid}/selections | Add items to a check |
| OrdersApi | calculate_order_prices | POST /orders/v2/prices | Get order prices |
| OrdersApi | create_order | POST /orders/v2/orders | Post an order |
| OrdersApi | get_multiple_orders | GET /orders/v2/ordersBulk | Get multiple orders |
| OrdersApi | get_order_by_guid | GET /orders/v2/orders/{guid} | Get an order |
| OrdersApi | list_order_identifiers | GET /orders/v2/orders | Get order identifiers (deprecated) |
| OrdersApi | update_delivery_info | PATCH /orders/v2/orders/{orderGuid}/deliveryInfo | Update delivery information |
| OrdersApi | void_order | POST /orders/v2/orders/{orderGuid}/void | Void an order |
| PaymentsApi | add_payments_to_check | POST /orders/v2/orders/{orderGuid}/checks/{checkGuid}/payments | Post payments |
| PaymentsApi | get_payment_by_guid | GET /orders/v2/payments/{guid} | Get a payment |
| PaymentsApi | list_payments | GET /orders/v2/payments | Get payment identifiers |
| PaymentsApi | update_tip_amount | PATCH /orders/v2/orders/{orderGuid}/checks/{checkGuid}/payments/{paymentGuid} | Update a tip amount |
| PayoutReasonsApi | get_payout_reason_by_id | GET /config/v2/payoutReasons/{guid} | Get payout reason by GUID |
| PayoutReasonsApi | list_payout_reasons | GET /config/v2/payoutReasons | Get payout reasons |
| PreModifierGroupsApi | get_pre_modifier_group_by_id | GET /config/v2/preModifierGroups/{guid} | Get a pre-modifier group |
| PreModifierGroupsApi | list_pre_modifier_groups | GET /config/v2/preModifierGroups | Get pre modifier groups |
| PreModifiersApi | list_pre_modifiers | GET /config/v2/preModifiers | Get pre-modifiers |
| PriceGroupsApi | get_price_group_by_id | GET /config/v2/priceGroups/{guid} | Get price group by GUID |
| PriceGroupsApi | list_price_groups | GET /config/v2/priceGroups | Get price groups |
| PrintersApi | get_printer_by_id | GET /config/v2/printers/{guid} | Get a printer |
| PrintersApi | list_printers | GET /config/v2/printers | Get printers |
| RestaurantServicesApi | get_restaurant_service_by_id | GET /config/v2/restaurantServices/{guid} | Get restaurant service by GUID |
| RestaurantServicesApi | list_restaurant_services | GET /config/v2/restaurantServices | Get restaurant services |
| RestaurantsApi | get_restaurant_by_id | GET /restaurants/v1/restaurants/{restaurantGUID} | Get restaurant configuration information |
| RestaurantsApi | list_restaurants_in_management_group | GET /restaurants/v1/groups/{managementGroupGUID}/restaurants | Get restaurants in a management group |
| RevenueCentersApi | get_revenue_center_by_id | GET /config/v2/revenueCenters/{guid} | Get revenue center by GUID |
| RevenueCentersApi | list_revenue_centers | GET /config/v2/revenueCenters | Get revenue centers |
| SalesCategoriesApi | get_sales_category_by_id | GET /config/v2/salesCategories/{guid} | Get a menu item sales category |
| SalesCategoriesApi | list_sales_categories | GET /config/v2/salesCategories | Get menu item sales categories |
| ServiceAreasApi | get_service_area_by_id | GET /config/v2/serviceAreas/{guid} | Get service area by GUID |
| ServiceAreasApi | list_service_areas | GET /config/v2/serviceAreas | Get service areas |
| ServiceChargesApi | get_service_charge_by_id | GET /config/v2/serviceCharges/{guid} | Get service charge by GUID |
| ServiceChargesApi | list_service_charges | GET /config/v2/serviceCharges | Get service charges |
| ShiftsApi | create_shift | POST /labor/v1/shifts | Create a shift |
| ShiftsApi | delete_shift | DELETE /labor/v1/shifts/{shiftId} | Delete a shift |
| ShiftsApi | get_shift_by_id | GET /labor/v1/shifts/{shiftId} | Get a shift |
| ShiftsApi | list_shifts | GET /labor/v1/shifts | Get shifts |
| ShiftsApi | update_shift | PUT /labor/v1/shifts/{shiftId} | Update a shift |
| TablesApi | get_table_by_id | GET /config/v2/tables/{guid} | Get a table |
| TablesApi | list_tables | GET /config/v2/tables | Get tables |
| TaxRatesApi | get_tax_rate_by_id | GET /config/v2/taxRates/{guid} | Get tax rate by GUID |
| TaxRatesApi | list_tax_rates | GET /config/v2/taxRates | Get tax rates |
| TimeEntriesApi | get_time_entry_by_id | GET /labor/v1/timeEntries/{timeEntryId} | Get one time entry |
| TimeEntriesApi | list_time_entries | GET /labor/v1/timeEntries | Get time entries |
| TipWithholdingApi | get_tip_withholding | GET /config/v2/tipWithholding | Get tip withholding configuration |
| VoidReasonsApi | get_void_reason_by_id | GET /config/v2/voidReasons/{guid} | Get void reason by GUID |
| VoidReasonsApi | list_void_reasons | GET /config/v2/voidReasons | Get void reasons |
Documentation For Models
- Alcohol
- AlternatePaymentType
- ApplicableDiscount
- ApplicableDiscountsRequest
- AppliedDiscount
- AppliedDiscountReason
- AppliedDiscountTrigger
- AppliedLoyaltyInfo
- AppliedPackagingInfo
- AppliedPackagingItem
- AppliedServiceCharge
- AppliedTaxRate
- AuthenticationRequest
- AuthenticationResponse
- AuthenticationToken
- Availability
- BreakType
- CashDrawer
- Check
- ConfigReference
- ContentAdvisories
- CurbsidePickupInfo
- Customer
- DaySchedule
- Delivery
- DeliveryInfo
- DeliveryPaymentOptions
- DeliveryServiceInfo
- Device
- DimensionUnitOfMeasure
- DiningOption
- Discount
- Employee
- ErrorMessage
- ExternalReference
- General
- GiftCardInfo
- GuestReportingDataInProgress
- GuestReportingDataRequest
- GuestReportingDataResponse
- Hours
- ItemTag
- Job
- JobWageOverride
- Location
- LoyaltyDetails
- MarketplaceFacilitatorTaxInfo
- Menu
- MenuGroup
- MenuItem
- MenuItemSimple
- MenuItemSimpleImagesInner
- MenuItemSimpleOptionGroupsInner
- MenuOptionGroup
- Metadata
- ModifierGroup
- ModifierOption
- ModifierOptionTaxInfo
- NoSaleReason
- OnlineOrdering
- Order
- OrderResponse
- Payment
- PaymentOptions
- PayoutReason
- Portion
- PreModifier
- PreModifierGroup
- PrepTimes
- PriceGroup
- PricingRules
- Printer
- Refund
- RefundDetails
- Restaurant
- RestaurantBasic
- RestaurantInfo
- RestaurantService
- RevenueCenter
- SalesCategory
- Schedule
- Schedules
- Selection
- SequencePrice
- Service
- ServiceArea
- ServiceCharge
- ServiceChargeCriteria
- Shift
- SizeSequencePricingRule
- Table
- TakeoutPaymentOptions
- TaxRate
- TaxTableRow
- TimeEntry
- TimeEntryBreak
- TimeRange
- TimeSpecificPrice
- TipWithholding
- ToastReference
- URLs
- UpdateDeliveryInfoRequest
- UpdatePaymentRequest
- VoidInformation
- VoidOrderRequest
- VoidOrderRequestSelections
- VoidReason
- WeekSchedule
- WeightUnitOfMeasure
Documentation For Authorization
Authentication schemes defined for the API:
oauth2
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- restaurants:read: Allows reading from the restaurants API.
- labor:read: Allows reading from the labor API.
- orders:read: Allows reading from the orders API.
- orders:write: Allows writing to the orders API.
- payments:read: Allows reading from the payments API.
- payments:write: Allows writing to the payments API.
- discounts:read: Allows reading from the discounts API.
- discounts:write: Allows writing to the discounts API.
- menus.channel:read: Allows reading from the menus API.
- menus:read: Allows reading from menus API V2.
- config:read: Allows reading from the configuration API.
Author
Metadata
Release files for toastapi 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| toastapi-1.1.2.tar.gz | 216.4 kB | Without provenance | Details for toastapi-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toastapi-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for toastapi-1.1.2-py3-none-any.whl |
Total release size: 686.2 kB
Release files / toastapi-1.1.2.tar.gz
| Download URL | toastapi-1.1.2.tar.gz |
|---|---|
| Size | 216.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f84d8d70816237639a147324b43330ffe34760e93cb15b0db9238d79c5e763fc
|
|
BLAKE2b-256 checksum How to use checksums |
88877719cf77cee3fe45ce577da390fb72913fef8cca3968d28190d7fde04a30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / toastapi-1.1.2-py3-none-any.whl
| Download URL | toastapi-1.1.2-py3-none-any.whl |
|---|---|
| Size | 469.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc4d5d46185e23e787575142063684f29a94e87319505024632e76e37c261e35
|
|
BLAKE2b-256 checksum How to use checksums |
33fa074e2e6a3fff00ca9f6ef6d26fedd9d356ee1c50e5ffdb98a545a936d446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for toastapi 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.