### Payment Setup v1 Source: https://annyco.stoplight.io/docs/bookings-api/75d30a964adbc-customer-api Endpoints for managing payment setups. ```APIDOC ## Payment Setup v1 - **GET /v1/payment-setup**: Retrieve payment setups. - **POST /v1/payment-setup**: Create a new payment setup. - **GET /v1/payment-setup/{id}**: Retrieve a specific payment setup by ID. - **PUT /v1/payment-setup/{id}**: Update a specific payment setup. - **DELETE /v1/payment-setup/{id}**: Delete a specific payment setup. ``` -------------------------------- ### Payment Setup API Source: https://annyco.stoplight.io/docs/bookings-api/3222585e216ca-payment-setup This section details the structure of the payment setup object, including its attributes, relationships, and metadata. ```APIDOC ## Payment Setup Object ### Description Represents the structure for payment setup, including details like status, payment options, and ownership. ### Method N/A (This describes a data structure, not an endpoint) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (string) - Required - Unique identifier for the payment setup. - **type** (string) - Required - The type of the resource. - **attributes** (object) - Required - Contains the main details of the payment setup. - **status** (string) - Required - The current status of the payment setup. - **allow_off_session** (boolean) - Required - Indicates if off-session payments are allowed. - **allow_recurring** (boolean) - Required - Indicates if recurring payments are allowed. - **owner_name** (string or null) - Optional - The name of the owner. - **relationships** (object) - Required - Links to related resources. - **owner** (object) - Required - Relationship to the owner. - **method** (object) - Required - Relationship to the payment method. - **meta** (object or null) - Optional - Additional metadata. ### Request Example ```json { "id": "string", "type": "string", "attributes": { "status": "string", "allow_off_session": true, "allow_recurring": true, "owner_name": "string" }, "relationships": { "owner": { "data": {} }, "method": { "data": {} } }, "meta": {} } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the payment setup. - **type** (string) - The type of the resource. - **attributes** (object) - Contains the main details of the payment setup. - **status** (string) - The current status of the payment setup. - **allow_off_session** (boolean) - Indicates if off-session payments are allowed. - **allow_recurring** (boolean) - Indicates if recurring payments are allowed. - **owner_name** (string or null) - The name of the owner. - **relationships** (object) - Links to related resources. - **owner** (object) - Relationship to the owner. - **method** (object) - Relationship to the payment method. - **meta** (object or null) - Additional metadata. #### Response Example ```json { "id": "string", "type": "string", "attributes": { "status": "string", "allow_off_session": true, "allow_recurring": true, "owner_name": "string" }, "relationships": { "owner": { "data": {} }, "method": { "data": {} } }, "meta": {} } ``` ``` -------------------------------- ### Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/4e53154133678-has-one-relationship Instructions on how to correctly install the status embed for displaying incidents or maintenance on your status page. ```APIDOC ## Status Embed Installation ### Description This section explains how to correctly install the status embed. This embed will display any incidents or maintenance notices posted on your status page. ### Method Not Applicable (This is an installation guide) ### Endpoint Not Applicable ### Parameters Not Applicable ### Request Example Not Applicable ### Response #### Success Response (200) Not Applicable #### Response Example Not Applicable ``` -------------------------------- ### Status Embed Settings JSON Example Source: https://annyco.stoplight.io/docs/bookings-api/52b5ad24bbf93-setting This JSON object represents the structure for configuring the status embed settings. It includes fields for ID, type, attributes, relationships, and links, with example string placeholders for values. ```json { "id": "string", "type": "settings", "attributes": { "": "string" }, "relationships": { "": "string" }, "links": {} } ``` -------------------------------- ### Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/98baccadebcd3-zoom-user Information on how to correctly install the status embed, which displays incidents or maintenance notices from your status page. ```APIDOC ## Status Embed Installation ### Description This section explains how to correctly install the status embed. When installed, it will display any incidents or maintenance notices that have been posted on your status page. It also provides a link to view the latest updates. ### Usage Ensure the status embed is installed correctly to reflect real-time updates from your status page. ### View Latest Updates [Link to view latest updates on the status page] ``` -------------------------------- ### Verify Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/39ee1d4f4ee7c-has-many-relationship This section confirms that the status embed has been successfully installed. It should display any active incidents or scheduled maintenance from your status page. No specific code is provided for installation, but verification is visual. -------------------------------- ### Settings Management Source: https://annyco.stoplight.io/docs/bookings-api/52b5ad24bbf93-setting Endpoints for retrieving and managing settings. ```APIDOC ## Settings API ### Description This API allows you to retrieve and manage your application settings. It includes endpoints for exporting settings and viewing individual setting details. ### Method GET ### Endpoint /settings ### Parameters #### Query Parameters - **export** (boolean) - Optional - If true, the response will be in an exportable format. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the setting. - **type** (string) - The type of the setting (e.g., 'settings'). - **attributes** (object) - Contains the key-value pairs of the setting. - **relationships** (object) - Links to related resources. - **links** (object) - Links to the setting resource. #### Response Example ```json { "id": "string", "type": "settings", "attributes": { "some_setting_key": "some_setting_value" }, "relationships": {}, "links": {} } ``` ``` -------------------------------- ### Unavailability Types API Source: https://annyco.stoplight.io/docs/bookings-api/co5dpvt2f27w7-unavailability-types-v1 This section details the 'unavailability-types.v1' endpoint, which allows for the retrieval and management of different types of unavailability. ```APIDOC ## GET /unavailability-types.v1 ### Description Retrieves a list of supported unavailability types. ### Method GET ### Endpoint /unavailability-types.v1 ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **unavailability_types** (array) - A list of available unavailability types. - Each item in the array is a string representing an unavailability type. #### Response Example ```json { "unavailability_types": [ "under_min_duration", "booked_out", "blocked", "intermediate_booking", "off_schedule", "end_before_start", "before_lead_time", "under_min_duration", "over_max_duration", "none", "order_quantity_exceeded", "after_advance_booking_period" ] } ``` ``` -------------------------------- ### Payment Setup JSON Structure Source: https://annyco.stoplight.io/docs/bookings-api/3222585e216ca-payment-setup This JSON structure defines the expected format for payment setup data. It includes fields for ID, type, attributes like status and recurring payment options, and relationships to owner and method. The 'meta' field is optional. ```json { "id": "string", "type": "string", "attributes": { "status": "string", "allow_off_session": true, "allow_recurring": true, "owner_name": "string" }, "relationships": { "owner": { "data": {} }, "method": { "data": {} } }, "meta": {} } ``` -------------------------------- ### Example Activity Log JSON Structure Source: https://annyco.stoplight.io/docs/bookings-api/86f52aff53ac5-activity This JSON structure represents an example of an activity log entry. It includes fields for ID, type, attributes (log name, description, properties, creation timestamp), and links. ```json { "id": "string", "type": "activities", "attributes": { "log_name": "string", "description": "string", "properties": "string", "created_at": "2019-08-24T14:15:22Z" }, "links": { "self": "http://example.com" } } ``` -------------------------------- ### Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/6439ea7066855-dynamic-form-v1 This section describes how to correctly install the status embed, which displays incidents or maintenance notices from your status page. No code is provided, but it indicates a frontend integration. ```text This will be shown if an incident or maintenance is posted on your status page. View latest updates ``` -------------------------------- ### Verify Stoplight Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/846ae49fdbe84-links This section confirms the correct installation of the Stoplight status embed. It indicates that the embed will display active incidents or maintenance notices from the associated status page. ```text Status embed installed correctly This will be shown if an incident or maintenance is posted on your status page. View latest updates ``` -------------------------------- ### GET /images Source: https://annyco.stoplight.io/docs/bookings-api/debeac6d10469-order Retrieves information about images, including their URLs and paths for different sizes. ```APIDOC ## GET /images ### Description Retrieves information about images, including their URLs and paths for different sizes. ### Method GET ### Endpoint /images ### Parameters #### Query Parameters - **type** (string) - Optional - Filters images by type. - **id** (string) - Optional - Filters images by ID. ### Request Example ```json { "example": "GET /images?type=images&id=8" } ``` ### Response #### Success Response (200) - **data** (array) - An array of image objects. - **type** (string) - The type of the image (e.g., "images"). - **id** (string) - The unique identifier for the image. - **attributes** (object) - Contains the main properties of the image. - **url** (string) - The full URL of the image. - **copyright** (string|null) - Copyright information for the image. - **preview_image_base64** (string|null) - Base64 encoded preview image data. - **small_path** (string) - Path to the small version of the image. - **medium_path** (string) - Path to the medium version of the image. - **large_path** (string) - Path to the large version of the image. - **created_at** (string) - The timestamp when the image was created. #### Response Example ```json { "data": [ { "type": "images", "id": "8", "attributes": { "url": "http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg", "copyright": null, "preview_image_base64": null, "small_path": "http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg", "medium_path": "http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg", "large_path": "http://bookingbuddy.test/storage/images/default/original/tAfMygvbwyimOMp2NTNcUabuE.jpg", "created_at": "2020-05-24T12:49:13+00:00" } } ] } ``` ``` -------------------------------- ### Display Panel API - Get Display Source: https://annyco.stoplight.io/docs/bookings-api/d27dd7bc74078-resource Retrieves information about a specific display panel. ```APIDOC ## GET /display-panel/v1/display/{id} ### Description Retrieves detailed information about a specific display panel using its unique identifier. ### Method GET ### Endpoint /display-panel/v1/display/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the display panel. ### Response #### Success Response (200) - **data** (object) - Contains the display panel details. - **id** (string) - The unique identifier of the display panel. - **name** (string) - The name of the display panel. - **type** (string) - The type of the display panel. - **status** (string) - The current status of the display panel. #### Response Example ```json { "data": { "id": "disp_12345", "name": "Main Lobby Display", "type": "digital_signage", "status": "active" } } ``` ``` -------------------------------- ### GET /websites/annyco_stoplight_io/availability Source: https://annyco.stoplight.io/docs/bookings-api/dcb993605270b-availability-result Retrieves availability information for services associated with the website. ```APIDOC ## GET /websites/annyco_stopstoplight_io/availability ### Description Retrieves availability information for services associated with the website. This endpoint provides details about service availability within specified date ranges. ### Method GET ### Endpoint /websites/annyco_stoplight_io/availability ### Parameters #### Query Parameters - **start_date_time** (string) - Optional - The start of the time range for availability check (ISO 8601 format). - **end_date_time** (string) - Optional - The end of the time range for availability check (ISO 8601 format). - **exact_match** (boolean) - Optional - If true, requires an exact match for the availability. - **match_in_range** (boolean) - Optional - If true, checks for availability within the specified range. - **resource_id** (integer) - Optional - Filters availability by a specific resource ID. - **display_quota** (integer) - Optional - Filters by display quota. - **display_booking_count** (integer) - Optional - Filters by display booking count. ### Request Example ``` GET /websites/annyco_stoplight_io/availability?start_date_time=2023-05-03T22:00:00Z&end_date_time=2023-05-04T22:00:00Z&exact_match=false ``` ### Response #### Success Response (200) - **exact_match** (boolean) - Indicates if an exact match was found. - **match_in_range** (boolean) - Indicates if a match was found within the range. - **resource_id** (integer) - The ID of the resource. - **display_quota** (integer) - The display quota for the resource. - **display_booking_count** (integer) - The display booking count for the resource. - **start_date_time** (string) - The start of the queried time range. - **end_date_time** (string) - The end of the queried time range. - **start_date** (string) - The start date for service availability. - **end_date** (string) - The end date for service availability. - **resource_name** (null) - Name of the resource (currently null). - **service_availability** (array[object]) - A list of service availability objects. - **start_date** (string) - Start date of the availability interval. - **end_date** (string) - End date of the availability interval. - **available_intervals** (array[object]) - List of specific available time slots. - **start_date** (string) - Start date of the available interval. - **end_date** (string) - End date of the available interval. - **unit** (string) - The unit of time for the interval (e.g., 'week'). - **available** (boolean) - Whether the service is available. - **number_available** (integer) - The number of available slots. - **remaining_number_available** (integer) - The number of remaining available slots. - **quota** (integer) - The quota for the service. - **unavailability_type** (string) - Type of unavailability, if any. - **resource_ids** (array[integer]) - List of resource IDs associated with this availability. - **messages** (array) - Any associated messages. - **exact_match** (boolean) - Indicates if an exact match was found for this service. - **match_in_range** (boolean) - Indicates if a match was found within the range for this service. - **service_id** (string) - The ID of the service. - **service_name** (string) - The name of the service. - **duration** (integer) - The duration of the service offering. - **display_quota** (null) - Display quota for the service (currently null). - **display_booking_count** (integer) - Display booking count for the service. - **unavailability_type** (null) - Type of unavailability for the service (currently null). - **unavailability_message** (null) - Message regarding unavailability (currently null). #### Response Example ```json { "exact_match": false, "match_in_range": true, "resource_id": 3051, "display_quota": 1, "display_booking_count": 0, "service_availability_results": [ { "start_date": "2023-05-04T00:00:00+02:00", "end_date": "2023-05-05T00:00:00+02:00", "available_intervals": [ { "start_date": "2023-05-01T09:00:00+02:00", "end_date": "2023-05-07T18:00:00+02:00", "unit": "week", "available": true, "number_available": 1, "remaining_number_available": 1, "quota": 1, "unavailability_type": "none", "resource_ids": [ 3051 ], "messages": [] } ], "exact_match": false, "match_in_range": true, "service_id": "1018", "service_name": "Premium Week Pass", "duration": 1, "display_quota": null, "display_booking_count": 0, "unavailability_type": null, "unavailability_message": null } ], "start_date_time": "2023-05-03T22:00:00Z", "end_date_time": "2023-05-04T22:00:00Z", "start_date": "2023-05-04T00:00:00+02:00", "end_date": "2023-05-05T00:00:00+02:00", "resource_name": null, "service_availability": [ { "start_date": "2023-05-04T00:00:00+02:00", "end_date": "2023-05-05T00:00:00+02:00", "available_intervals": [ { "start_date": "2023-05-01T09:00:00+02:00", "end_date": "2023-05-07T18:00:00+02:00", "unit": "week", "available": true, "number_available": 1, "remaining_number_available": 1, "quota": 1, "unavailability_type": "none", "resource_ids": [ 3051 ], "messages": [] } ], "exact_match": false, "match_in_range": true, "service_id": "1018", "service_name": "Premium Week Pass", "duration": 1, "display_quota": null, "display_booking_count": 0, "unavailability_type": null, "unavailability_message": null } ] } ``` ``` -------------------------------- ### Validated Intervals v1 Example Source: https://annyco.stoplight.io/docs/bookings-api/c09fddaed9e03-validated-intervals-v1 An example JSON object demonstrating the structure of validated intervals data. This includes details about the start and end times, availability, booking quotas, and resource IDs for a given interval. ```json { "start_date": "2023-05-03T10:00:00+02:00", "end_date": "2023-05-03T11:00:00+02:00", "unit": "minute", "available": true, "number_available": 1, "remaining_number_available": 1, "quota": 1, "unavailability_type": "none", "resource_ids": [ 3048 ], "messages": [], "date_time": "2023-05-03T10:00:00+02:00", "local_date_time": "2023-05-03T10:00:00+02:00", "next_end_date": "2023-05-03T11:00:00+02:00" } ``` -------------------------------- ### Resource Map Preview Configuration Example Source: https://annyco.stoplight.io/docs/bookings-api/6138f1bc20402-resource-map-previews-v1 This JSON object defines the configuration for a resource map preview. It includes details such as the map's name, default layer, bounding box, initial camera position (latitude, longitude, zoom, pitch, bearing), and URLs for GeoJSON data. ```json { "id": "48fb1b09-d2d5-404c-b055-563c5d73705f", "name": "Space", "defaultLayer": "o1o0Ketfv9I9qJ3ME0tN_", "boundingBox": [ 6.9515743, 50.935734, 6.9520286, 50.935994 ], "latitude": 50.93588, "longitude": 6.951796, "zoom": 19, "pitch": 0, "bearing": 0 } ``` -------------------------------- ### GET /resources Source: https://annyco.stoplight.io/docs/bookings-api/debeac6d10469-order Retrieves a list of available resources, such as meeting rooms. Each resource includes details like its slug, name, and booking configurations. ```APIDOC ## GET /resources ### Description Retrieves a list of available resources, such as meeting rooms. Each resource includes details like its slug, name, and booking configurations. ### Method GET ### Endpoint /resources ### Parameters #### Query Parameters - **type** (string) - Optional - Filters resources by type. - **id** (string) - Optional - Filters resources by ID. ### Request Example ```json { "example": "GET /resources?type=resources&id=24" } ``` ### Response #### Success Response (200) - **data** (array) - An array of resource objects. - **type** (string) - The type of the resource (e.g., "resources"). - **id** (string) - The unique identifier for the resource. - **attributes** (object) - Contains the main properties of the resource. - **slug** (string) - A URL-friendly identifier for the resource. - **name** (string) - The display name of the resource. - **cancelable** (boolean) - Indicates if bookings for this resource can be canceled. - **auto_accept_bookings** (boolean) - Indicates if bookings are automatically accepted. - **relationships** (object) - Contains references to related resources. - **cover_image** (object) - Reference to the cover image of the resource. - **organization** (object) - Reference to the organization that owns the resource. #### Response Example ```json { "data": [ { "type": "resources", "id": "24", "attributes": { "slug": "blick-and-sons-meeting-room-10", "name": "Meeting room 10", "cancelable": true, "auto_accept_bookings": false }, "relationships": { "cover_image": { "data": { "type": "images", "id": "17" } }, "organization": { "data": { "type": "organizations", "id": "5" } } } } ] } ``` ``` -------------------------------- ### Get Legal Document Example Source: https://annyco.stoplight.io/docs/bookings-api/c165397aaf5f5-legal-document This snippet demonstrates how to retrieve a legal document using the Anny API. It shows a sample API request and response structure, including document details and metadata. ```json { "document_type": "custom", "request_signature": true } ``` -------------------------------- ### Unavailability Types Enum Definition Source: https://annyco.stoplight.io/docs/bookings-api/co5dpvt2f27w7-unavailability-types-v1 Defines the 'unavailability-types.v1' enum, which specifies allowed string values for different types of unavailability. This enum is used to categorize reasons for service disruptions. ```plaintext under_min_duration booked_out blocked intermediate_booking off_schedule end_before_start before_lead_time under_min_duration over_max_duration none order_quantity_exceeded after_advance_booking_period ``` -------------------------------- ### Authorization Code Flow with PKCE Source: https://annyco.stoplight.io/docs/bookings-api/axng3n4n13kmf-authentication Details on generating PKCE code verifier and challenge for secure authorization. ```APIDOC ## Authorization Code Flow with PKCE ### Step 1: Application Registration You have to register a new client. Currently the only way doing is by writing us an email. Please include your use case, your customers and how you wanna use our api. ### Step 2: Generate PKCE Code Verifier and Code Challenge #### Description Generate a random code verifier and calculate its SHA-256 hash to obtain the code challenge. This is crucial for the PKCE flow. #### Request Example (JavaScript - Node.js) ```javascript export function base64_encode(value) { // Check if btoa exists if (typeof btoa !== 'undefined') { return btoa(value); } // Check if we have a buffer -> Node if (typeof Buffer !== 'undefined') { return Buffer.from(value, 'binary').toString('base64'); } throw new Error('Could not base64 encode value.'); } export async function generateCodeChallenge(codeVerifier) { let digest = require('crypto') .createHash('sha256') .update(codeVerifier) .digest(); return base64_encode(String.fromCharCode(...new Uint8Array(digest))) .replace(/=/g, '') .replace(/\+/g, '-') .replace(/\//g, '_'); } // Example usage: const codeVerifier = 'randomly_generated_verifier'; const codeChallenge = await generateCodeChallenge(codeVerifier); console.log(codeChallenge); // This will be your code challenge ``` #### Request Example (JavaScript - Browser) ```javascript export function base64_encode(value) { // Check if btoa exists if (typeof btoa !== 'undefined') { return btoa(value); } // Check if we have a buffer -> Node if (typeof Buffer !== 'undefined') { return Buffer.from(value, 'binary').toString('base64'); } throw new Error('Could not base64 encode value.'); } export async function generateCodeChallenge(codeVerifier) { let digest = await crypto.subtle.digest( 'SHA-256', new TextEncoder().encode(codeVerifier) ); return base64_encode(String.fromCharCode(...new Uint8Array(digest))) .replace(/=/g, '') .replace(/\+/g, '-') .replace(/\//g, '_'); } // Example usage: const codeVerifier = 'randomly_generated_verifier'; const codeChallenge = await generateCodeChallenge(codeVerifier); console.log(codeChallenge); // This will be your code challenge ``` ``` -------------------------------- ### POST /displays Source: https://annyco.stoplight.io/docs/bookings-api/d56141a960b77-display Creates a new display resource. ```APIDOC ## POST /displays ### Description Creates a new display resource with the provided attributes. ### Method POST ### Endpoint /displays ### Parameters #### Request Body - **data** (object) - Required - The display resource object. - **type** (string) - Required - Must be 'displays'. - **attributes** (object) - Required - The attributes for the new display. - **mac_adress** (string) - Required - The MAC address of the display. - **name** (string) - Required - The name of the display. - **width** (integer) - Required - The width of the display in pixels. - **heigth** (integer) - Required - The height of the display in pixels. - **orientation** (string) - Optional - The orientation of the display ('landscape' or 'portrait'). Defaults to 'landscape'. - **locale** (string) - Optional - The locale setting for the display. - **battery_level** (number) - Optional - The initial battery level (0-100). - **temperature** (number) - Optional - The initial temperature reading. - **version** (string) - Optional - The firmware version of the display. - **config** (object | null) - Optional - Additional configuration settings. - **layout** (string) - Optional - The layout configuration, defaults to 'default'. - **anonymize** (boolean) - Optional - Whether to anonymize data displayed. ### Request Example ```json { "data": { "type": "displays", "attributes": { "mac_adress": "00:1A:2B:3C:4D:5E", "name": "Living Room Display", "width": 1920, "heigth": 1080, "orientation": "landscape", "locale": "en-US", "anonymize": false } } } ``` ### Response #### Success Response (201 Created) - **data** (object) - The newly created display object (structure same as GET /displays response). #### Response Example ```json { "data": { "id": "new-display-id", "type": "displays", "attributes": { "mac_adress": "00:1A:2B:3C:4D:5E", "name": "Living Room Display", "width": 1920, "heigth": 1080, "orientation": "landscape", "locale": "en-US", "battery_level": null, "temperature": null, "version": null, "config": { "layout": "default" }, "last_synced_at": null, "anonymize": false, "created_at": "2023-10-27T10:00:00Z" }, "meta": { "is_paired": false, "has_resource": false, "update_available": false }, "relationships": {}, "links": { "self": "/displays/new-display-id" } } } ``` ``` -------------------------------- ### Has-Many Relationship Data Structure Example Source: https://annyco.stoplight.io/docs/bookings-api/39ee1d4f4ee7c-has-many-relationship This JSON object demonstrates a 'has-many-relationship' data structure. It includes an array named 'data' which contains objects, each having an 'id' and 'type'. This is a common pattern for representing collections of related resources. ```json { "data": [ { "id": "string", "type": "string" } ] } ``` -------------------------------- ### Timeslot API Example (JSON) Source: https://annyco.stoplight.io/docs/bookings-api/5e78ae132ff47-timeslot This JSON object represents a timeslot resource within the Anny API. It includes details such as start and end dates, quota, timezone, and relationships to other resources like services. This structure is used for managing time-based allocations or events. ```json { "id": "string", "type": "timeslots", "attributes": { "start_date": "2019-08-24T14:15:22Z", "end_date": "2019-08-24T14:15:22Z", "quota": 0, "created_at": "2019-08-24T14:15:22Z", "timezone": "string" }, "relationships": { "resource": { "data": {} }, "service": { "data": {} } }, "links": { "self": "http://example.com" } } ``` -------------------------------- ### Activity v1 Source: https://annyco.stoplight.io/docs/bookings-api/75d30a964adbc-customer-api Endpoints for managing activities. ```APIDOC ## Activity v1 - **GET /v1/activity**: Retrieve a list of activities. - **POST /v1/activity**: Create a new activity. - **GET /v1/activity/{id}**: Retrieve a specific activity by ID. - **PUT /v1/activity/{id}**: Update a specific activity. - **DELETE /v1/activity/{id}**: Delete a specific activity. ``` -------------------------------- ### Initiate OAuth2 Authorization Request with PKCE Source: https://annyco.stoplight.io/docs/bookings-api/axng3n4n13kmf-authentication Redirect the user to the authorization endpoint with necessary parameters including PKCE code challenge and method. This initiates the OAuth2 flow. ```javascript const authEndpoint = 'https://auth.anny.co/oauth/authorize'; const clientId = 'your_client_id'; const redirectUri = 'https://yourapp.com/callback'; const scope = ''; const state = 'random_state_value'; const responseType = 'code'; // Assuming codeChallenge and codeVerifier are defined elsewhere // const codeChallenge = 'generated_code_challenge'; // const codeVerifier = 'generated_code_verifier'; // Redirect the user to the authorization endpoint with PKCE parameters window.location.href = `${authEndpoint}?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${scope}&state=${state}&response_type=${responseType}&code_challenge=${codeChallenge}&code_challenge_method=S256`; ``` -------------------------------- ### GET /bookings Source: https://annyco.stoplight.io/docs/bookings-api/debeac6d10469-order Retrieves a list of bookings. Each booking includes details such as its number, status, dates, and associated resource. ```APIDOC ## GET /bookings ### Description Retrieves a list of bookings. Each booking includes details such as its number, status, dates, and associated resource. ### Method GET ### Endpoint /bookings ### Parameters #### Query Parameters - **type** (string) - Optional - Filters bookings by type. - **id** (string) - Optional - Filters bookings by ID. - **resource_id** (string) - Optional - Filters bookings by the associated resource ID. ### Request Example ```json { "example": "GET /bookings?type=bookings&resource_id=24" } ``` ### Response #### Success Response (200) - **data** (array) - An array of booking objects. - **type** (string) - The type of the booking (e.g., "bookings"). - **id** (string) - The unique identifier for the booking. - **attributes** (object) - Contains the main properties of the booking. - **number** (string) - The booking reference number. - **status** (string) - The current status of the booking (e.g., "reserved"). - **start_date** (string) - The start date and time of the booking. - **end_date** (string) - The end date and time of the booking. - **description** (string|null) - Optional description for the booking. - **charged_duration** (integer) - The duration of the booking in minutes for which charges were applied. - **currency** (string) - The currency used for charges. - **total** (number) - The total amount charged for the booking. - **subtotal** (number) - The subtotal amount before any discounts or taxes. - **charged_total** (number) - The final amount charged. - **created_at** (string) - The timestamp when the booking was created. - **canceled_at** (string|null) - The timestamp when the booking was canceled, if applicable. - **relationships** (object) - Contains references to related resources. - **resource** (object) - Reference to the resource that was booked. - **meta** (object) - Metadata related to the booking, such as calendar links. - **ics_link** (string) - Link to add the booking to an ICS calendar. - **google_link** (string) - Link to add the booking to Google Calendar. - **outlook_link** (string) - Link to add the booking to Outlook Calendar. - **yahoo_link** (string) - Link to add the booking to Yahoo Calendar. #### Response Example ```json { "data": [ { "type": "bookings", "id": "83", "attributes": { "number": "BB589425", "status": "reserved", "start_date": "2020-05-27T08:00:00+00:00", "end_date": "2020-05-27T09:45:00+00:00", "blocker_start_date": "2020-05-27T08:00:00+00:00", "blocker_end_date": "2020-05-27T09:45:00+00:00", "description": null, "charged_duration": 105, "currency": "EUR", "total": 105, "subtotal": 105, "charged_total": 105, "created_at": "2020-05-24T16:52:38+00:00", "canceled_at": null }, "relationships": { "resource": { "data": { "type": "resources", "id": "24" } } }, "meta": { "ics_link": "http://bookingbuddy.test/add-to-calendar/booking/83?type=ics", "google_link": "http://bookingbuddy.test/add-to-calendar/booking/83?type=google", "outlook_link": "http://bookingbuddy.test/add-to-calendar/booking/83?type=webOutlook", "yahoo_link": "http://bookingbuddy.test/add-to-calendar/booking/83?type=yahoo" } } ] } ``` ``` -------------------------------- ### Payment Object Structure and Example Source: https://annyco.stoplight.io/docs/bookings-api/b5bf4db73f6ab-payments-v1 Defines the structure of a payment object, including amount, currency, status, and associated activities. An example JSON payload illustrates a successful payment. ```json { "amount": 48, "currency": "EUR", "country_code": "DE", "is_partial_payment": false, "last_error": null, "status": "succeeded", "succeeded_at": "2023-05-28T16:25:03.000000Z", "activity": [ { "date": "2023-05-28T16:25:00+00:00", "type": "status-update", "value": "intended" }, { "type": "status-update", "value": "succeeded", "date": "2023-05-28T16:25:03+00:00" } ], "provider_data": { "stripe_client_secret": "pi_3NCmOuGIQa5jiMAi1OhBlwSW_secret_ovCvnVnemzsCnbhsbnOWLoeMT", "stripe_payment_intent_id": "pi_3NCmOuGIQa5jiMAi1OhBlwSW", "stripe_charge_id": "ch_3NCmOuGIQa5jiMAi1Fbccvnv", "method_details": { "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": "pass", "cvc_check": "pass" }, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "IxpYX58zolwmffJQ", "funding": "credit", "installments": null, "last4": "4242", "mandate": null, "network": "visa", "network_token": { "used": false }, "three_d_secure": null, "wallet": null }, "type": "card" } }, "secret": "sSus96SQ5o5Gclsl", "created_at": "2023-05-28T16:25:00+00:00", "success_url": "https://staging.anny.co/b/en/checkout/success?oids[]=64694&oats[]=Tub85ZQWDG0nZL6lOgY9wtFQTG1QXl", "cancel_url": "https://staging.anny.co/b/en/checkout?from=organization&step=calendar&s=cse1a4oxlyx7vb9p2xijmplls8litc&error=The+payment+was+cancelled.+Please+select+different+payment+method+or+try+again+to+continue." } ``` -------------------------------- ### Ability v1 Source: https://annyco.stoplight.io/docs/bookings-api/75d30a964adbc-customer-api Endpoints for managing abilities. ```APIDOC ## Ability v1 - **GET /v1/ability**: Retrieve a list of abilities. - **POST /v1/ability**: Create a new ability. - **GET /v1/ability/{id}**: Retrieve a specific ability by ID. - **PUT /v1/ability/{id}**: Update a specific ability. - **DELETE /v1/ability/{id}**: Delete a specific ability. ``` -------------------------------- ### Display v1 Source: https://annyco.stoplight.io/docs/bookings-api/75d30a964adbc-customer-api Endpoints for managing displays. ```APIDOC ## Display v1 - **GET /v1/display**: Retrieve a list of displays. - **POST /v1/display**: Create a new display. - **GET /v1/display/{id}**: Retrieve a specific display by ID. - **PUT /v1/display/{id}**: Update a specific display. - **DELETE /v1/display/{id}**: Delete a specific display. ``` -------------------------------- ### Status Embed Installation Check Source: https://annyco.stoplight.io/docs/bookings-api/fd30d64e15fa7-plans-v1 Confirms that the status embed has been correctly installed on the website. This embed is designed to display the latest updates regarding incidents or maintenance posted on the status page. ```html
Status embed installed correctly
This will be shown if an incident or maintenance is posted on your status page.
View latest updates
``` -------------------------------- ### Stoplight Status Embed Installation Source: https://annyco.stoplight.io/docs/bookings-api/44a898d749110-interval-availability This section confirms the correct installation of the Stoplight status embed. It's designed to display real-time incidents or maintenance information from your status page. ```html ```