openapi: 3.0.2 x-json-schema-faker: maxItems: 2 info: description: | # Overview Noona provides a powerful REST(y) API that focuses on simplicity and clarity. - All API requests must be made over HTTPS. Calls made over plain HTTP will be redirected to HTTPS. **Base Path** ``` https://api.noona.is ``` The Marketplace API allows various 'customer' interactions with the companies in the Noona ecosystem. Example user: **An individual seeking a haircut**. title: Noona Marketplace API version: '0.0.3082' x-logo: url: https://api.noona.is/docs/img/logo_black.svg servers: - url: https://api.noona.is x-tagGroups: - name: User tags: - Marketplace User - Customers - Cards - Payments - Vouchers - Suggestions - name: Service Providers tags: - Marketplace Enterprises - Marketplace Companies - Company Types - Employees - Spaces - Event Types - Marketplace Events - Time Slots - Voucher Templates - Waitlists tags: - name: Company Types description: | Company types group separate companies into logical categories such as **Grooming**, **Animals** and **Massage**. - name: Marketplace Companies x-displayName: Companies description: | Companies are individual service providers such as **Hair salons**, **Chiropractors** and **Veterinarians**. - name: Employees description: | Employees are individuals that perform services at a given company. - name: Spaces description: | Spaces are areas where services are performed at a given company. - name: Marketplace User x-displayName: User description: Everything about the logged in marketplace user. - name: Events description: | Events are the center point of our whole system. A haircut that an HQ user performs on some marketplace user at a specified time is an event. - name: Marketplace Events x-displayName: Events description: | Events are the center point of our whole system. A haircut that an HQ user performs on some marketplace user at a specified time is an event. - name: Event Types description: | Event Types describe the different services a company offers. - name: Marketplace Enterprises x-displayName: Enterprises description: An enterprise is an umbrella entity which purpose is maintaining a relation between multiple companies. - name: Time Slots description: | Time Slots are points in time when a company can provide a specified service. - name: Vouchers description: | Vouchers are purchased through the marketplace and can be used to pay for a service at an enterprise. - name: Cards description: | Cards are debit/credit cards that a marketplace user has saved for future use. - name: Suggestions description: | Suggestions are user specific recommendations. - name: Payments description: | Payments are the result of a marketplace user paying for a service. - name: Customers description: | A customer is the HQ view of a marketplace user. - name: Voucher Templates description: | Voucher templates are predefined templates that enable a fast creation of vouchers. - name: Waitlists description: | Waitlist are a way to manage a queue of users waiting for a service. paths: /v1/marketplace/companies/{id}/time_slots: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: List time slots description: | Gets all available tima slots for company based on filter. Either **event_type_ids** or **event_id** must be provided. Capacity is the number of customers in booking. parameters: - name: id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" description: "Company ID" - name: employee_id in: query required: false schema: type: string example: "8a1da9wd8ua28aa9d" - name: space_id in: query required: false schema: type: string example: "ea7da9wd8ua28a134" - name: event_type_ids in: query required: false schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string - name: event_id in: query required: false schema: type: string example: "xa7da9wd8ua01a134" - name: start_date in: query required: true schema: type: string example: "2021-01-01" - name: end_date in: query required: true schema: type: string example: "2021-01-31" - name: capacity in: query required: false schema: type: integer format: int32 example: 5 default: 1 responses: "200": content: application/json: schema: $ref: "#/components/schemas/TimeSlots" description: Time slots operationId: ListTimeSlots tags: - Time Slots /v1/marketplace/companies/{id}/multiple_time_slots: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: List multiple time slots description: | Gets all available tima slots for company based on filter for multiple event types. This endpoint allows for fetching time slots for multiple event types at once. Opposed to **/time_slots** which only allows for fetching time slots for a single event type. If **event_id** is provided, **event_type_ids** will be ignored and the event type of the event will be used. parameters: - name: id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" description: "Company ID" - name: employee_id in: query required: false schema: type: string example: "8a1da9wd8ua28aa9d" - name: space_id in: query required: false schema: type: string example: "ea7da9wd8ua28a134" - name: event_type_ids in: query required: false schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string - name: event_id in: query required: false schema: type: string example: "xa7da9wd8ua01a134" - name: start_date in: query required: true schema: type: string example: "2021-01-01" - name: end_date in: query required: true schema: type: string example: "2021-01-31" - name: capacity in: query required: false schema: type: integer format: int32 example: 5 default: 1 responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventTypesWithTimeSlots" description: Time slots operationId: ListMultipleTimeSlots tags: - Time Slots /v1/marketplace/company_types: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: List all company types description: | List all company types and metadata about company types. Providing a **latitude** and **longitude** causes results to be specific to the relevant country. parameters: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" - name: lat in: query required: false schema: type: number format: double description: Longitude - name: lng in: query required: false schema: type: number format: double description: Latitude responses: "200": content: application/json: schema: $ref: "#/components/schemas/CompanyTypes" description: Company types and metadata operationId: ListCompanyTypes tags: - Company Types /v1/marketplace/company_types/{company_type_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Retrieve a company type description: | Retrieves a company type by ID. parameters: - name: company_type_id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" responses: "200": content: application/json: schema: $ref: "#/components/schemas/CompanyType" description: Company type and metadata operationId: GetCompanyType tags: - Company Types /v1/marketplace/enterprises: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: List enterprises description: | Retrieves all enterprises, and their companies, accessible on the Noona marketplace. Navigation of the data; filtering, sorting, pagination etc. is based on the company. Using this endpoint opposed to **/companies** has the advantage of returning companies grouped within their respective enterprises. parameters: - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/CompanyFilter" - $ref: "#/components/parameters/company_sort" - $ref: "#/components/parameters/pagination" - $ref: "#/components/parameters/search" - name: sort_by in: query description: Use sort instead. deprecated: true required: false schema: type: string enum: [popular, distance] - name: lat in: query required: false deprecated: true description: Use filter instead. schema: type: number format: double - name: lng in: query required: false deprecated: true description: Use filter instead. schema: type: number format: double - name: radius in: query required: false deprecated: true description: Use filter instead. schema: type: integer format: int64 default: 100000 - name: enterprise_ids in: query required: false description: Use filter instead. deprecated: true schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string - name: company_type_id in: query description: Use filter instead. required: false deprecated: true schema: type: string - name: limit_companies in: query description: Use pagination object instead. deprecated: true required: false schema: type: integer format: int64 - name: skip_companies in: query description: Use pagination object instead. deprecated: true required: false schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: "#/components/schemas/EnterprisesExpanded" description: Enterprises operationId: ListEnterprises tags: - Marketplace Enterprises /v1/marketplace/enterprises/{url_name}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Retrieve an enterprise description: | Retrieves an enterprise from its url_name (slug). parameters: - name: url_name in: path required: true schema: type: string example: big_barber_shops description: The urlname (slug) of the enterprise to retrieve. responses: "200": content: application/json: schema: $ref: "#/components/schemas/EnterpriseExpanded" description: Enterprise operationId: GetEnterpriseByUrlName tags: - Marketplace Enterprises /v1/marketplace/companies: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: List companies description: Retrieves all companies accessible on the Noona marketplace. parameters: - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/CompanyFilter" - $ref: "#/components/parameters/company_sort" - $ref: "#/components/parameters/pagination" - $ref: "#/components/parameters/search" - name: sort_by in: query description: Use sort instead. deprecated: true required: false schema: type: string enum: [popular, distance] - name: lat in: query required: false deprecated: true description: Use filter instead. schema: type: number format: double - name: lng in: query required: false deprecated: true description: Use filter instead. schema: type: number format: double - name: radius in: query required: false deprecated: true description: Use filter instead. schema: type: integer format: int64 default: 100000 - name: company_type_id in: query description: Use filter instead. required: false deprecated: true schema: type: string - name: enterprise_id in: query description: Use filter instead. deprecated: true required: false schema: type: string example: 7awdXawZoolkjad37a - name: limit in: query description: Use pagination object instead. deprecated: true required: false schema: type: integer format: int64 - name: skip in: query description: Use pagination object instead. deprecated: true required: false schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: "#/components/schemas/Companies" description: Companies operationId: ListCompanies tags: - Marketplace Companies /v1/marketplace/companies/{url_name}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Retrieve a company description: | Retrieves a company type from its url_name (slug). parameters: - name: url_name in: path required: true schema: type: string example: john_salon description: The urlname (slug) of the company to retrieve. responses: "200": content: application/json: schema: $ref: "#/components/schemas/Company" description: Company operationId: GetCompanyByUrlName tags: - Marketplace Companies /v1/marketplace/employees: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Search employees description: | Searches employees across all companies accessible on the Noona marketplace. parameters: - $ref: "#/components/parameters/search" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/EmployeesAtCompanies" description: Employees operationId: SearchEmployees tags: - Employees /v1/marketplace/companies/{company_id}/employees: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: summary: List employees description: | Lists employees at a given company. parameters: - name: company_id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" description: "Company ID" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/EmployeeFilter" - name: event_type_ids in: query deprecated: true description: Use filter object instead. schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Employees" description: Employees operationId: ListEmployees tags: - Employees /v1/marketplace/companies/{company_id}/employees/{employee_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Get employee description: | Get employee with ID at a given company. parameters: - name: company_id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" description: "Company ID" - name: employee_id in: path required: true schema: type: string example: "pe7da9wd8ua28a114" description: "Employee ID" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Employee" description: Employee operationId: GetEmployee tags: - Employees /v1/marketplace/companies/{company_id}/spaces: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: summary: List spaces description: | Lists spaces at a given company. parameters: - name: company_id in: path required: true schema: type: string example: "aw7da9wd8ua28a821" description: "Company ID" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/SpaceFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Spaces" description: Spaces operationId: ListSpaces tags: - Spaces /v1/marketplace/spaces/{space_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Get space description: | Get space with ID at a given company. parameters: - name: space_id in: path required: true schema: type: string example: "pe7da9wd8ua28a114" description: "Employee ID" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Space" description: Space operationId: GetSpace tags: - Spaces /v1/marketplace/events: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List events description: | Lists events for marketplace user. parameters: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/EventFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Events" description: Events operationId: ListEvents tags: - Marketplace Events post: security: - Marketplace-Authentication: [] summary: Create an event description: | Creates an event for marketplace user from a time slot reservation. requestBody: required: true content: application/json: schema: allOf: - $ref: "#/components/schemas/Event" - $ref: "#/components/schemas/EventCreateOverrides" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Event" description: Created Event "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/CreateEventErrorOneOf" operationId: CreateEvent tags: - Marketplace Events /v1/marketplace/events/{event_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Retrieve an event description: | Retrieves an event for marketplace user. parameters: - name: event_id in: path required: true schema: type: string example: "dwawd8awudawd" description: Event ID responses: "200": content: application/json: schema: $ref: "#/components/schemas/Event" description: Events operationId: GetEvent tags: - Marketplace Events post: security: - Marketplace-Authentication: [] summary: Update an event description: | Updates an event for marketplace user. If employee and space are not provided, new employee and space will be selected at random for the new time. If the intent is to only move between resources (employee or space) and not change the time, starts_at will have to be passed in as the current value. If the intent is to only change number of guests, starts_at will have to be passed in as the current value. parameters: - name: event_id in: path required: true schema: type: string example: "dwawd8awudawd" description: Event ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EventUpdate" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Event" description: Updated Event operationId: UpdateEvent tags: - Marketplace Events /v1/marketplace/events/{event_id}/notification: post: security: - Marketplace-Authentication: [] summary: Send a notification for an event description: | Sends an event notification to the specified recipient. parameters: - name: event_id in: path required: true schema: type: string example: "dwawd8awudawd" description: Event ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EventNotification" responses: "200": description: Success operationId: CreateEventNotification tags: - Marketplace Events /v1/marketplace/companies/{id}/events/validate: post: security: - Marketplace-Authentication: [] summary: Validate event data description: Validates data gathered in the booking/event-creation flow. parameters: - name: id description: Company ID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EventData" responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventDataValidation" description: Event Data Validation "400": $ref: "#/components/responses/BadRequestError" operationId: ValidateEventData tags: - Marketplace Events /v1/marketplace/user/verify_phone_number: post: summary: Verify phone number description: | Verifies a phone number by sending a unique code to it. The code is then used in conjuction with the phone number to create a new user or verify an existing one. This endpoint can also be used to verify phone numbers of users that have authenticated with external identity providers. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Phone" responses: "200": description: Verification number was sent to phone number. content: application/json: schema: $ref: "#/components/schemas/VerifyPhoneNumberResult" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/VerifyPhoneNumberError" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/VerifyPhoneNumberError" operationId: VerifyPhoneNumber tags: - Marketplace User /v1/marketplace/user/verified: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: summary: Creates a new user description: | Creates a new user with a verified phone number. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/VerifiedPhone" responses: "200": content: application/json: schema: $ref: "#/components/schemas/User" description: Created marketplace user "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" operationId: CreateVerifiedUser tags: - Marketplace User /v1/marketplace/user: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Get user description: Gets current marketplace user, inferred from token. responses: "200": content: application/json: schema: $ref: "#/components/schemas/User" description: Marketplace user response "401": $ref: "#/components/responses/UnauthorizedError" operationId: GetUser tags: - Marketplace User post: security: - Marketplace-Authentication: [] summary: Update user description: Updates current marketplace user, inferred from token. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/User" responses: "200": content: application/json: schema: $ref: "#/components/schemas/User" description: Updated marketplace user "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: UpdateUser tags: - Marketplace User /v1/marketplace/user/login: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: security: - Marketplace-Authentication: [] summary: Login with auth provider description: Logs in a marketplace user with Apple or Google Sign-In ID token requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SocialLoginPayload" responses: "200": content: application/json: schema: $ref: "#/components/schemas/User" description: Marketplace user "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: LoginWithAuthProvider tags: - Marketplace User /v1/marketplace/user/verify_email: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: summary: Verify email description: Verify email with a token from the verification email. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/VerifyEmailPayload" responses: "200": description: Email verified "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: VerifyEmail tags: - Marketplace User /v1/marketplace/user/location: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Derive user location description: Derives user location from the IP address responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserLocation" description: User location "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: DeriveUserLocation tags: - Hidden /v1/marketplace/user/companies: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: security: - Marketplace-Authentication: [] summary: List user companies description: | Lists companies that have some association with the user. Companies the user has favorites or has booked events at. parameters: - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/UserCompaniesFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Companies" description: Marketplace user's companies "401": $ref: "#/components/responses/UnauthorizedError" operationId: ListUserCompanies tags: - Marketplace User /v1/marketplace/user/companies/{company_id}/customers: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: security: - Marketplace-Authentication: [] summary: List customers description: | Lists customers that user has ties with at company. parameters: - name: company_id description: Company ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Customers" description: Customers "401": $ref: "#/components/responses/UnauthorizedError" operationId: ListCustomers tags: - Customers /v1/marketplace/suggestions/trending/companies: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List trending companies description: | Returns a list of trending companies based on the user's location, booking history and behavior. parameters: - $ref: "#/components/parameters/user_location" responses: "200": content: application/json: schema: $ref: "#/components/schemas/TrendingCompanies" description: Trending Companies operationId: ListTrendingCompanies tags: - Suggestions /v1/marketplace/suggestions/company_type: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Get suggested company type description: | Returns a suggested company type based on the user's location, booking history and behavior. parameters: - $ref: "#/components/parameters/user_location" responses: "200": content: application/json: schema: $ref: "#/components/schemas/CompanyType" description: Company type "404": $ref: "#/components/responses/NotFoundError" operationId: GetSuggestedCompanyType tags: - Suggestions /v1/marketplace/suggestions/vouchers: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List suggested vouchers description: | Returns a list of suggested vouchers based on the user's location, booking history and behavior. parameters: - $ref: "#/components/parameters/user_location" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Companies" description: Voucher Enabled Companies "404": $ref: "#/components/responses/NotFoundError" operationId: ListSuggestedVouchers tags: - Suggestions /v1/marketplace/suggestions/companies: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List suggested companies description: | Returns a list of suggested companies based on the user's location, booking history and behavior. parameters: - $ref: "#/components/parameters/user_location" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Companies" description: Voucher Enabled Companies "404": $ref: "#/components/responses/NotFoundError" operationId: ListSuggestedCompanies tags: - Suggestions /v1/marketplace/suggestions/quick_booking_searches: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List suggested quick booking searches description: | Returns a list of suggested quick booking searches based on the user's location, booking history and behavior. parameters: - $ref: "#/components/parameters/user_location" - in: header name: Accept-Language schema: type: string description: The language to return quick booking searches suggestions in. example: "is" responses: "200": content: application/json: schema: $ref: "#/components/schemas/QuickBookingSearchSuggestions" description: Quick Booking Searches Suggestions "404": $ref: "#/components/responses/NotFoundError" operationId: ListSuggestedQuickBookingSearches tags: - Suggestions /v1/marketplace/vouchers: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List vouchers description: Lists the vouchers of a marketplace user. parameters: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/VoucherFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Vouchers" description: Vouchers "401": $ref: "#/components/responses/UnauthorizedError" operationId: ListVouchers tags: - Vouchers post: security: - Marketplace-Authentication: [] summary: Create a voucher description: | Creates a voucher for a marketplace user. There are two voucher types that are supported: - Amount - Service **company** and **payment** are always required fields. But depending on the voucher type, additional fields are required. --- #### Amount Amount vouchers represent a monetary value that can be used to pay for services at a company. The following fields are required when creating an amount voucher: - **amount** - The amount of the voucher. - **currency** - The currency of the voucher. #### Service (event_type) Service vouchers represent a service that can be redeemed at a company. The following fields are required when creating a service voucher: - **voucher_template** - The voucher template ID. This is the template that will be used to create the voucher. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Voucher" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Voucher" description: Voucher "400": $ref: "#/components/responses/PaymentError" "401": $ref: "#/components/responses/UnauthorizedError" "404": $ref: "#/components/responses/NotFoundError" operationId: CreateVoucher tags: - Vouchers /v1/marketplace/vouchers/{voucher_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Retrieve voucher description: Gets voucher with specified ID. parameters: - name: voucher_id description: Voucher ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Voucher" description: Voucher "401": $ref: "#/components/responses/UnauthorizedError" operationId: GetVoucher tags: - Vouchers /v1/marketplace/vouchers/{voucher_id}/notification: post: security: - Marketplace-Authentication: [] summary: Send a voucher notification description: | Sends a voucher notification to the specified recipients. If **send_to_user** is provided, voucher ownership will be transferred to the user. parameters: - name: voucher_id description: Voucher ID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/VoucherNotification" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Voucher" description: Voucher "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: CreateVoucherNotification tags: - Vouchers /v1/marketplace/cards: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List cards description: Lists the cards of a marketplace user. parameters: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Cards" description: Cards "401": $ref: "#/components/responses/UnauthorizedError" operationId: ListMarketplaceCards tags: - Cards post: security: - Marketplace-Authentication: [] summary: Create a card description: Creates a card for a marketplace user. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Card" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Card" description: Card "400": $ref: "#/components/responses/BadRequestError" "401": $ref: "#/components/responses/UnauthorizedError" operationId: CreateMarketplaceCard tags: - Cards /v1/marketplace/cards/{card_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Retrieve card description: Gets card with specified ID. parameters: - name: card_id description: Card ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Card" description: Card "401": $ref: "#/components/responses/UnauthorizedError" operationId: GetMarketplaceCard tags: - Cards delete: security: - Marketplace-Authentication: [] summary: Delete card description: Deletes card with specified ID. parameters: - name: card_id description: Card ID in: path required: true schema: type: string responses: "200": description: Card was deleted "401": $ref: "#/components/responses/UnauthorizedError" operationId: DeleteMarketplaceCard tags: - Cards /v1/marketplace/event_types: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Search event types description: | Searches event types across all companies accessible on the Noona marketplace. parameters: - $ref: "#/components/parameters/search" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/EventTypeSearchFilter" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventTypes" description: Event Types operationId: SearchEventTypes tags: - Event Types /v1/marketplace/companies/{company_id}/event_types: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: summary: List event types description: Retrieves all event types for a company. parameters: - name: company_id description: Company ID in: path required: true schema: type: string - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/EventTypeFilter" - name: employee_id in: query deprecated: true description: "Use filter instead" schema: type: string - name: event_type_ids in: query deprecated: true description: "Use filter instead" schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventTypes" description: Event types "400": $ref: "#/components/responses/BadRequestError" operationId: ListEventTypes tags: - Event Types /v1/marketplace/event_types/{event_type_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: summary: Get event type description: Gets event type with specified ID. parameters: - name: event_type_id description: Event Type ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventType" description: Event type "400": $ref: "#/components/responses/BadRequestError" operationId: GetEventType tags: - Event Types /v1/marketplace/companies/{company_id}/event_types/expanded: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" get: summary: List event types and groups description: | Retrieves all event types for a company in their respective groups. If a marketplace user token is passed in an event type group, which lists previous event types the user has booked, will be generated and returned. parameters: - name: company_id description: Company ID in: path required: true schema: type: string - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/EventTypeFilter" - name: employee_id in: query deprecated: true description: "Use filter instead" schema: type: string - name: event_type_ids in: query deprecated: true description: "Use filter instead" schema: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] items: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/EventTypesGroupsExpanded" description: Event types expanded "400": $ref: "#/components/responses/BadRequestError" operationId: ListEventTypesExpanded tags: - Event Types /v1/marketplace/time_slot_reservations: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: security: - Marketplace-Authentication: [] summary: Create time slot reservation description: | Creates a time slot reservation for a specific event type at a company. The reservation can then be used to create an event. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TimeSlotReservation" responses: "200": content: application/json: schema: $ref: "#/components/schemas/TimeSlotReservation" description: Reservation "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/CreateTimeSlotReservationError" operationId: CreateTimeSlotReservation tags: - Time Slots /v1/marketplace/time_slot_reservations/{time_slot_reservation_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - name: time_slot_reservation_id in: path required: true schema: type: string example: "dwawd8awudawd" get: security: - Marketplace-Authentication: [] summary: Get time slot reservation description: | Gets a time slot reservation. responses: "200": content: application/json: schema: $ref: "#/components/schemas/TimeSlotReservation" description: Reservation operationId: GetTimeSlotReservation tags: - Time Slots post: security: - Marketplace-Authentication: [] summary: Update time slot reservation description: | Updates a time slot reservation. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TimeSlotReservationUpdate" responses: "200": content: application/json: schema: $ref: "#/components/schemas/TimeSlotReservation" description: Reservation "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/CreateTimeSlotReservationError" operationId: UpdateTimeSlotReservation tags: - Time Slots delete: security: - Marketplace-Authentication: [] summary: Delete time slot reservation description: | Deletes a time slot reservation. responses: "200": description: Time Slot Reservation deleted operationId: DeleteTimeSlotReservation tags: - Time Slots /v1/marketplace/user/payments: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List user payments description: Lists the payments of a marketplace user. parameters: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/PaymentFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Payments" description: Payments "401": $ref: "#/components/responses/UnauthorizedError" operationId: ListPayments tags: - Payments /v1/marketplace/user/payments/{payment_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: Get user payment description: Gets payment with ID. parameters: - name: payment_id description: Payment ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Payment" description: Payment "401": $ref: "#/components/responses/UnauthorizedError" operationId: GetPayment tags: - Payments delete: security: - Marketplace-Authentication: [] summary: Delete user payment description: | Deletes payment with ID. It is only possible to delete **pending** payments that have not yet been processed. parameters: - name: payment_id description: Payment ID in: path required: true schema: type: string responses: "200": description: Payment was deleted "401": $ref: "#/components/responses/UnauthorizedError" operationId: DeletePayment tags: - Payments /v1/marketplace/user/payments/{payment_id}/pay: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: security: - Marketplace-Authentication: [] summary: Pay for pending payment description: | Pays for a pending payment. It is only possible to pay for **pending** payments that have not yet been processed. parameters: - name: payment_id description: Payment ID in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PaylinkPayment" responses: "200": content: application/json: schema: $ref: "#/components/schemas/Payment" description: Payment "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/CreateEventErrorOneOf" "401": $ref: "#/components/responses/UnauthorizedError" operationId: PayForPendingPayment tags: - Payments /v1/marketplace/companies/{company_id}/voucher_templates: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - HQ-Authentication: [] summary: List voucher templates description: Lists the voucher templates of a company. parameters: - name: company_id description: Company ID in: path required: true schema: type: string - in: query name: filter content: application/json: schema: $ref: "#/components/schemas/VoucherTemplateFilter" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/VoucherTemplates" description: VoucherTemplates operationId: ListVoucherTemplates tags: - Voucher Templates /v1/marketplace/companies/{company_id}/payment_methods: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - HQ-Authentication: [] summary: List payment methods description: List available payment methods for a company. parameters: - name: company_id description: Company ID in: path required: true schema: type: string - name: channel description: Payment channel in: query schema: $ref: "#/components/schemas/PaymentChannel" - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/pagination" responses: "200": content: application/json: schema: $ref: "#/components/schemas/PaymentMethods" description: PaymentMethods operationId: ListPaymentMethods tags: - Payments /v1/marketplace/companies/{company_id}/apple_pay_session: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: summary: Request an Apple Pay Payment Session description: | Requests an Apple Pay Payment Session. The session is required for Apple Pay on web. parameters: - name: company_id description: Company ID in: path required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/ApplePaySessionResponse" description: Payment "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": $ref: "#/components/responses/UnauthorizedError" operationId: RequestApplePaySession tags: - Payments /v1/marketplace/speedy_slots: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" get: security: - Marketplace-Authentication: [] summary: List speedy slots description: | Lists speedy slots, availble for booking, for a specific event type at a company. parameters: - $ref: "#/components/parameters/search" - name: start_date in: query required: true schema: type: string example: "2022-11-01" - name: end_date in: query required: true schema: type: string example: "2022-11-03" - in: query name: filter required: true content: application/json: schema: $ref: "#/components/schemas/SpeedySlotsSearchFilter" responses: "200": content: application/json: schema: $ref: "#/components/schemas/SpeedySlots" description: Speedy Slots operationId: ListSpeedySlots tags: - Time Slots /v1/marketplace/testing/login: get: summary: Get login description: | Returns the test login screen. Test endpoint. responses: "200": content: text/html: schema: type: string description: Marketplace Login Test operationId: GetMarketplaceTestLogin tags: - Hidden /v1/marketplace/waitlist_entries: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" post: security: - Marketplace-Authentication: [] summary: Create waitlist entry description: | Creates a waitlist entry at a company. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/WaitlistEntryCreate" responses: "200": content: application/json: schema: $ref: "#/components/schemas/WaitlistEntryResponse" description: Waitlist Entry "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" operationId: CreateWaitlistEntry tags: - Waitlists get: security: - Marketplace-Authentication: [] summary: List waitlist entries description: | Lists all waitlist entries for user. responses: "200": content: application/json: schema: $ref: "#/components/schemas/WaitlistEntriesResponse" description: Waitlist Entries operationId: ListWaitlistEntries tags: - Waitlists /v1/marketplace/waitlist_entries/{waitlist_entry_id}: parameters: - $ref: "#/components/parameters/select" - $ref: "#/components/parameters/expand" - name: waitlist_entry_id description: Waitlist Entry ID in: path required: true schema: type: string get: security: - Marketplace-Authentication: [] summary: Get waitlist entry description: | Get a waitlist entry by ID. responses: "200": content: application/json: schema: $ref: "#/components/schemas/WaitlistEntryResponse" description: Waitlist Entry "404": $ref: "#/components/responses/NotFoundError" operationId: GetWaitlistEntry tags: - Waitlists delete: security: - Marketplace-Authentication: [] summary: Delete waitlist entry description: | Deletes a waitlist entry by ID. responses: "200": description: Waitlist Entry was deleted "404": $ref: "#/components/responses/NotFoundError" operationId: DeleteWaitlistEntry tags: - Waitlists components: securitySchemes: Marketplace-Authentication: type: apiKey in: header name: Authorization description: | The Noona Marketplace API uses an Authorization header with JWT Bearer tokens to authenticate marketplace users. responses: UnauthorizedError: description: API key is missing or invalid. See Authentication documentation for more information. content: application/json: schema: $ref: "#/components/schemas/Error" UnauthorizedBasicError: description: Basic authentication failed. See Authentication documentation for more information. content: application/json: schema: $ref: "#/components/schemas/Error" BadRequestError: description: Provided request body is malformed content: application/json: schema: $ref: "#/components/schemas/Error" PermissionDenied: description: Operation not permitted content: application/json: schema: $ref: "#/components/schemas/Error" AlreadyExists: description: Item already exists content: application/json: schema: $ref: "#/components/schemas/Error" NotFoundError: description: Requested resource not found content: application/json: schema: $ref: "#/components/schemas/Error" PaymentError: description: Payment error content: application/json: schema: $ref: "#/components/schemas/PaymentError" parameters: select: name: select in: query description: "[Field Selector](https://api.noona.is/docs/working-with-the-apis/select)" required: false schema: type: array items: type: string expand: name: expand in: query description: "[Expandable attributes](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" required: false schema: type: array items: type: string sort: name: sort in: query description: "[Sorting](https://api.noona.is/docs/working-with-the-apis/sorting)" required: false content: application/json: schema: $ref: "#/components/schemas/Sort" company_sort: name: sort in: query description: "[Sorting](https://api.noona.is/docs/working-with-the-apis/sorting)" required: false content: application/json: schema: $ref: "#/components/schemas/CompanySort" pagination: name: pagination in: query description: "[Pagination](https://api.noona.is/docs/working-with-the-apis/pagination)" required: false content: application/json: schema: $ref: "#/components/schemas/Pagination" search: name: search in: query description: "[Search](https://api.noona.is/docs/working-with-the-apis/search)" required: false schema: type: string user_location: name: location in: query description: "[Location](https://api.noona.is/docs/working-with-the-apis/location)" # This is required, but there is a bug in Orval client while handling required + content required: false content: application/json: schema: $ref: "#/components/schemas/UserLocation" schemas: EnterpriseConnections: type: object properties: available_on_marketplace: type: boolean example: true url_name: description: Used when constructing the marketplace url for the enterprise type: string example: noonacuts allows_booking_without_auth: description: Controls whether customers can make appointments without authentication type: boolean example: true marketplace: $ref: "#/components/schemas/EnterpriseConnectionsMarketplace" EnterpriseConnectionsMarketplace: type: object properties: enable_vouchers: type: boolean example: true EnterpriseProfile: type: object properties: name: type: string example: Noonacuts image: $ref: "#/components/schemas/Image" EnterprisesExpanded: type: array items: $ref: "#/components/schemas/EnterpriseExpanded" EnterpriseExpanded: allOf: - $ref: "#/components/schemas/Enterprise" - type: object properties: favorites: type: integer format: int32 description: The highest amount of favorites a company in this enterprise has. companies: $ref: "#/components/schemas/Companies" Enterprises: type: array items: $ref: "#/components/schemas/Enterprise" Enterprise: type: object properties: id: type: string example: aqmzX9Cm5tekKecsA readOnly: true companies: type: array readOnly: true description: An array of companies belonging to enterprise. items: type: string connections: $ref: "#/components/schemas/EnterpriseConnections" profile: $ref: "#/components/schemas/EnterpriseProfile" ExpandableEnterprise: description: "[Expandable](#section/Expandable-attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Enterprise" ExpandableCompanyType: description: "[Expandable](#section/Expandable-attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/CompanyType" CompanyTypes: type: object properties: company_types: type: array items: $ref: "#/components/schemas/CompanyType" CompanyType: type: object properties: id: example: 7awdXwZoedakjad37a type: string name: type: string example: Hair salons promotion: type: string example: "Did you know you can book a haircut on Noona?" locale_key: type: string example: hairstyling image: type: string example: https://api.noona.is/static/haircut.png ExpandableCompany: description: "[Expandable](#section/Expandable-attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Company" CompanyFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: vertical: $ref: "#/components/schemas/CompanyVertical" company_type_id: type: string example: 7awdXwZoedakjad37a description: ID of the company type (category). enterprise_ids: type: array items: type: string description: Only return enterprises with specified ids. only_voucher_companies: type: boolean description: Only return companies that accept vouchers. lat: type: number format: double description: Latitude of the location to search around. lng: type: number format: double description: Longitude of the location to search around. radius: type: integer format: int64 default: 10000 description: | Only return companies within radius of lat/lng in **meters**. If latitude and longitude are not provided the radius has no effect. CompanyVertical: type: string format: enum enum: - appointment - restaurant Company: type: object properties: id: type: string example: 7dj29KiAE1wdjw731 vertical: $ref: "#/components/schemas/CompanyVertical" enterprise_id: deprecated: true readOnly: true writeOnly: true description: Deprecated. Use `enterprise` instead. type: string example: 3dj29KiAE1wdjw135 enterprise: $ref: "#/components/schemas/ExpandableEnterprise" profile: $ref: "#/components/schemas/CompanyProfile" connections: $ref: "#/components/schemas/CompanyConnections" no_show_enabled: type: boolean most_recently_visited_company: type: boolean description: | When a marketplace user is present in the context, a company belonging to an enterprise with more than 1 location is marked if it is the most recently visited company of the enterprise. locale: $ref: "#/components/schemas/CompanyLocale" relative_location: $ref: "#/components/schemas/RelativeLocation" payment_provider: $ref: "#/components/schemas/PaymentProviderType" CompanyProfile: type: object properties: store_name: type: string example: John's Hair Salon description: type: string favorites: type: integer format: int32 description: The number of favorites/likes on the company. company_type_ids: type: array deprecated: true readOnly: true writeOnly: true description: Deprecated. Use `company_types` instead. items: type: string example: 8aj29KiAE1wdjw143 company_types: type: array items: $ref: "#/components/schemas/ExpandableCompanyType" settings: $ref: "#/components/schemas/CompanySettings" image: $ref: "#/components/schemas/Image" cover_images: type: array description: The marketplace images displayed on a companies profile items: $ref: "#/components/schemas/Image" phone_country_code: type: string example: +354 phone_number: type: string prefer_12_hours: type: boolean description: Determines if the company prefers 12 hour time format. price_category: type: integer format: int32 description: The price category of the company. example: 3 minimum: 1 maximum: 5 default: 3 min_guests_per_booking: type: integer format: int32 max_guests_per_booking: type: integer format: int32 CompanySettings: type: object properties: license_plate: type: boolean description: Determines if the company requires the user to enter license plate when booking. Common for car repair shops. CompanyConnections: type: object properties: multiple_services: type: boolean description: Determines if the user can select multiple event types in a single booking. url_name: type: string description: The URL slug the company uses for online precense, e.g. noona.is/:urlName contact_email: type: string required_fields: $ref: "#/components/schemas/RequiredFields" opening_hours: type: array description: Opening hours for the company. Array of seven (7) items, 0 being Monday and 6 Sunday. Or 0 being Sunday. Nobody really knows. items: $ref: "#/components/schemas/OpeningHour" max_future: type: integer format: int32 description: Determines how many days clients can book in the future min_cancel_notice: type: integer format: int32 description: Determine the minimum notice where clients can cancel their appointments location: $ref: "#/components/schemas/Location" booking_redirect_url: type: string description: A website the user is shown at the end of a successful booking. web_auth_opt_out: type: boolean description: Does the company opt out of authentication when booking on the marketplace website? booking_success_message: type: string description: A message from the company that is displayed at the end of the booking process. timatorg: type: boolean description: Indicates if the company is visible on the marketplace enable_vouchers: type: boolean example: true description: | Determines if the company sells vouchers on the marketplace. Master flag for all voucher types. (Service and amount vouchers) enable_amount_vouchers: type: boolean example: true description: Determines if the company sells amount vouchers on the marketplace. min_move_notice: type: integer format: int32 description: Determine the minimum notice where clients can move their appointments waitlist_enabled: type: boolean description: Determines if the company has waitlist enabled. RequiredFields: type: object description: Similar to profile.settings.licensePlate, these determine if the user is required to fill in those fields when booking. properties: kennitala: type: boolean description: Legacy naming - Icelandic for social security number (SSN) email: type: boolean OpeningHour: type: object properties: opens_at: type: string example: 08:00 closes_at: type: string example: 18:00 is_closed: type: boolean CompanyLocale: type: object properties: ui_language: type: string example: is description: Language used for UI. This is the default language users within the company get on signup. messaging_language: type: string example: is description: Language used for outgoing messages such as emails, SMS and push notifications. default_currency: $ref: "#/components/schemas/CompanyDefaultCurrency" CompanyDefaultCurrency: type: object properties: code: type: string example: EUR name: type: string example: Euro symbol: type: string example: € Companies: type: array items: $ref: "#/components/schemas/Company" Spaces: type: array items: $ref: "#/components/schemas/Space" Space: type: object properties: id: type: string example: 7dj29KiAE1wdjw731 name: type: string example: Room 3 description: type: string example: The room where the magic happens image: $ref: "#/components/schemas/Image" company_id: type: string example: 3dj29KiAE1wdjw135 deprecated: true readOnly: true writeOnly: true description: Deprecated. Use `company` instead. company: $ref: "#/components/schemas/ExpandableCompany" event_type_preferences: type: array items: $ref: "#/components/schemas/SpaceEventTypePreference" marketplace: type: boolean description: Whether the space is visible on the marketplace or not. example: true deleted_at: type: string format: date-time readOnly: true SpaceEventTypePreference: type: object properties: id: type: string example: dw7aw7da6w8d76aw description: Event type ID. can_perform: type: boolean description: Whether event type can be performed at space. SpaceFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: event_type_ids: type: array example: ["te7da9wd8ua28a1ab", "xa7da9wd8ua01a134"] description: Filters spaces by the event types they are available for. items: type: string EmployeeFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: event_type_ids: type: array description: Filters employees by the event types they are available for. items: type: string UserCompaniesFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: type: type: string format: enum default: "favorite" enum: - favorite - visited - both only_voucher_companies: type: boolean description: Filters companies by whether they accept vouchers or not. company_type: type: string description: Filters companies by company type. EmployeesAtCompanies: type: array items: $ref: "#/components/schemas/EmployeeAtCompany" EmployeeAtCompany: allOf: - $ref: "#/components/schemas/Employee" - properties: company: $ref: "#/components/schemas/Company" Employees: type: array items: $ref: "#/components/schemas/Employee" Employee: type: object properties: id: type: string example: 7dj29KiAE1wdjw731 profile: $ref: "#/components/schemas/EmployeeProfile" marketplace: type: boolean description: Whether the employee is visible on the marketplace or not. example: true event_type_preferences: type: array items: $ref: "#/components/schemas/EventTypePreference" exclude_from_randomization_pool: type: boolean description: Whether the employee should be excluded from the randomization pool or not. deleted_at: type: string format: date-time readOnly: true EventTypePreference: type: object properties: id: type: string example: dw7aw7da6w8d76aw description: Event type ID. can_perform: type: boolean description: Whether the employee can perform the event type or not. custom_duration: type: integer format: int32 example: 30 description: The custom duration, if applicable, for a regular event type. custom_duration_before_pause: type: integer format: int32 example: 15 description: The custom duration, if applicable, for the period before a pause for an event type. custom_duration_pause: type: integer format: int32 example: 30 description: The custom duration, if applicable, for the pause period for an event type. custom_duration_after_pause: type: integer format: int32 example: 15 description: The custom duration, if applicable, for the period after a pause for an event type. EmployeeProfile: type: object properties: name: type: string example: Joe the cutter description: type: string example: Joe is the cutter of many hairs image: $ref: "#/components/schemas/Image" LocationInformation: type: object properties: supported: type: boolean example: true Users: type: array items: $ref: "#/components/schemas/User" User: type: object properties: id: example: 7awdXwZoedakjad37a type: string readOnly: true name: type: string phone_number: type: string readOnly: true phone_country_code: type: string readOnly: true example: 44 (for UK) phone_number_verified: type: boolean readOnly: true favorite_companies: type: array items: type: string push_token: $ref: "#/components/schemas/PushToken" kennitala: type: string description: Icelandic SSN email: type: string email_verified: type: boolean readOnly: true example: true license_plate: type: string token: type: string readOnly: true locale: $ref: "#/components/schemas/LocaleForUser" device_info: $ref: "#/components/schemas/DeviceInfo" created_at: example: 1631558908 type: integer format: int32 readOnly: true updated_at: example: 1631558908 type: integer format: int32 readOnly: true SocialLoginProvider: type: string format: enum enum: [google, apple] SocialLoginPayload: type: object required: - provider - id_token properties: provider: $ref: "#/components/schemas/SocialLoginProvider" id_token: type: string example: "eyJhbGciOi" name: type: string example: "John Doe" VerifyEmailPayload: type: object required: - token properties: token: type: string example: "AwxswpSz06iTefog91MMAG6X9fS7ZOsPwO7NMa5" Phone: type: object properties: phone_number: type: string example: "8124132" phone_country_code: type: string example: "354" VerifiedPhone: type: object properties: phone_number: type: string example: "8124132" phone_country_code: type: string example: "354" verification_code: type: string example: "123456" PushToken: type: object properties: platform: type: integer format: int32 description: 1 for iOS, 2 for Android token: type: string DeviceInfo: type: object description: See https://github.com/react-native-device-info/react-native-device-info for more info. properties: battery_level: type: number format: double example: 0.72 brand: type: string example: Apple build_number: type: string example: 1626691095 carrier: type: string example: Vodafone device_id: type: string example: iPhone13,1 device_name: type: string example: John's iPhone manufacturer: type: string example: Apple model: type: string example: "iPhone 12 mini" system_version: type: string example: "15.0.1" is_emulator: type: boolean readable_version: type: string example: 1.4.1.1626691095 android_api_level: type: number code_push_app_version: type: string example: 1.4.1_v74 Cards: type: array items: $ref: "#/components/schemas/Card" Card: type: object required: - pan - expiry_month - expiry_year - cvc - method - return_url - channel properties: method: type: string format: enum enum: ["Card"] id: example: 7awdXwZoedakjad37a type: string readOnly: true cardholder_name: type: string example: "Dee Hock" pan: example: "1564854695481453" type: string writeOnly: true masked_pan: example: "1564854695481453" type: string readOnly: true expiry_month: example: "02" type: string expiry_year: example: "02" type: string cvc: example: "070" type: string writeOnly: true type: example: "visa" type: string format: enum enum: [visa, mastercard, other] readOnly: true provider: $ref: "#/components/schemas/PaymentProviderType" save_card: example: true type: boolean description: | Whether the card should be saved for future use. If the card is saved, it can be used for future payments without having to enter the card details again. return_url: type: string description: | If provided, the user is redirected to this URL after the payment is processed. This is required for 3D Secure payments. browser_information: $ref: "#/components/schemas/PaymentBrowserInformation" channel: $ref: "#/components/schemas/PaymentChannel" three_ds2_sdk_version: type: string PaymentBrowserInformation: type: object writeOnly: true required: - language - color_depth - javascript_enabled - screen_width - screen_height - time_zone_offset properties: language: type: string example: "en-US" color_depth: type: integer format: int32 javascript_enabled: type: boolean screen_width: type: number format: double screen_height: type: number format: double time_zone_offset: type: integer format: int32 Vouchers: type: array items: $ref: "#/components/schemas/Voucher" Voucher: type: object required: - payment - company properties: id: example: 7awdXwZoedakjad37a type: string readOnly: true currency: type: string example: ISK amount: type: number format: double example: 3990 voucher_template: $ref: "#/components/schemas/ExpandableVoucherTemplate" data: $ref: "#/components/schemas/VoucherData" color: type: string example: "#0f0f0f" message: type: string example: "You deserve to relax a bit!" code: type: string example: "A328DB" description: 6 uppercase letters / numbers readOnly: true phone_country_code: type: string example: "354" phone_number: type: string example: "7134124" description: | If a phone number is provided, it receives news of the newly created voucher. This keeps the original owner, while send_to_user transfers it to a different user. send_to_user: $ref: "#/components/schemas/Phone" email: type: string example: test@testy.is description: If an email is provided, it receives news of the newly created voucher. user: $ref: "#/components/schemas/ExpandableUser" company: oneOf: - type: string example: 7awdXwZoedakjad37a title: Company ID - $ref: "#/components/schemas/Company" description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" expiration: example: "2022-08-24T14:15:22Z" type: string format: date-time description: Vouchers expire after 3 years readOnly: true payment: $ref: "#/components/schemas/PaymentInformation" payment_information: $ref: "#/components/schemas/VoucherPaymentInformation" fully_used: type: boolean description: Whether the voucher has been fully used or not. readOnly: true original_owner: type: boolean description: Whether the voucher was bought by the user or not. readOnly: true created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true VoucherRelationship: type: string format: enum enum: ["all", "bought", "received", "usable"] default: "usable" example: "usable" description: | Filter vouchers by type. `all` - All vouchers user has access to. `bought` - Vouchers bought by the user, regardless of whether they were sent as a gift or not. `received` - Vouchers received by the user from a different user. `usable` - Vouchers that are usable by the user. (Bought and not sent as a gift + received) ExpandableVoucher: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Voucher" VoucherData: oneOf: - $ref: "#/components/schemas/VoucherDataService" - $ref: "#/components/schemas/VoucherDataAmount" VoucherDataService: type: object required: - type properties: type: type: string format: enum enum: ["service"] sessions_used: type: integer format: int32 example: 0 readOnly: true sessions_total: type: integer format: int32 example: 0 readOnly: true voucher_template_amount: type: number format: double example: 2990 readOnly: true event_type_name: type: string example: "Quicky Haircut" readOnly: true event_type_id: type: string example: d0a9w8da09w8dindwa readOnly: true voucher_template: type: string example: 7awdXwZoedakjad37a readOnly: true VoucherDataAmount: type: object required: - type properties: type: type: string format: enum enum: ["amount"] amount_used: type: number format: double example: 2000 readOnly: true VoucherNotification: type: object properties: phone_country_code: type: string example: "354" phone_number: type: string example: "7134124" description: If a phone number is provided, it receives news of the newly created voucher. email: type: string example: test@testy.is description: If an email is provided, it receives news of the newly created voucher. send_to_user: $ref: "#/components/schemas/Phone" PaymentMethodType: type: string enum: [ApplePay, GooglePay, SavedCard, Card, ActionResult] PaymentProviderType: readOnly: true type: string enum: [teya, adyen] PaymentChannel: type: string enum: [iOS, Android, Web] PaymentMethodCard: type: object required: - type properties: type: type: string format: enum enum: [Card] provider: $ref: "#/components/schemas/PaymentProviderType" PaymentMethodApplePay: type: object required: - type properties: type: type: string format: enum enum: [ApplePay] provider: $ref: "#/components/schemas/PaymentProviderType" PaymentMethodGooglePay: type: object required: - type properties: type: type: string format: enum enum: [GooglePay] provider: $ref: "#/components/schemas/PaymentProviderType" PaymentMethodSavedCard: type: object required: - type - card properties: type: type: string format: enum enum: [SavedCard] provider: $ref: "#/components/schemas/PaymentProviderType" card: $ref: "#/components/schemas/Card" PaymentMethod: oneOf: - $ref: "#/components/schemas/PaymentMethodCard" - $ref: "#/components/schemas/PaymentMethodApplePay" - $ref: "#/components/schemas/PaymentMethodGooglePay" - $ref: "#/components/schemas/PaymentMethodSavedCard" PaymentMethods: type: array items: $ref: "#/components/schemas/PaymentMethod" VoucherPaymentInformation: type: object readOnly: true properties: payment_method: readOnly: true $ref: "#/components/schemas/PaymentMethodType" pan: readOnly: true type: string example: "1842********8123" PaymentInformation: writeOnly: true oneOf: - $ref: "#/components/schemas/SavedCard" - $ref: "#/components/schemas/Card" - $ref: "#/components/schemas/GooglePay" - $ref: "#/components/schemas/ApplePay" - $ref: "#/components/schemas/ActionResult" SavedCard: type: object writeOnly: true required: - card_id - method - return_url - channel properties: method: type: string format: enum enum: ["SavedCard"] card_id: type: string example: 9d8aj2oi2audawo cvc: example: "070" type: string writeOnly: true return_url: type: string description: | If provided, the user is redirected to this URL after the payment is processed. This is required for 3D Secure payments. browser_information: $ref: "#/components/schemas/PaymentBrowserInformation" channel: $ref: "#/components/schemas/PaymentChannel" three_ds2_sdk_version: type: string GooglePay: type: object writeOnly: true required: - method - google_pay_token properties: method: type: string format: enum enum: ["GooglePay"] google_pay_token: description: The token received from Google type: string ApplePay: type: object writeOnly: true description: If apple_pay_token is included in the request, all other fields are ignored. required: - method properties: method: type: string format: enum enum: ["ApplePay"] online_payment_cryptogram: type: string example: "d8awd0awdwa8w9dawdapwojdapowdkamikocaiwjdaijwd7d0aw9d" deprecated: true description: Deprecated. Use `apple_pay_token` instead. pan: example: "1564854695481453" type: string writeOnly: true deprecated: true description: Deprecated. Use `apple_pay_token` instead. expiry_month: example: "02" type: string deprecated: true description: Deprecated. Use `apple_pay_token` instead. expiry_year: example: "02" type: string deprecated: true description: Deprecated. Use `apple_pay_token` instead. apple_pay_token: description: The stringified and base64 encoded paymentData retrieved from the Apple framework. type: string ActionResult: type: object writeOnly: true required: - method - data properties: method: type: string format: enum enum: [ActionResult] data: type: object additionalProperties: true EventTypesGroupsExpanded: type: array items: $ref: "#/components/schemas/EventTypeGroupExpanded" EventTypeGroupExpanded: allOf: - $ref: "#/components/schemas/EventTypeGroup" - type: object properties: group_event_types_count: type: integer format: int32 example: 7 description: The total number of event types that can be traced back to this group. Including children of children. group_event_types: type: array items: $ref: "#/components/schemas/EventType" group_event_type_groups: type: array items: $ref: "#/components/schemas/EventTypeGroupExpanded" EventTypeGroup: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a title: type: string example: Haircuts # x-faker: name.firstName company_id: type: string readOnly: true example: 831dXwZoedakjad40b description: type: string example: Description field image: $ref: "#/components/schemas/Image" user_specific_event_types: type: boolean description: Whether this group is generated for the user or is a generic group with the company. example: false parent_group_id: type: string example: dw7ADw8adawdok order: type: integer format: int32 example: 1 description: Event type groups can be ordered. This indicates where it is located in the order. group_event_types: type: array items: $ref: "#/components/schemas/GroupEventType" created_at: example: 1631558908 type: integer format: int32 readOnly: true updated_at: example: 1631558908 type: integer format: int32 readOnly: true GroupEventType: type: object properties: id: type: string example: 7dj29KiAE1wdjw731 order: type: integer format: int32 example: 1 description: Used to control order in list hierarchy. TimeSlots: type: array items: $ref: "#/components/schemas/TimeSlot" TimeSlot: type: object properties: date: type: string example: "2021-01-03" slots: type: array items: $ref: "#/components/schemas/Slot" Slot: type: object properties: time: type: string example: "08:00" employeeIds: type: array items: type: string spaceIds: type: array items: type: string unavailable_resources: readOnly: true writeOnly: true type: array description: "Details of the resources that are unavailable for this time slot, including the reason" items: $ref: "#/components/schemas/UnavailableResource" unavailable_employees: readOnly: true writeOnly: true type: array description: "Details of the employees that are unavailable for this time slot, including the reason" items: $ref: "#/components/schemas/UnavailableResource" UnavailableResource: type: object properties: resource: type: string description: "The ID of the unavailable resource" reason: type: string format: enum enum: - booked - outside_opening_hours - custom_booking_interval - capacity description: | The reason why the resource is unavailable. Possible values: - `booked` - The resource is booked during this time slot - `outside_opening_hours` - The reservation extends outside the opening hours of the company - `custom_booking_interval` - The reservation start time does not match the custom booking interval of the resource - `capacity` - The capacity of the resource does not match number of guests (Too big or too small) The above list of reasons is priority ordered. Meaning that if a table does not support number of guests due to capacity and is also booked, the reason will be `booked`. EventFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: from: type: string format: date-time description: Only return events where starts_at is after this timestamp. to: type: string format: date-time description: Only return events where starts_at is before this timestamp. Events: type: array items: $ref: "#/components/schemas/Event" Event: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a time_slot_reservation: type: string example: 7awdXwZoedakjad37a description: The time slot reservation ID. starts_at: type: string format: date-time ends_at: type: string format: date-time readOnly: true duration: type: integer format: int32 example: 60 readOnly: true number_of_guests: type: integer format: int32 example: 1 description: Number of guests for the event. customer_name: type: string example: "John Doe" ssn: type: string example: "0101011234" email: type: string example: "example@example.com" license_plate: type: string example: "ABC123" phone_country_code: type: string example: "354" phone_number: type: string example: "7771122" booking_questions: $ref: "#/components/schemas/BookingQuestions" comment: type: string example: "I have blonde hair" origin: type: string example: "online" partner: type: string description: The identifier for the partner system that created the event. no_show_acknowledged: type: boolean example: false event_types: $ref: "#/components/schemas/EventTypes" confirmed: type: boolean description: Whether the event has been confirmed by the company. example: true readOnly: true status: writeOnly: true type: string format: enum enum: ["cancelled"] example: "cancelled" description: The status of the event. Cancelled events are not returned in list of events. rrule: type: string example: "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR" readOnly: true cancel_reason: writeOnly: true type: string example: "I'm sick and can't make it" description: Should be provided if the status is being updated to cancelled. employee: $ref: "#/components/schemas/ExpandableEmployee" space: $ref: "#/components/schemas/ExpandableSpace" company: $ref: "#/components/schemas/ExpandableCompany" specific_employee_requested: type: boolean description: Whether the user requested a specific employee or not. example: true readOnly: true specific_space_requested: type: boolean description: Whether the user requested a specific space or not. example: true readOnly: true booking_for_other: type: boolean example: false writeOnly: true description: | Whether the booking is for someone else. When `true` a customer ID can be passed in to use an existing customer. When `false` the default customer for this marketplace user at the specific company will be used, if one does not exist a new customer will be created. customer: type: string example: "7awdXwZoedakjad37a" description: | When booking for other. The customer ID of the person being booked for. If a customer ID is not provided, a new customer will be created. writeOnly: true payments: $ref: "#/components/schemas/EventTypePayments" payment_information: $ref: "#/components/schemas/PaymentInformation" payment: $ref: "#/components/schemas/ExpandablePayment" payment_intents: $ref: "#/components/schemas/PaymentIntents" pending_payment_details: $ref: "#/components/schemas/PendingPaymentDetails" created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true BookingQuestions: type: array readOnly: true items: $ref: "#/components/schemas/BookingQuestion" BookingQuestion: type: object properties: question: type: string example: "What color is your hair?" answer: type: string example: "Blonde" EventCreateOverrides: type: object required: - time_slot_reservation properties: space: readOnly: true employee: readOnly: true company: readOnly: true cancel_reason: readOnly: true event_types: readOnly: true status: readOnly: true starts_at: readOnly: true EventUpdateOverrides: type: object properties: time_slot_reservation: readOnly: true origin: readOnly: true company: readOnly: true event_types: readOnly: true no_show_acknowledged: readOnly: true comment: readOnly: true phone_number: readOnly: true phone_country_code: readOnly: true email: readOnly: true ssn: readOnly: true customer_name: readOnly: true license_plate: readOnly: true booking_for_other: readOnly: true customer: readOnly: true payment_information: readOnly: true payment_intents: readOnly: true EventUpdate: allOf: - $ref: "#/components/schemas/Event" - $ref: "#/components/schemas/EventUpdateOverrides" EventNotification: type: object properties: email: type: string example: test@testy.is description: Send an email notification to this email address about event. EventData: type: object properties: name: type: string example: "Johnny The Second" phone_country_code: type: string example: "354" phone_number: type: string example: "7134124" license_plate: type: string example: df302 ssn: type: string example: "1302782649" email: type: string example: "some@email.com" EventDataValidation: type: object properties: name: type: string example: "" phone_country_code: type: string example: "" phone_number: type: string example: "" license_plate: type: string example: "" ssn: type: string example: "" email: type: string example: "" Customers: type: array items: $ref: "#/components/schemas/Customer" Customer: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a name: type: string example: "John Doe" ssn: type: string example: 0101011234 email: type: string example: "example@example.com" license_plate: type: string example: "ABC123" default: type: boolean example: true description: | The default customer tied to the marketplace user. This is false for customers created when using `booking_for_other`. Location: type: object properties: formatted_address: type: string lat_lng: $ref: "#/components/schemas/LocationLatLng" country: $ref: "#/components/schemas/Country" time_zone: type: string example: "Atlantic/Reykjavik" Country: type: object properties: short_name: type: string example: IS long_name: type: string example: Iceland LocationLatLng: type: object required: - lat - lng properties: lat: type: number format: double lng: type: number format: double UserLocation: type: object required: - lat - lng properties: lat: type: number format: double example: 64.1334071 lng: type: number format: double example: -22.0083191 country: type: string example: Ísland readOnly: true country_iso_code: type: string example: IS readOnly: true city: type: string example: Reykjavík readOnly: true Currency: type: string example: EUR Order: type: integer format: int32 example: 1 description: Used to control order in list hierarchy. Image: type: object properties: thumb: type: string example: https://placekitten.com/200/200 image: type: string example: https://placekitten.com/200/300 public_id: type: string example: https://placekitten.com/200/300 LocaleForUser: type: object properties: ui_language: type: string LocaleForCompany: type: object properties: ui_language: type: string messaging_language: type: string description: Outgoing messages language such as emails, push notifications, SMS Sort: type: object properties: field: type: string order: type: string enum: [asc, desc] CompanySort: type: object properties: field: type: string description: | All fields can be used for sorting, along with these special fields: - `popular` - Sorts companies by favorite count. - `distance` - Sorts companies by distance from the provided location. order: type: string enum: [asc, desc] EventTypeSearchFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: company_type: type: string example: 7awdXwZoedakjad37a description: Returns only event types valid for the company type. lat: type: number format: double description: Latitude of the location to search around. lng: type: number format: double description: Longitude of the location to search around. radius: type: integer format: int64 default: 10000 description: | Only return services of companies within radius of lat/lng in **meters**. If latitude and longitude are not provided the radius has no effect. EventTypeFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: employee_id: type: string example: 7awdXwZoedakjad37a description: Returns only event types valid for the employee. event_type_ids: type: array description: Only return specified event types. items: type: string EventTypes: type: array items: $ref: "#/components/schemas/EventType" EventType: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a title: type: string example: Men's haircut company_id: type: string example: 831dXwZoedakjad40b writeOnly: true readOnly: true deprecated: true description: Deprecated, use `company` instead. company: $ref: "#/components/schemas/ExpandableCompany" minutes: type: integer format: int32 example: 30 description: type: string example: 30 minute men's haircut min_guests_per_booking: type: integer format: int32 description: Minimum number of guests per booking. If this is not set on the event type, the company's default is used. max_guests_per_booking: type: integer format: int32 description: Maximum number of guests per booking. If this is not set on the event type, the company's default is used. thumb: type: string description: The event type's image URL as thumb (low res) example: api.noona.is/static/haircut.png variations: $ref: "#/components/schemas/EventTypeVariations" price_ranges: $ref: "#/components/schemas/EventTypePriceRanges" connections: $ref: "#/components/schemas/EventTypeConnections" payments: $ref: "#/components/schemas/EventTypePayments" pending_payment_details: $ref: "#/components/schemas/PendingPaymentDetails" pending_payment_details_required: $ref: "#/components/schemas/PendingPaymentDetails" pending_payment_details_full: $ref: "#/components/schemas/PendingPaymentDetails" relative_location: $ref: "#/components/schemas/RelativeLocation" created_at: example: 1631558908 type: integer format: int32 readOnly: true updated_at: example: 1631558908 type: integer format: int32 readOnly: true deleted_at: type: string format: date-time readOnly: true EventTypesWithTimeSlots: type: array items: $ref: "#/components/schemas/EventTypeWithTimeSlots" EventTypeWithTimeSlots: type: object properties: event_type: $ref: "#/components/schemas/EventType" time_slots: $ref: "#/components/schemas/TimeSlots" EventTypePayments: type: object readOnly: true properties: pre_payment_enabled: type: boolean example: true description: | Is pre-payment enabled at all for the company? `true` - Other flags have meaning. `false` - Other flags are ignored. pre_payment_required: type: boolean example: true description: | Is any upfront payment required? `true` - pre_payment_ratio is used to indicate how much. `false` - pre_payment_ratio is ignored. pre_payment_ratio: type: integer format: int32 example: 20 minimum: 0 maximum: 100 description: How much of the total price must be paid in advance in %. optional_full_payment: type: boolean example: true description: | Is full payment optional? `true` - on_location_payment_amount can optionally be fully paid. `false` - no optional payment. pre_payment_amount: type: number format: double example: 2000 description: How much must be paid in advance. optional_pre_payment_amount: type: number format: double example: 10000 description: How much can optionally be paid in advance. on_location_payment_amount: type: number format: double example: 8000 description: How much must be paid on location. (Lower limit) on_location_payment_amount_upper_limit: type: number format: double example: 8000 description: How much must be paid on location. (Upper limit) readOnly: true pre_payment_currency: type: string example: ISK total_payment: type: number format: double example: 10000 description: Total price of the event type. (Lower limit) total_payment_upper_limit: type: number format: double example: 10000 description: Total price of the event type. (Upper limit) readOnly: true RelativeLocation: type: object properties: lat: type: number format: double lng: type: number format: double distance: type: number format: double description: Distance in meters from user location (When applicable). EventTypePriceRanges: type: array items: type: object $ref: "#/components/schemas/EventTypePriceRange" EventTypePriceRange: type: object properties: min: #TODO: Extract amount to type? type: number format: double example: 10 max: type: number format: double example: 30 currency: type: string example: EUR EventTypeVariations: type: array items: $ref: "#/components/schemas/EventTypeVariation" EventTypeVariation: type: object properties: label: type: string example: Premium customer_group: type: string example: 7awdXwZoedakjad37a description: The customer group that this variation is valid for. prices: type: array items: $ref: "#/components/schemas/EventTypeVariationPrice" EventTypeVariationPrice: type: object properties: currency: type: string example: EUR amount: type: number format: double example: 40 EventTypeConnections: type: object properties: customer_selects: type: string enum: [employee, space, both, neither] description: For this event type, does the customer select the employee/space or is it selected automatically at random? service_needs: type: string enum: [employee, space, both] description: For this event type, what does the service need to be booked? booking_question: type: string description: When booking, users are prompted these booking questions and are required to fill in an answer. example: What color do you want to dye your hair? booking_success_message: type: string description: For a successful booking, this message is displayed for each event type booked. example: Remember to bring your smile with you! marketplace: type: boolean description: | Whether this event type is available in the marketplace. `true` - The event type is available in the marketplace. `false` - The event type is not available in the marketplace. ID: type: string ExpandableUser: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/User" ExpandableEmployee: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Employee" ExpandableSpace: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Space" ExpandableEventType: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/EventType" Pagination: type: object properties: offset: type: integer format: int32 example: 0 default: 0 limit: type: integer format: int32 example: 10 default: 500 maximum: 500 minimum: 1 description: The maximum number of results to return. Search: type: string example: "" description: The search query. TimeSlotReservations: type: array items: $ref: "#/components/schemas/TimeSlotReservation" TimeSlotReservation: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a company: $ref: "#/components/schemas/ExpandableCompany" event_types: type: array items: $ref: "#/components/schemas/ExpandableEventType" number_of_guests: type: integer format: int32 example: 10 description: The total number of guests to book for. time_zone: type: string example: Atlantic/Reykjavik readOnly: true starts_at: type: string format: date-time ends_at: type: string format: date-time readOnly: true employee: $ref: "#/components/schemas/ExpandableEmployee" space: $ref: "#/components/schemas/ExpandableSpace" payments: $ref: "#/components/schemas/EventTypePayments" payment_intents: $ref: "#/components/schemas/PaymentIntents" payment_type: type: string format: enum enum: ["required", "full"] example: "full" default: "full" description: | What to do with payment when creating an event. `required` - Only pay the required amount in advance. `full` - Pay the full amount in advance. pending_payment_details: $ref: "#/components/schemas/PendingPaymentDetails" pending_payment_details_required: $ref: "#/components/schemas/PendingPaymentDetails" pending_payment_details_full: $ref: "#/components/schemas/PendingPaymentDetails" phone_country_code: type: string example: +354 writeOnly: true phone_number: type: string writeOnly: true resources: type: array items: type: string readOnly: true writeOnly: true specific_employee_requested: type: boolean readOnly: true writeOnly: true specific_space_requested: type: boolean readOnly: true writeOnly: true expires_at: type: string format: date-time readOnly: true created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true PendingPaymentDetails: type: object readOnly: true properties: outstanding: type: number format: double example: 2000 description: How much has not been paid yet but is required with respect to the payment type and previously specified payment intents. readOnly: true on_location: type: number format: double example: 8000 description: How much must be paid on location. (Lower limit) on_location_upper_limit: type: number format: double example: 8000 description: How much must be paid on location. (Upper limit) readOnly: true total: type: number format: double example: 10000 description: | Total price of the event type with respect to payment intents. (Lower limit) readOnly: true total_upper_limit: type: number format: double example: 10000 description: | Total price of the event type with respect to payment intents. (Upper limit) readOnly: true PaymentIntents: type: array items: $ref: "#/components/schemas/PaymentIntent" PaymentIntent: oneOf: - $ref: "#/components/schemas/VoucherPayment" - $ref: "#/components/schemas/VoucherTemplatePayment" PaymentIntentMethods: type: string format: enum enum: ["VoucherPayment", "VoucherTemplatePayment"] VoucherPayment: type: object required: - method - voucher_code properties: id: type: string example: 7awdXwZoedakjad37a readOnly: true method: type: string format: enum enum: ["VoucherPayment"] voucher_code: type: string example: D6XC8A voucher: $ref: "#/components/schemas/ExpandableVoucher" event_type_id: type: string example: 7awdXwZoedakjad37a readOnly: true total_amount: type: number format: double example: 10000 readOnly: true amount_to_use: type: number format: double example: 10000 readOnly: true title: type: string example: Haircut readOnly: true sessions_total: type: integer format: int32 example: 5 readOnly: true VoucherTemplatePayment: type: object required: - method - voucher_template properties: id: type: string example: 7awdXwZoedakjad37a readOnly: true method: type: string format: enum enum: ["VoucherTemplatePayment"] voucher_template: $ref: "#/components/schemas/ExpandableVoucherTemplate" event_type_id: type: string example: 7awdXwZoedakjad37a readOnly: true total_amount: type: number format: double example: 10000 readOnly: true currency: type: string example: ISK readOnly: true title: type: string example: Haircut readOnly: true sessions_total: type: integer format: int32 example: 5 readOnly: true voucher_id: type: string example: 7awdXwZoedakjad37a readOnly: true TimeSlotReservationUpdate: type: object properties: phone_country_code: type: string example: +354 writeOnly: true phone_number: type: string writeOnly: true payment_intents: $ref: "#/components/schemas/PaymentIntents" payment_type: type: string format: enum enum: ["required", "full"] example: "full" default: "full" description: | What to do with payment when creating an event. `required` - Only pay the required amount in advance. `full` - Pay the full amount in advance. ExpandablePayment: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" readOnly: true oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/Payment" Payments: type: array items: $ref: "#/components/schemas/Payment" Payment: type: object properties: id: example: 7awdXwZoedakjad37a type: string readOnly: true company: $ref: "#/components/schemas/ExpandableCompany" user: $ref: "#/components/schemas/ExpandableUser" currency: type: string example: ISK amount: type: number format: double example: 10000 status: $ref: "#/components/schemas/PaymentStatus" provider: $ref: "#/components/schemas/PaymentProviderType" created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true PaymentStatus: type: string format: enum enum: [unsettled, settled, refunded, pending] example: "refunded" PaymentFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: statuses: type: array items: $ref: "#/components/schemas/PaymentStatus" Error: type: object required: - message properties: type: type: string format: enum enum: [generic_error] message: type: string example: "Time slot is not available." CreateEventErrorOneOf: oneOf: - $ref: "#/components/schemas/CreateEventError" - $ref: "#/components/schemas/PaymentActionError" CreateEventError: type: object required: - code - message - type properties: type: type: string format: enum enum: [create_event_error] message: type: string example: "Time slot is not available." code: type: string enum: [ time_slot_not_available, invalid_card, invalid_card_number, not_sufficient_funds, expired_card, unknown_payment_error, ] description: The error code. Only populated for certain errors. user_message: type: string example: "Time slot is not available." description: A human readable error message that is translated according to the user's locale. CreateTimeSlotReservationError: type: object required: - type - code - message properties: type: type: string format: enum enum: [create_timeslot_reservation_error] code: type: string enum: [invalid_voucher, voucher_fully_used] description: The error code. Only populated for certain errors. message: type: string user_message: type: string example: "Voucher does not match services in booking." description: A human readable error message that is translated according to the user's locale. PaymentError: oneOf: - $ref: "#/components/schemas/Error" - $ref: "#/components/schemas/PaymentActionError" PaymentActionError: description: Payment action error type: object required: - type - action properties: type: type: string format: enum enum: [payment_action_error] action: type: object additionalProperties: true TrendingCompanies: type: array items: $ref: "#/components/schemas/TrendingCompany" TrendingCompany: type: object properties: company: $ref: "#/components/schemas/ExpandableCompany" fav_delta_7_days: type: integer format: int32 example: 10 description: The change in favorites for this company over the last 7 days. ExpandableVoucherTemplate: description: "[Expandable](https://api.noona.is/docs/working-with-the-apis/expandable_attributes)" oneOf: - $ref: "#/components/schemas/ID" - $ref: "#/components/schemas/VoucherTemplate" VoucherTemplateFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: event_types: type: array items: type: string example: 7awdXwZoedakjad37a VoucherTemplates: type: array items: $ref: "#/components/schemas/VoucherTemplate" VoucherTemplate: type: object properties: id: example: 7awdXwZoedakjad37a type: string readOnly: true title: type: string example: "Voucher for the men's haircut" event_type: $ref: "#/components/schemas/ExpandableEventType" variation_id: type: string description: The ID of the event type variation that the value of the voucher should be calculated from. example: 7awdXwZoedakjad37a company: type: string example: 7awdXwZoedakjad37a currency: type: string example: ISK amount: type: number format: double example: 10000 value: type: number format: double example: 12500 readOnly: true sessions_total: type: integer format: int32 example: 5 created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true SpeedySlots: type: array items: $ref: "#/components/schemas/SpeedySlot" SpeedySlot: type: object properties: company: $ref: "#/components/schemas/Company" event_types: $ref: "#/components/schemas/EventTypesWithTimeSlots" SpeedySlotsSearchFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" required: - lat - lng properties: lat: type: number format: double description: Latitude of the location to search around. lng: type: number format: double description: Longitude of the location to search around. radius: type: integer format: int64 default: 10000 description: | Only return services of companies within radius of lat/lng in **meters**. If latitude and longitude are not provided the radius has no effect. PaylinkPayment: type: object description: | A payment object that can be used to finish a payment using noona paylink. properties: payment: $ref: "#/components/schemas/PaymentInformation" VoucherFilter: type: object description: "[Filtering](https://api.noona.is/docs/working-with-the-apis/filtering)" properties: relationship: $ref: "#/components/schemas/VoucherRelationship" omit_fully_used: type: boolean example: true default: false description: | Whether to omit vouchers that are fully used. `true` - Omit vouchers that are fully used. `false` - Include vouchers that are fully used. VerifyPhoneNumberResult: type: object required: - next_retry_at properties: next_retry_at: type: string format: date-time example: "2022-01-01T00:00:00Z" description: The next time the verification SMS can be re-sent. VerifyPhoneNumberError: type: object required: - type - message - code properties: type: type: string format: enum enum: [verify_phone_number_error] message: type: string example: "Verification already in progress" code: type: string enum: [ verification_in_progress, verification_attempt_limit_reached, unknown_error, ] description: The error code. ApplePaySessionResponse: type: object required: - data properties: data: type: string example: "dGhlIGFwcGxlIHBheSBzZXNzaW9uIHBheWxvYWQ=" description: The Apple Pay Session data base64 encoded. QuickBookingSearchSuggestions: type: array items: $ref: "#/components/schemas/QuickBookingSearchSuggestion" QuickBookingSearchSuggestion: type: object required: - keyword properties: keyword: type: string description: The keyword to search for in quick bookings. example: Men's haircut WaitlistEntries: type: array items: $ref: "#/components/schemas/WaitlistEntry" WaitlistEntry: type: object properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a company: $ref: "#/components/schemas/ExpandableCompany" event_types: type: array items: $ref: "#/components/schemas/ExpandableEventType" employee: $ref: "#/components/schemas/ExpandableEmployee" number_of_guests: type: integer format: int32 example: 1 description: Number of guests for the event. notes: type: string example: "I can only make it after noon" expires_at: type: string format: date-time created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true WaitlistEntriesResponse: type: array items: $ref: "#/components/schemas/WaitlistEntryResponse" WaitlistEntryResponse: allOf: - $ref: "#/components/schemas/WaitlistEntry" - $ref: "#/components/schemas/WaitlistEntryResponseOverrides" WaitlistEntryResponseOverrides: type: object required: - "id" - "company" - "event_types" - "created_at" - "updated_at" properties: id: type: string readOnly: true example: 7awdXwZoedakjad37a company: $ref: "#/components/schemas/ExpandableCompany" employee: $ref: "#/components/schemas/ExpandableEmployee" event_types: type: array items: $ref: "#/components/schemas/ExpandableEventType" number_of_guests: type: integer format: int32 example: 1 description: Number of guests for the event. notes: type: string example: "I can only make it after noon" expires_at: type: string format: date-time readOnly: true created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true WaitlistEntryCreateOverrides: type: object required: - "company" - "event_types" properties: company: $ref: "#/components/schemas/ExpandableCompany" event_types: type: array items: $ref: "#/components/schemas/ExpandableEventType" WaitlistEntryCreate: allOf: - $ref: "#/components/schemas/WaitlistEntry" - $ref: "#/components/schemas/WaitlistEntryCreateOverrides"