openapi: 3.0.3 info: title: Lunchbox Core Customer API description: 'The Lunchbox 2.0 Core API is used for interfacing with Lunchbox ordering functions and building frontend interfaces that interact with the variety of Lunchbox integrations: POS, Last Mile, Loyalty, Marketing, Gift Card and more. It exposes customer (guest) account management, store and menu data, order creation and item management, discounts, payments, group ordering, and order webhooks. The API uses standard HTTP status codes and all schemas are in JSON format.' version: '2.0' contact: name: Lunchbox Support email: support@lunchbox.io url: https://docs.lunchbox.io/ termsOfService: https://lunchbox.io/ servers: - url: https://{chain_name}.lunchbox.io/api/v2 description: Per-chain Lunchbox 2.0 Core API base URL variables: chain_name: default: chain description: The restaurant chain's Lunchbox subdomain security: - tokenAuth: [] tags: - name: Customer description: Guest account registration, authentication, and profile management. paths: /customers/login: post: tags: - Customer summary: Lunchbox Log in a Customer operationId: loginCustomer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LoginRequest' example: username: demo@lunchbox.io password: '12345678' responses: '200': description: Customer authenticated. content: application/json: schema: $ref: '#/components/schemas/AuthSession' examples: LoginCustomer200Example: summary: Default loginCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/registration: post: tags: - Customer summary: Lunchbox Register a Customer operationId: registerCustomer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RegistrationRequest' examples: RegisterCustomerRequestExample: summary: Default registerCustomer request x-microcks-default: true value: {} responses: '200': description: Customer created. content: application/json: schema: $ref: '#/components/schemas/Customer' examples: RegisterCustomer200Example: summary: Default registerCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/logout: post: tags: - Customer summary: Lunchbox Log Out a Customer operationId: logoutCustomer responses: '200': description: Customer logged out. content: application/json: schema: type: object properties: ok: type: string example: Logged out examples: LogoutCustomer200Example: summary: Default logoutCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/guest: post: tags: - Customer summary: Lunchbox Log in as a Guest operationId: loginGuest responses: '200': description: Guest session created. content: application/json: schema: type: object properties: customer_id: type: integer ok: type: boolean examples: LoginGuest200Example: summary: Default loginGuest 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/login_by_foreign_auth: post: tags: - Customer summary: Lunchbox Log in by Foreign Auth operationId: loginByForeignAuth responses: '200': description: Customer authenticated via a third-party identity provider. content: application/json: schema: $ref: '#/components/schemas/AuthSession' examples: LoginByForeignAuth200Example: summary: Default loginByForeignAuth 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/password: post: tags: - Customer summary: Lunchbox Request or Reset Password operationId: customerPassword responses: '200': description: Password reset email or update processed. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/send-verify-phone: post: tags: - Customer summary: Lunchbox Send Phone Verification operationId: sendVerifyPhone responses: '200': description: Verification code sent to the customer's phone. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/verify-phone: post: tags: - Customer summary: Lunchbox Verify Phone operationId: verifyPhone responses: '200': description: Phone number verified. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/send-verify-code: post: tags: - Customer summary: Lunchbox Send Email Verification Code operationId: sendVerifyCode responses: '200': description: Verification code sent to the customer's email. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/verify: post: tags: - Customer summary: Lunchbox Verify Email operationId: verifyEmail responses: '200': description: Email verified. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/me: get: tags: - Customer summary: Lunchbox Get the Current Customer operationId: getCurrentCustomer responses: '200': description: The authenticated customer. content: application/json: schema: $ref: '#/components/schemas/Customer' examples: GetCurrentCustomer200Example: summary: Default getCurrentCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get a Customer operationId: getCustomer responses: '200': description: The requested customer. content: application/json: schema: $ref: '#/components/schemas/Customer' examples: GetCustomer200Example: summary: Default getCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Update a Customer operationId: updateCustomer requestBody: content: application/json: schema: $ref: '#/components/schemas/Customer' examples: UpdateCustomerRequestExample: summary: Default updateCustomer request x-microcks-default: true value: {} responses: '200': description: Customer updated. content: application/json: schema: $ref: '#/components/schemas/Customer' examples: UpdateCustomer200Example: summary: Default updateCustomer 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Customer operationId: deleteCustomer responses: '200': description: Customer deleted. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/preferences: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get Customer Preferences operationId: getCustomerPreferences responses: '200': description: Customer preferences. x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Update Customer Preferences operationId: updateCustomerPreferences responses: '200': description: Preferences updated. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/addresses: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox List Customer Addresses operationId: listCustomerAddresses responses: '200': description: Customer addresses. content: application/json: schema: type: array items: $ref: '#/components/schemas/Address' examples: ListCustomerAddresses200Example: summary: Default listCustomerAddresses 200 response x-microcks-default: true value: {} x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Add a Customer Address operationId: addCustomerAddress requestBody: content: application/json: schema: $ref: '#/components/schemas/Address' examples: AddCustomerAddressRequestExample: summary: Default addCustomerAddress request x-microcks-default: true value: {} responses: '200': description: Address added. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Customer Address operationId: deleteCustomerAddress parameters: - name: address_id in: query required: true schema: type: integer example: 1234 responses: '200': description: Address deleted. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/saved-cards: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox List Saved Cards operationId: listSavedCards responses: '200': description: Saved payment cards. x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Add a Saved Card operationId: addSavedCard responses: '200': description: Card saved. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Saved Card operationId: deleteSavedCard parameters: - name: cc_account_id in: query required: true schema: type: string example: 1234 responses: '200': description: Card deleted. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/saved-cards/{cc_account_id}/in-store-priority: parameters: - $ref: '#/components/parameters/CustomerId' - name: cc_account_id in: path required: true schema: type: string put: tags: - Customer summary: Lunchbox Set In-Store Card Priority operationId: setInStoreCardPriority responses: '200': description: In-store priority updated. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/orders: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get Customer Order History operationId: getCustomerOrders parameters: - name: include_items in: query schema: type: boolean example: true - name: all_orders in: query schema: type: boolean example: true responses: '200': description: Customer order history. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/group-orders: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get Customer Group Orders operationId: getCustomerGroupOrders responses: '200': description: Group orders for the customer. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/saved-orders: parameters: - $ref: '#/components/parameters/CustomerId' post: tags: - Customer summary: Lunchbox Save an Order operationId: saveOrder responses: '200': description: Order saved. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Saved Order operationId: deleteSavedOrder parameters: - name: order_id in: query required: true schema: type: integer example: 1234 responses: '200': description: Saved order deleted. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/loyalty: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get Customer Loyalty operationId: getCustomerLoyalty responses: '200': description: Loyalty balances and activity. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/memberships: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox List Customer Memberships operationId: listCustomerMemberships responses: '200': description: Customer memberships. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/memberships/{membership_id}: parameters: - $ref: '#/components/parameters/CustomerId' - name: membership_id in: path required: true schema: type: integer get: tags: - Customer summary: Lunchbox Get a Customer Membership operationId: getCustomerMembership responses: '200': description: The requested membership. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Cancel a Customer Membership operationId: cancelCustomerMembership responses: '200': description: Membership canceled. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/favorite-stores: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox List Favorite Stores operationId: listFavoriteStores responses: '200': description: Favorite stores. x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Add a Favorite Store operationId: addFavoriteStore responses: '200': description: Favorite store added. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Favorite Store operationId: deleteFavoriteStore parameters: - name: store_id in: query required: true schema: type: string example: '123456' responses: '200': description: Favorite store removed. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/favorite-items: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox List Favorite Items operationId: listFavoriteItems parameters: - name: service_type_id in: query schema: type: integer example: 1234 - name: include_unavailable in: query schema: type: boolean example: true - name: store_id in: query schema: type: string example: '123456' responses: '200': description: Favorite items. x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Customer summary: Lunchbox Add a Favorite Item operationId: addFavoriteItem responses: '200': description: Favorite item added. x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Customer summary: Lunchbox Delete a Favorite Item operationId: deleteFavoriteItem parameters: - name: favorite_id in: query required: true schema: type: integer example: 1234 responses: '200': description: Favorite item removed. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/orders/checkin: parameters: - $ref: '#/components/parameters/CustomerId' get: tags: - Customer summary: Lunchbox Get Check-In Orders operationId: getCheckinOrders responses: '200': description: Orders eligible for check-in. x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customer_id}/orders/checkin/{order_id}: parameters: - $ref: '#/components/parameters/CustomerId' - $ref: '#/components/parameters/OrderId' post: tags: - Customer summary: Lunchbox Check in to an Order operationId: checkinOrder responses: '200': description: Customer checked in. x-microcks-operation: delay: 0 dispatcher: FALLBACK components: parameters: CustomerId: name: customer_id in: path required: true schema: type: integer OrderId: name: order_id in: path required: true schema: type: integer schemas: Address: type: object properties: address_id: type: integer example: 1234 address1: type: string example: 1216 Broadway address2: type: string nullable: true example: string address3: type: string nullable: true example: string city: type: string example: New York statecode: type: string example: NY zipcode: type: string example: '10001' country: type: string example: US instructions: type: string nullable: true example: string latitude: type: number example: 40.74661 longitude: type: number example: -73.98833 LoginRequest: type: object required: - username - password properties: username: type: string format: email example: demo@lunchbox.io password: type: string example: string AuthSession: type: object properties: customer_id: type: integer example: 1234 auth_cookie: type: string example: string Customer: type: object properties: customer_id: type: integer example: 1234 first_name: type: string example: John last_name: type: string example: Smith email: type: string format: email example: demo@lunchbox.io phone: type: string example: '2125551411' is_phone_verified: type: boolean example: '2125551411' is_verified: type: boolean example: true is_guest: type: boolean example: true is_mgmt: type: boolean example: true company_name: type: string nullable: true example: Sample occupation: type: string nullable: true example: string birthdate: type: string format: date nullable: true example: '1990-05-21' RegistrationRequest: type: object required: - email - password properties: email: type: string format: email example: demo@lunchbox.io password: type: string example: string first_name: type: string example: John last_name: type: string example: Smith phone: type: string example: '2125551411' email_optin: type: boolean example: true auto_login: type: boolean example: true birthdate: type: string format: date example: '1990-05-21' securitySchemes: tokenAuth: type: apiKey in: header name: Authorization description: 'Team token passed as: Authorization: Token '