### Curl Example for Get Payment Configuration (Desk API) Source: https://developer.pike13.com/docs/api/v2 Example using curl to request the payment configuration from the Desk API. Ensure you replace 'mybiz.pike13.com' with your actual business domain. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/payments/configuration ``` -------------------------------- ### Curl Request to List Services Source: https://developer.pike13.com/docs/api/v2 This command-line example shows how to make a GET request to the /api/v2/desk/services endpoint using curl. Ensure you replace 'XXXXXXXXXXXXXXX' with your actual API token. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/services \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Get Desk People API Request Example Source: https://developer.pike13.com/docs/api/v2 This example shows how to make a curl request to the GET /api/v2/desk/people endpoint to retrieve a paginated collection of client-scoped people. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/people \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Get Visit Details Request Example Source: https://developer.pike13.com/docs/api/v2 This cURL command demonstrates how to request the details of a specific visit using its ID. Ensure you include your authorization token. ```bash $ curl https://mybiz.pike13.com/api/v2/front/visits/1 \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Multiple Waitlist Entries Response Example Source: https://developer.pike13.com/docs/api/v2 Example JSON response listing multiple waitlist entries for a person, including their states and associated event details. Includes total count. ```json { "waitlist_entries": [ { "id": 1, "person_id": 1, "event_occurrence_id": 1, "state": "waiting", "event_occurrence": { "id": 1, "name": "Class P", "state": "active", "start_at": "2015-06-10T07:00:00Z", "end_at": "2015-06-10T07:30:00Z", "service_id": 1, "event_id": 1, "location_id": 1 }, "person": { "id": 1, "name": "John Client", "email": "johnclient@example.com" } }, { "id": 2, "person_id": 1, "event_occurrence_id": 2, "state": "enrolled", "event_occurrence": { "id": 2, "name": "Class P", "state": "active", "start_at": "2015-06-13T07:00:00Z", "end_at": "2015-06-13T07:30:00Z", "service_id": 1, "event_id": 1, "location_id": 1 }, "person": { "id": 1, "name": "John Client", "email": "johnclient@example.com" } } ], "total_count": 2 } ``` -------------------------------- ### Create Invoice using POST Source: https://developer.pike13.com/docs/api/v2 Use this endpoint to create an invoice by providing a list of plan products. Requires an Authorization header. ```bash $ curl -X POST https://mybiz.pike13.com/api/v2/desk/invoices \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" \ -d '{ "invoice":{ "plan_products": [ {"id": 5, "recipient_ids": [ 1 ], "start_date": "2012-09-24"} ] } }' ``` -------------------------------- ### Get Desk People API Response Example Source: https://developer.pike13.com/docs/api/v2 This is an example JSON response from the GET /api/v2/desk/people endpoint, showing a list of people with their details and a total count. ```json { "people": [ { "id": 3, "name": "John Client", "pronoun": null, "first_name": "John", "middle_name": null, "last_name": "Client", "is_schedulable": true, "membership": null, "email": "johnclient@example.com", "secondary_info_field": "No Membership", "hidden_at": null, "business_id": 1, "updated_at": "2014-09-16T14:25:10-07:00", "birthdate": null, "location_id": null, "custom_fields": [] }, { "id": 48, "name": "Jane Client", "pronoun": null, "first_name": "Jane", "middle_name": null, "last_name": "Client", "is_schedulable": true, "membership": null, "email": "janeclient@example.com", "secondary_info_field": "No Membership", "hidden_at": null, "business_id": 1, "updated_at": "2014-09-17T14:19:12-07:00", "birthdate": null, "location_id": 1, "profile_photo": { "x50": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x50.jpg", "x100": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x100.jpg", "x200": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x200.jpg", "x400": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x400.jpg" }, "custom_fields": [ { "id": 3, "custom_field_id": 5, "name": "Favorite Color", "value": "" } ] } ], "total_count": 2 } ``` -------------------------------- ### Plan Products Response Example Source: https://developer.pike13.com/docs/api/v2 This JSON object represents the response for retrieving plan product details. It includes information about product pricing, services, billing, and group rates. ```json { "plan_products": [ { "id": 1, "count": 10, "limit_period": "monthly", "commitment_length": 12, "commitment_unit": "month", "location_id": null, "terms": "Terms and Conditions", "consider_member": true, "send_expiration_notifications": true, "terms_acceptance_required": true, "terms_acceptance_at_checkout": false, "terms_acceptance_type": "document", "created_at": "2017-07-01T12:00:00Z", "updated_at": "2017-07-02T11:00:00Z", "product": { "id": 2, "name": "Ten Visit Punchcard", "description": "A punchcard with ten visits.", "description_long": "A longer description.", "price_cents": 10000, "visibility": "everyone", "suspended": null, "created_at": "2017-07-01T12:00:00Z", "updated_at": "2017-07-02T11:00:00Z" }, "services": [ { "id": 1, "name": "Class P" }, { "id": 2, "name": "Class Q" }, { "id": 5, "name": "Class T" } ], "billing": { "interval_unit": "year", "interval_count": 1, "days": [], "days_of_month": [ 3 ], "months_of_year": [ "January" ] }, "stop_renewing_after_commitment": false, "hold_fee_cents": null, "holds_allowed": true, "hold_limit_unit": null, "hold_limit_length": null, "signup_fee_cents": 1000, "signup_fee_tax_exempt": true, "cancellation_fee_tax_exempt": true, "group_rack_service_id": null, "client_cancel_allowed": true, "rollover_count": null, "group_rates": [ { "amount_cents": null, "additive_percent": 80.0, "additive_amount_cents": null, "head_count_start": 2, "head_count_end": 8, "type": "UnsharedVisitGroupRate" } ] }, { "id": 2, "count": null, "commitment_length": 1, "commitment_unit": "month", "location_id": null, "terms": "Terms and Conditions", "consider_member": true, "send_expiration_notifications": true, "terms_acceptance_required": true, "terms_acceptance_at_checkout": false, "terms_acceptance_type": "document", "created_at": "2017-07-01T12:00:00Z", "updated_at": "2017-07-02T11:00:00Z", "product": { "id": 2, "name": "1 Month Prepaid Unlimited Visits", "description": "Unlimited visits for one month.", "description_long": "A longer description.", "price_cents": 20000, "visibility": "everyone", "suspended": null, "created_at": "2017-07-01T12:00:00Z", "updated_at": "2017-07-02T11:00:00Z" }, "services": [ { "id": 1, "name": "Class P" }, { "id": 2, "name": "Class Q" }, { "id": 5, "name": "Class T" } ], "billing": { "interval_unit": "month", "interval_count": 1, "days": [], "days_of_month": [ 3 ], "months_of_year": [] }, "stop_renewing_after_commitment": false, "hold_fee_cents": null, "holds_allowed": true, "hold_limit_unit": null, "hold_limit_length": null, "signup_fee_cents": 1000, "signup_fee_tax_exempt": true, "cancellation_fee_tax_exempt": true, "group_rack_service_id": null, "client_cancel_allowed": true, "rollover_count": null, "limit_period": "monthly", "group_rates": [] } ] } ``` -------------------------------- ### Get Single Desk Person API Request Example Source: https://developer.pike13.com/docs/api/v2 This example demonstrates a curl request to retrieve a specific person's details using their ID from the GET /api/v2/desk/people/:id endpoint. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/people/48 \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Get Specific Front-End Plan Product Details Source: https://developer.pike13.com/docs/api/v2 Fetches the detailed information for a single plan product identified by its ID. Requires the business client ID. ```bash $ curl https://mybiz.pike13.com/api/v2/front/plan_products/1?client_id=XXXXXXXXXXXXXX \ ``` -------------------------------- ### Create Note Response (JSON) Source: https://developer.pike13.com/docs/api/v2 Example response after successfully creating a note. Includes the newly created note's details. ```json { "notes": [ { "id": 1, "note": "This was a triumph", "subject": "Session Note", "public": true, "pinned": false, "person_id": 7, "event_occurrence_id": 7, "created_at": "2014-12-10T01:13:45Z", "created_by_id": 2 } ] } ``` -------------------------------- ### Get Form of Payment Details (ACH) Source: https://developer.pike13.com/docs/api/v2 Retrieves the details of a specific Form of Payment for a person. This example fetches an ACH payment method. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/people/1/form_of_payments/2?client_id=XXXXXXXXXXXXXX ``` -------------------------------- ### Get Specific Form of Payment Request (ACH) Source: https://developer.pike13.com/docs/api/v2 Example cURL request to retrieve a specific ACH form of payment for a given person. ```bash $ curl https://mybiz.pike13.com/api/v2/front/people/1/form_of_payments/2?client_id=XXXXXXXXXXXXXX ``` -------------------------------- ### Get Visit Details Response Example Source: https://developer.pike13.com/docs/api/v2 This JSON object shows the details of a specific visit, including its status, associated event occurrence, and person. ```json { "visits": [ { "id": 1, "person_id": 1, "event_occurrence_id": 1, "status": "enrolled", "state": "registered", "registered_at": "2015-06-09T19:23:01Z", "completed_at": null, "noshow_at": null, "cancelled_at": null, "created_at": "2015-06-09T19:23:01Z", "paid": false, "paid_for_by": null, "event_occurrence": { "id": 1, "name": "Class P", "state": "active", "start_at": "2015-06-10T07:00:00Z", "end_at": "2015-06-10T07:30:00Z", "service_id": 1, "event_id": 1, "location_id": 1 }, "person": { "id": 1, "name": "Jane Client", "email": "janeclient@example.com" } } ] } ``` -------------------------------- ### Create Course Lease Request Source: https://developer.pike13.com/docs/api/v2 Use this cURL command to create a lease for a course. Include event_id, start_at, and person.id. The start_at is optional and defaults to today if not provided. ```curl $ curl -X POST https://mybiz.pike13.com/api/v2/front/bookings/12345678-9012-3456-7890-123456789012/leases \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" \ -H "Content-Type: application/json" \ -d '{ "lease": { "event_id": 1, "start_at": "2017-10-19T17:00:00Z", "person": { "id": 1 } } }' ``` ```json { "leases": [ { "id": 1, "event_id": 1, "start_at": "2017-10-19T17:00:00Z", "event_person_id": 1, "person": { "id": 1, "email": "client@example.com", "first_name": "Best", "last_name": "Client", "address": null, "business_id": 1 } } ] } ``` -------------------------------- ### Complete Booking Example Source: https://developer.pike13.com/docs/api/v2 This curl command demonstrates how to complete a booking. Ensure you include the Authorization header and set the Content-Type to application/json. The request body should contain `{"booking": {"complete_booking": true}}`. ```bash $ curl -X PUT https://mybiz.pike13.com/api/v2/desk/bookings/12345678-9012-3456-7890-123456789012 \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" \ -H "Content-Type: application/json" \ -d '{ "booking": { "complete_booking": true } }' ``` -------------------------------- ### List All Desk-End Plan Products Source: https://developer.pike13.com/docs/api/v2 Retrieves a paginated list of all plan products available for the business. Supports filtering by location and service IDs. Requires an Authorization header. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/plan_products \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Get Form of Payment Details (Credit Card) Source: https://developer.pike13.com/docs/api/v2 Retrieves the details of a specific Form of Payment for a person. This example fetches a credit card payment method. ```bash $ curl https://mybiz.pike13.com/api/v2/desk/people/1/form_of_payments/1 \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` -------------------------------- ### Create a Pack Source: https://developer.pike13.com/docs/api/v2 Creates a pack. This POST request requires a pack product ID and specifies pack details like person IDs, start date, and count. ```bash $ curl -XPOST https://mybiz.pike13.com/api/v2/desk/pack_products/1/packs \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" \ -H "Content-Type: application/json" \ -d '{"pack": {"person_ids": [1]}}' ``` -------------------------------- ### Get Specific Form of Payment Request (Credit Card) Source: https://developer.pike13.com/docs/api/v2 Example cURL request to retrieve a specific credit card form of payment for the logged-in person. ```bash $ curl https://mybiz.pike13.com/api/v2/front/people/me/form_of_payments/1?client_id=XXXXXXXXXXXXXX ``` -------------------------------- ### GET /api/v2/front/people/:person_id/visits Source: https://developer.pike13.com/docs/api/v2 Lists visits for a specific person, sorted by event occurrence start time. Supports filtering by date range and event occurrence. ```APIDOC ## GET /api/v2/front/people/:person_id/visits ### Description Lists visits for a person. They are sorted by event_occurrence.start_at in ascending order. Paginate using the page parameter. The parameters to and from can be used to specify an event occurrence time range. ### Method GET ### Endpoint /api/v2/front/people/:person_id/visits ### Parameters #### Path Parameters - **person_id** (integer) - Required - The ID of the person whose visits to list. #### Query Parameters - **from** (timestamp) - Optional, but must be included if specifying to - Start of time range filter. - **to** (timestamp) - Optional, but must be included if specifying from - End of time range filter. - **event_occurrence_id** (integer) - Optional - Scope to an event occurrence. ### Request Example ```bash curl https://mybiz.pike13.com/api/v2/front/people/1/visits \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" ``` ### Response #### Success Response (200) - **visits** (array) - Contains visit objects. - **id** (integer) - The ID of the visit. - **status** (string) - Status of the visit. - **registered_at** (timestamp) - When registration was completed. - **completed_at** (timestamp) - When the visit was marked as complete. - **noshow_at** (timestamp) - When the visit was marked as a no-show. - **cancelled_at** (timestamp) - When the visit was marked as a late cancel. - **created_at** (timestamp) - When the visit was created. - **paid** (boolean) - True if this visit has been paid for. - **paid_for_by** (string) - Description of the plan used to pay for the visit. - **event_occurrence** (object) - Details of the event occurrence. - **total_count** (integer) - The total number of visits matching the query. #### Response Example ```json { "visits": [ { "id": 1, "status": "complete", "registered_at": "2015-01-20T18:42:23Z", "completed_at": "2015-01-20T18:42:35Z", "noshow_at": null, "cancelled_at": null, "created_at": "2015-01-20T18:42:22Z", "paid": true, "paid_for_by": "10 Pack", "event_occurrence": { "id": 3, "name": "Group Workout", "state": "active", "start_at": "2015-01-28T07:00:00Z", "end_at": "2015-01-28T08:00:00Z", "service_id": 2, "event_id": 2, "location_id": 1 } }, { "id": 2, "status": "enrolled", "registered_at": "2015-01-20T18:42:32Z", "completed_at": null, "noshow_at": null, "cancelled_at": null, "created_at": "2015-01-20T18:42:32Z", "paid": false, "event_occurrence": { "id": 4, "name": "Group Workout", "state": "active", "start_at": "2015-01-29T07:00:00Z", "end_at": "2015-01-29T08:00:00Z", "service_id": 2, "event_id": 2, "location_id": 1 } } ], "total_count": 2 } ``` ``` -------------------------------- ### POST /api/v2/desk/pack_products Source: https://developer.pike13.com/docs/api/v2 Creates a new pack product. ```APIDOC ## POST /api/v2/desk/pack_products ### Description Creates a pack product. ### Method POST ### Endpoint /api/v2/desk/pack_products ### Parameters #### Request Body - **pack_product** (object) - Required - The details of the pack product to create. - **product** (object) - Required - Details of the product. - **name** (string) - Required - The name of the product. - **description** (string) - Required - A brief description of the product. - **description_long** (string) - Optional - A longer description of the product. - **price_cents** (integer) - Required - The price of the product in cents. - **visibility** (string) - Required - The visibility setting of the product (e.g., "staff", "everyone"). - **count** (integer) - Required - The number of visits included in the pack. - **location_id** (integer) - Optional - The ID of the location. - **commitment_length** (integer) - Optional - The commitment period length. - **commitment_unit** (string) - Optional - The unit for the commitment period (e.g., "month", "week"). - **terms** (string) - Optional - The terms and conditions for the pack product. - **send_expiration_notifications** (boolean) - Optional - Whether to send expiration notifications. - **service_ids** (array) - Required - An array of service IDs associated with the pack product. ### Request Example ```bash curl -XPOST https://mybiz.pike13.com/api/v2/desk/pack_products \ -H "Authorization: Bearer XXXXXXXXXXXXXXX" \ -H "Content-Type: application/json" \ -d '{"pack_product":{"product":{"name": "Ten Visit Punchcard","description": "A punchcard with ten visits.","description_long": "A longer description.","price_cents": "10000","visibility": "staff"},"count":10,"location_id":1,"commitment_length":12,"commitment_unit":"month","terms":"Terms and Conditions","send_expiration_notifications":true, "service_ids": [ 1, 2, 5, 6 ]}}' ``` ### Response #### Success Response (200) - **pack_products** (array) - An array containing the newly created pack product details. - **id** (integer) - The ID of the pack product. - **count** (integer) - The number of visits included in the pack. - **commitment_length** (integer) - The commitment period length. - **commitment_unit** (string) - The unit for the commitment period (e.g., "month", "week"). - **location_id** (integer or null) - The ID of the location, or null. - **terms** (string) - The terms and conditions for the pack product. - **send_expiration_notifications** (boolean) - Whether to send expiration notifications. - **created_at** (string) - The timestamp when the pack product was created. - **updated_at** (string) - The timestamp when the pack product was last updated. - **product** (object) - Details about the associated product. - **id** (integer) - The ID of the product. - **name** (string) - The name of the product. - **description** (string) - A brief description of the product. - **description_long** (string) - A longer description of the product. - **price_cents** (integer) - The price of the product in cents. - **visibility** (string) - The visibility setting of the product. - **suspended** (null) - Indicates if the product is suspended. - **created_at** (string) - The timestamp when the product was created. - **updated_at** (string) - The timestamp when the product was last updated. - **services** (array) - An array of services associated with the pack product. - **id** (integer) - The ID of the service. - **name** (string) - The name of the service. #### Response Example ```json { "pack_products": [ { "id": 1, "count": 10, "commitment_length": 12, "commitment_unit": "month", "location_id": null, "terms": "Terms and Conditions", "send_expiration_notifications": true, "created_at": "2015-07-02T16:45:30Z", "updated_at": "2015-07-02T16:45:30Z", "product": { "id": 2, "name": "Ten Visit Punchcard", "description": "A punchcard with ten visits.", "description_long": "A longer description.", "price_cents": 10000, "visibility": "staff", "suspended": null, "created_at": "2015-07-02T16:45:30Z", "updated_at": "2015-07-02T16:45:30Z" }, "services": [ { "id": 1, "name": "Class P" }, { "id": 2, "name": "Class Q" }, { "id": 5, "name": "Class T" }, { "id": 6, "name": "Appointment A" } ] } ] } ``` ``` -------------------------------- ### List All Front-End Plan Products Source: https://developer.pike13.com/docs/api/v2 Retrieves a paginated list of plan products visible to the user for a specific business. Supports filtering by location and service IDs. ```bash $ curl https://mybiz.pike13.com/api/v2/front/plan_products?client_id=XXXXXXXXXXXXXX \ ``` -------------------------------- ### Person JSON Response Example Source: https://developer.pike13.com/docs/api/v2 This JSON object represents a person's data, including their personal details, custom fields, and dependents. It is typically returned by API GET requests for person resources. ```json { "people": [ { "id": 27, "pronoun": null, "first_name": "Jane", "middle_name": null, "last_name": "Client", "is_schedulable": true, "name": "Jane Client", "membership": "No Membership", "is_member": false, "joined_at": "2014-12-10T19:34:16Z", "phone": "206-555-1212", "email": "janeclient@example.com", "address": "123 Pike Street\nSuite 456\nSeattle, WA 98101, United States of America", "street_address": "123 Pike Street", "street_address2": "Suite 456", "city": "Seattle", "state_code": "WA", "postal_code": "98101", "secondary_info_field": "No Membership", "timezone": "America/Los_Angeles", "business_id": 1, "updated_at": "2014-12-10T19:34:16Z", "deleted_at": null, "hidden_at": null, "birthdate": null, "location_id": 1, "custom_fields": [ { "id": 9, "value": "blue", "name": "Shirt color" }, { "id": 10, "value": "L", "name": "Shirt size" } ], "dependents": [ { "id": 28, "pronoun": null, "first_name": "Child1", "middle_name": null, "last_name": "Client", "is_schedulable": true, "name": "Child1 Client", "membership": "No Membership", "is_member": false, "joined_at": "2014-12-10T19:34:16Z", "phone": null, "email": null, "secondary_info_field": "No Membership", "timezone": "America/Los_Angeles", "business_id": 1, "updated_at": "2014-12-10T19:34:16Z", "deleted_at": null, "hidden_at": null, "birthdate": "2008-01-21", "location_id": 1, "custom_fields": [] }, { "id": 29, "pronoun": null, "first_name": "Child2", "middle_name": null, "last_name": "Client", "is_schedulable": false, "name": "Child2 Client", "membership": "No Membership", "is_member": false, "joined_at": "2014-12-10T19:34:16Z", "phone": null, "email": null, "secondary_info_field": "No Membership", "timezone": "America/Los_Angeles", "business_id": 1, "updated_at": "2014-12-10T19:34:16Z", "deleted_at": null, "hidden_at": null, "birthdate": "2010-01-23", "location_id": 1, "custom_fields": [] } ], "providers": [], "location": { "id": 1, "name": "West Location", "slug": "west-location" } } ] } ``` -------------------------------- ### POST /api/v2/front/bookings/{id}/leases (Course) Source: https://developer.pike13.com/docs/api/v2 Enrolls a person into a course event, with an optional specified start date. ```APIDOC ## POST /api/v2/front/bookings/{id}/leases (Course) ### Description Enrolls a person into a course event, with an optional specified start date. ### Method POST ### Endpoint /api/v2/front/bookings/{id}/leases ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the booking. #### Request Body - **lease** (object) - Required - Contains details for the lease. - **event_id** (integer) - Required - The ID of the course event. - **start_at** (timestamp) - Optional - The date and time of the first event to attend. If empty, will default to today. - **person** (object) - Required - Information about the person attending. - **id** (integer) - Required - The ID of the existing person. ### Request Example ```json { "lease": { "event_id": 1, "start_at": "2017-10-19T17:00:00Z", "person": { "id": 1 } } } ``` ### Response #### Success Response (200) - **leases** (array) - Contains the created lease information. - **id** (integer) - The ID of the lease. - **event_id** (integer) - The ID of the event. - **start_at** (timestamp) - The start time of the lease. - **event_person_id** (integer) - The ID of the person associated with the event. - **person** (object) - Information about the person associated with the lease. - **id** (integer) - The ID of the person. - **email** (string) - The email of the person. - **first_name** (string) - The first name of the person. - **last_name** (string) - The last name of the person. - **address** (null) - The address of the person (currently null). - **business_id** (integer) - The ID of the business. #### Response Example ```json { "leases": [ { "id": 1, "event_id": 1, "start_at": "2017-10-19T17:00:00Z", "event_person_id": 1, "person": { "id": 1, "email": "client@example.com", "first_name": "Best", "last_name": "Client", "address": null, "business_id": 1 } } ] } ``` ``` -------------------------------- ### List All Front Plan Products Source: https://developer.pike13.com/docs/api/v2 Lists all plan products for the business that are visible to the user. Pagination is supported using the 'page' parameter. ```APIDOC ## GET /api/v2/front/plan_products ### Description Lists all plan products for the business that are visible to the user. Paginate using the page parameter. ### Parameters #### Query Parameters - **location_ids** (comma delimited string) - Optional - The location identifier(s) to filter on. - **service_ids** (comma delimited string) - Optional - The service identifier(s) to filter on. ### Request Example ```bash curl https://mybiz.pike13.com/api/v2/front/plan_products?client_id=XXXXXXXXXXXXXX ``` ### Response #### Success Response (200) - **plan_products** (array) - An array of plan product objects. - **id** (integer) - The unique identifier for the plan product. - **count** (integer) - The number of units included in the plan. - **limit_period** (string) - The period over which the plan units are limited (e.g., 'weekly', 'monthly'). - **commitment_length** (integer) - The length of the commitment period. - **commitment_unit** (string) - The unit of the commitment period (e.g., 'month', 'week'). - **location_id** (integer or null) - The ID of the location associated with the plan product, or null. - **terms** (string) - The terms and conditions of the plan product. - **group_rack_service_id** (string) - The ID of the associated group rack service. - **client_cancel_allowed** (boolean) - Indicates if the client is allowed to cancel the plan. - **terms_acceptance_required** (boolean) - Indicates if acceptance of terms is required. - **rollover_count** (integer or null) - The number of units that can roll over to the next period. - **description_long** (string) - A long description of the plan product. - **signup_fee_cents** (integer) - The signup fee in cents. - **signup_fee_tax_exempt** (boolean) - Indicates if the signup fee is tax-exempt. - **product** (object) - Details about the associated product. - **id** (integer) - The product ID. - **name** (string) - The product name. - **description** (string) - A short description of the product. - **description_long** (string) - A long description of the product. - **price_cents** (integer) - The product price in cents. - **services** (array) - An array of associated service objects. - **id** (integer) - The service ID. - **name** (string) - The service name. - **billing** (object) - Billing details for the plan. - **interval_unit** (string) - The billing interval unit (e.g., 'month', 'week'). - **interval_count** (integer) - The number of units in the billing interval. - **days** (array) - Specific days of the week for billing. - **days_of_month** (array) - Specific days of the month for billing. - **months_of_year** (array) - Specific months of the year for billing. ### Response Example ```json { "plan_products": [ { "id": 1, "count": 10, "limit_period": "weekly", "commitment_length": 12, "commitment_unit": "month", "location_id": null, "terms": "Terms and Conditions", "group_rack_service_id": "1", "client_cancel_allowed": true, "terms_acceptance_required": true, "rollover_count": 2, "description_long": "A very long description of the plan product", "signup_fee_cents": 1000, "signup_fee_tax_exempt": true, "product": { "id": 2, "name": "Ten Visit Punchcard", "description": "A punchcard with ten visits.", "description_long": "A longer description.", "price_cents": 10000 }, "services": [ { "id": 1, "name": "Class P" }, { "id": 2, "name": "Class Q" }, { "id": 5, "name": "Class T" } ], "billing": { "interval_unit": "month", "interval_count": 1, "days": [], "days_of_month": [], "months_of_year": [] } } ] } ``` ``` -------------------------------- ### Example Individual Desk Event Response Source: https://developer.pike13.com/docs/api/v2 This JSON object details a single desk event, including its ID, name, start and end times, creation and update timestamps, and a list of attendees with their associated times. ```json { "events": [ { "id": 1, "name": "Group Workout", "service_id": 2, "start_time": "2015-08-01T21:00:00Z", "end_time": "2015-08-05T01:00:00Z", "created_at": "2015-07-29T20:49:43Z", "updated_at": "2015-07-29T20:49:43Z", "instructions": null, "attendees": [ { "id": 1, "name": "John Doe", "email": "john.d@pike13.com", "start_at": "2015-07-30T20:00:00Z", "end_at": "2015-10-30T20:00:00Z" }, { "id": 2, "name": "Jane Doe", "email": "jane.d@pike13.com", "start_at": null, "end_at": null } ] } ] } ``` -------------------------------- ### Pagination Example Source: https://developer.pike13.com/docs/api/v2 Illustrates the pagination attributes (total_count, prev, next) that may be included in API responses for paginated endpoints. ```json { "total_count": 56, "prev": "https://mybiz.pike13.com/api/v2/desk/people?page=1", "next": "https://mybiz.pike13.com/api/v2/desk/people?page=3" } ``` -------------------------------- ### Example JSON Response Source: https://developer.pike13.com/docs/api/v2 This is an example of a JSON response structure for a query, showing results and total count. ```json { "results": [ { "score": 1.3977994, "person": { "id": 56, "pronoun": null, "first_name": "Jane", "middle_name": null, "last_name": "Client", "is_schedulable": true, "name": "Jane Client", "membership": "No Membership", "is_member": false, "joined_at": "2014-12-10T00:29:46Z", "phone": "123-456-7890", "email": "janeclient@example.com", "secondary_info_field": "No Membership", "timezone": "Asia/Yerevan", "business_id": 1, "updated_at": "2014-12-10T00:31:58Z", "deleted_at": null, "hidden_at": null, "birthdate": null, "location_id": 1, "custom_fields": [ { "id": 5, "value": "blue", "name": "Favorite Color" } ] } } ], "total_count": 1 } ```