### API Authentication Header Example Source: https://external.api.portal.bokadirekt.se/index Demonstrates how to include your API key in the request header for authentication. The API key is required for all requests to access the M3 External API. ```HTTP X-API-KEY: your-api-key ``` -------------------------------- ### Webhook Example Payload for Booking Event Source: https://external.api.portal.bokadirekt.se/index An example JSON payload representing a booking event notification sent via webhook. This payload contains detailed information about the booking, customer, and event trigger. ```JSON { "Id": "00000000-0000-0000-0000-000000000000", "LocationId": "00000000-0000-0000-0000-000000000000", "LocationName": "Test salon", "PersonId": "00000000-0000-0000-0000-000000000000", "PersonName": "Test person", "ServiceId": "00000000-0000-0000-0000-000000000000", "ServiceName": "Test service", "BookingPrice": 100.0, "BookingStartDate": "2025-01-01T09:00:00+01:00", "BookingEndDate": "2025-01-01T10:00:00+01:00", "Customer": { "Id": "00000000-0000-0000-0000-000000000000", "MobilePhoneNumber": "+46000000000", "PhoneNumber": "+46000000000", "FirstName": "Test", "LastName": "Customer", "EmailAdress": "test@test.se", "NewCustomer": false }, "EventCreated": "2025-01-01T08:00:00+00:00", "BookedOnline": true, "Cancelled": false, "NewCustomer": false, "GclId": null, "Referer": "bokadirekt.se" } ``` -------------------------------- ### GET /api/v1/customers Source: https://external.api.portal.bokadirekt.se/index Retrieves all customers associated with a salon. Returns detailed customer information including contact details, preferences, categories, and address data. ```APIDOC ## GET /api/v1/customers ### Description Retrieves all customers associated with a salon. Returns detailed customer information including contact details, preferences, categories, and address data. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/customers ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **customerId** (string ) - Unique identifier of the customer. - **name** (string or null) - Full name of the customer. - **email** (string or null) - Email address of the customer. - **phone** (string or null) - Phone number of the customer. - **gender** (integer ) - Enum: 0 1 2 3 Gender of the customer. (0 = Unknown, 1 = Female, 2 = Male, 3 = Other) - **allowEmail** (boolean) - Indicates whether the customer has consented to receive communication via email. - **allowSms** (boolean) - Indicates whether the customer has consented to receive communication via SMS. - **categories** (Array of strings or null) - List of categories or tags associated with the customer (e.g. VIP, Student). - **socialSecurityNumber** (string or null) - Social security number or personal identifier of the customer. - **postalCode** (string or null) - Postal code of the customer's address. - **city** (string or null) - City of the customer's address. - **birthday** (string or null) - Customer's date of birth, typically in ISO 8601 format (YYYY-MM-DD). - **addressLine1** (string or null) - Primary address line of the customer's address (e.g. street name and number). - **addressLine2** (string or null) - Secondary address line (e.g. apartment number, building, etc.). #### Response Example ```json [ { "customerId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Jane Doe", "email": "jane.doe@example.com", "phone": "+1234567890", "gender": 1, "allowEmail": true, "allowSms": false, "categories": ["VIP", "Regular"], "socialSecurityNumber": "19900101-1234", "postalCode": "12345", "city": "Example City", "birthday": "1990-01-01", "addressLine1": "123 Main St", "addressLine2": "Apt 4B" } ] ``` ``` -------------------------------- ### GET /api/v1/products Source: https://external.api.portal.bokadirekt.se/index Retrieves all products associated with a salon. Returns detailed product information, including product ID, product name, supplier ID, and supplier name. ```APIDOC ## GET /api/v1/products ### Description Retrieves all products associated with a salon. Returns detailed product information, including product ID, product name, supplier ID, and supplier name. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/products ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **productId** (string ) - Unique identifier of the product. - **productName** (string or null) - Name of the product. - **supplierId** (string ) - Unique identifier of the product's supplier. - **supplierName** (string or null) - Name of the supplier providing the product. #### Response Example ```json [ { "productId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "productName": "Standard Haircut", "supplierId": "f0e9d8c7-b6a5-4321-0987-654321fedcba", "supplierName": "Pro Stylists" } ] ``` ``` -------------------------------- ### Get Services API Source: https://external.api.portal.bokadirekt.se/index Retrieves all services associated with a salon. Returns detailed service information, including service ID, add-on status, and service name, grouped and ordered by service name. ```APIDOC ## GET /api/v1/services ### Description Retrieves all services associated with a salon. It returns detailed service information, including service ID, add-on status, and service name, grouped and ordered by service name. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/services ### Responses #### Success Response (200) - **serviceId** (string ) - Unique identifier of the service. - **serviceName** (string or null) - Name of the service. - **isAddon** (boolean) - Indicates whether the service is an add-on to another service. #### Error Response (429) Too Many Requests #### Response Example (200) ```json [ { "serviceId": "c1d2e3f4-a5b6-7890-1234-567890abcdef", "serviceName": "Standard Haircut", "isAddon": false } ] ``` ``` -------------------------------- ### Booking API - Get Bookings Source: https://external.api.portal.bokadirekt.se/index Retrieves all bookings associated with a salon within a specified date range. Defaults to the past 30 days if no date range is provided. ```APIDOC ## GET /bookings ### Description Retrieves all bookings associated with a salon within a specified date range. If no date range is provided, the endpoint defaults to returning bookings from the past 30 days. ### Method GET ### Endpoint /bookings ### Parameters #### Query Parameters - **FilterOnStartDate** (boolean) - Optional - Indicates whether bookings should be filtered based on their scheduled start date instead of their creation date. Defaults to false. - **StartDate** (string ) - Optional - Start date to filter bookings. - **EndDate** (string ) - Optional - End date to filter bookings. ### Response #### Success Response (200) OK #### Response Example ```json [ { "Id": "00000000-0000-0000-0000-000000000000", "LocationId": "00000000-0000-0000-0000-000000000000", "LocationName": "Test salon", "PersonId": "00000000-0000-0000-0000-000000000000", "PersonName": "Test person", "ServiceId": "00000000-0000-0000-0000-000000000000", "ServiceName": "Test service", "BookingPrice": 100.0, "BookingStartDate": "2025-01-01T09:00:00+01:00", "BookingEndDate": "2025-01-01T10:00:00+01:00", "Customer": { "Id": "00000000-0000-0000-0000-000000000000", "MobilePhoneNumber": "+46000000000", "PhoneNumber": "+46000000000", "FirstName": "Test", "LastName": "Customer", "EmailAdress": "test@test.se", "NewCustomer": false }, "EventCreated": "2025-01-01T08:00:00+00:00", "BookedOnline": true, "Cancelled": false, "NewCustomer": false, "GclId": null, "Referer": "bokadirekt.se" } ] ``` ``` -------------------------------- ### Get Resources API Source: https://external.api.portal.bokadirekt.se/index Retrieves all resources (staff) associated with a salon within a specified date range. Defaults to the last 30 days if no range is provided. Returns detailed resource information, including availability, occupancy, nicknames, online booking status, and pricing details. ```APIDOC ## GET /api/v1/resources ### Description Retrieves all resources (staff) associated with a salon within a specified date range, defaulting to the last 30 days if no range is provided. It returns detailed resource information, including availability, occupancy, nicknames, online booking status, and pricing details. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/resources ### Query Parameters - **StartDate** (string ) - Optional - Start date to filter bookings. - **EndDate** (string ) - Optional - End date to filter bookings. ### Responses #### Success Response (200) - **salonId** (string ) - Unique identifier of the salon the resource is associated with. - **salonName** (string or null) - Name of the salon. - **resourceId** (string ) - Unique identifier of the resource. - **resourceName** (string or null) - Full name of the resource. - **resourceNickName** (string or null) - Optional nickname of the resource. - **finishDate** (string or null ) - The date when the resource stopped being available, if applicable. - **bookableOnline** (boolean) - Indicates whether the resource is available for online booking. - **onlineTitle** (string or null) - Title or label shown to customers during online booking. - **availabilities** (Array of objects or null) - List of availability details for the resource within the specified date range. - **priceListName** (string or null) - Name of the price list associated with the resource. #### Error Response (429) Too Many Requests #### Response Example (200) ```json [ { "salonId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "salonName": "Example Salon", "resourceId": "f0e9d8c7-b6a5-4321-0987-fedcba012345", "resourceName": "John Doe", "resourceNickName": "JD", "finishDate": null, "bookableOnline": true, "onlineTitle": "Haircut", "availabilities": [], "priceListName": "Standard Prices" } ] ``` ``` -------------------------------- ### GET /api/v1/bookings Source: https://external.api.portal.bokadirekt.se/index Retrieves a list of bookings. The response schema includes details about each booking such as salon information, customer details, resource assignments, service information, and booking status. ```APIDOC ## GET /api/v1/bookings ### Description Retrieves a list of bookings. The response schema includes details about each booking such as salon information, customer details, resource assignments, service information, and booking status. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/bookings ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **salonId** (string ) - Unique identifier of the salon where the booking was made. - **salonName** (string or null) - Name of the salon. - **customerId** (string or null ) - Unique identifier of the customer who made the booking. - **customerName** (string or null) - Full name of the customer. - **resourceId** (string ) - Unique identifier of the resource (e.g. staff member) assigned to the booking. - **resourceName** (string or null) - Full name of the assigned resource. - **resourceNickName** (string or null) - Optional nickname of the assigned resource. - **bookingId** (string ) - Unique identifier of the booking. - **bookingGroupId** (string ) - Identifier used to group related bookings (e.g. recurring or linked appointments). - **created** (string ) - Date and time when the booking was created (in UTC). - **serviceId** (string ) - Unique identifier of the booked service. - **serviceName** (string or null) - Name of the booked service. - **onlineBooking** (boolean) - Indicates whether the booking was made online. - **startDate** (string ) - Scheduled start date and time of the booking (in UTC). - **endDate** (string ) - Scheduled end date and time of the booking (in UTC). - **bookedPrice** (number ) - Total price of the booking at the time it was made. - **cancelled** (boolean) - Indicates whether the booking was cancelled. - **dropIn** (boolean) - Indicates whether the booking was made as a drop-in (walk-in) appointment. - **rebooked** (boolean) - Indicates whether the booking is a rebooking of a previous appointment. - **noShow** (boolean) - Indicates whether the customer was marked as a no-show for the appointment. - **isAddon** (boolean) - Indicates whether the booking is an add-on service to another booking. #### Response Example ```json [ { "salonId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "salonName": "Example Salon", "customerId": "f0e9d8c7-b6a5-4321-0987-654321fedcba", "customerName": "John Doe", "resourceId": "1a2b3c4d-5e6f-7890-1234-567890abcdef", "resourceName": "Jane Smith", "resourceNickName": "Jane", "bookingId": "12345678-90ab-cdef-1234-567890abcdef", "bookingGroupId": "abcdef12-3456-7890-abcd-ef1234567890", "created": "2023-10-27T10:00:00Z", "serviceId": "87654321-0fed-cba9-8765-43210fedcba9", "serviceName": "Haircut", "onlineBooking": true, "startDate": "2023-10-27T11:00:00Z", "endDate": "2023-10-27T12:00:00Z", "bookedPrice": 50.00, "cancelled": false, "dropIn": false, "rebooked": false, "noShow": false, "isAddon": false } ] ``` ``` -------------------------------- ### Get Sales API Source: https://external.api.portal.bokadirekt.se/index Retrieves all sales transactions associated with a salon within a specified date range, defaulting to the last 30 days if no range is provided. Returns detailed sales information, including transaction ID, product or service sold, quantity, price, customer, and date of sale. ```APIDOC ## GET /api/v1/sales ### Description Retrieves all sales transactions associated with a salon within a specified date range, defaulting to the last 30 days if no range is provided. It returns detailed sales information, including transaction ID, product or service sold, quantity, price, customer, and date of sale. ### Method GET ### Endpoint https://external.api.portal.bokadirekt.se/api/v1/sales ### Query Parameters - **StartDate** (string ) - Optional - Start date to filter bookings. - **EndDate** (string ) - Optional - End date to filter bookings. ### Responses #### Success Response (200) - **salonId** (string ) - Unique identifier of the salon associated with the sales data. - **salonName** (string or null) - Name of the salon. - **headers** (Array of objects or null) - List of sales transaction headers, each representing a receipt. #### Error Response (429) Too Many Requests #### Response Example (200) ```json [ { "salonId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "salonName": "Example Salon", "headers": [] } ] ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.