### Create Event Response Example Source: https://api.guestmanager.com/index_topics An example of the JSON response received after successfully creating an event. It includes the event's ID, name, venue details, and other relevant information. ```json { "id": 71390, "name": "New event", "slug": "new-event", "venue_id": 2847, "parent_event_id": null, "calendar_id": null, "published_at": null, "start": { "tz": "Central Time (US & Canada)", "local": "2018-12-27T22:00:00-06:00", "utc": "2018-12-28T04:00:00Z" }, "end": { "tz": "Central Time (US & Canada)", "local": "2018-12-28T02:00:00-06:00", "utc": "2018-12-28T08:00:00Z" }, "venue": { "id": 2847, "name": "Texas Motor Speedway", "description": null, "slug": "texas-motor-speedway" }, "categories": [], "registration_types": [], "list": { "id": 1016744, "name": "RLL Hospitality", "slug": "rll-hospitality", "status": "visible", "permanent_list_id": 27236, "image": null } } ``` -------------------------------- ### List Events with Includes and Sorting using cURL Source: https://api.guestmanager.com/index_topics An example of listing events and including related data such as registration types and their prices, sorted by start time. This demonstrates how to use both `include` and `sort` parameters to customize the API response for performance and relevance. ```cURL curl -X GET \ https://app.guestmanager.com/api/public/v2/events/ \ -H 'Authorization: Token abcdefg' \ -H 'Content-Type: application/json' \ -d '{ "include": "registration_types.prices", "sort": { "starts_at": "asc" } }' ``` -------------------------------- ### Authentication Example Source: https://api.guestmanager.com/index_topics Demonstrates how to authenticate API requests using an API Key in the Authorization header. ```APIDOC ## GET /api/public/v2 ### Description Example request to authenticate and fetch company information. ### Method GET ### Endpoint `https://app.guestmanager.com/api/public/v2` ### Headers - **Authorization** (string) - Required - `Token abcdefg` - **Content-Type** (string) - Required - `application/json` ### Request Example ```bash curl -X GET \ https://app.guestmanager.com/api/public/v2 \ -H 'Authorization: Token abcedf123' \ -H 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **id** (integer) - The company ID. - **name** (string) - The company name. #### Response Example ```json { "id": 0, "name": "Your company name" } ``` ``` -------------------------------- ### Resume Order Response Examples (JSON) Source: https://api.guestmanager.com/index_topics These JSON examples illustrate the successful and error responses when attempting to resume an order. A successful response returns the order details, including the previous state. An error response provides details about the validation failure, such as an invalid state transition. ```json { "id": 214895, "state": "cart", // previous successful state ... omitted ... } ``` ```json { "type": "validation_error", "message": "State cannot transition via \"resume\"", "model": "Order", "id": 214895, "errors": { "attributes": [ { "attribute": "state", "label": "State", "code": "invalid_transition", "message": "cannot transition via \"resume\"", "detail": { "event": "resume", "state": "cart" } } ], "associations": { "tickets": {}, "form_responses": {}, "line_items": {} } } } ``` -------------------------------- ### List All Events using cURL Source: https://api.guestmanager.com/index_topics A basic example of listing all events without any specific filters or sorting parameters. This request retrieves a default list of events, typically paginated. It serves as a starting point for exploring event data. ```cURL curl -X GET \ https://app.guestmanager.com/api/public/v2/events/ \ -H 'Authorization: Token abcdefg' \ -H 'Content-Type: application/json' ``` -------------------------------- ### Fetch Ticket API Request Example (cURL) Source: https://api.guestmanager.com/index_topics An example using cURL to fetch a specific ticket by its ID. This request includes authorization and content type headers. ```curl curl -X GET \ https://app.guestmanager.com/api/public/v2/tickets/2307131 \ -H 'Authorization: Token abcedfg' \ -H 'Content-Type: application/json' ``` -------------------------------- ### Image Transformation Request Example Source: https://api.guestmanager.com/index_topics Demonstrates how to request thumbnail images for event categories by specifying image transformations within the 'images' request parameter. This includes defining the resource, field, and transformation options like resizing. ```json { "images": { "category": { "image": [ { "key": "my_thumbnail", "options": { "resize": "250x250>" } } ] } } } ``` -------------------------------- ### Email Object Structure Example Source: https://api.guestmanager.com/index_topics Provides a sample JSON object representing an email sent through the GuestManager system. It includes details about the email's ID, timestamps, type, recipient, status, and content. ```json { "id": 894675, "created_at": "2018-06-04T16:48:50.245304Z", "updated_at": "2018-06-04T17:04:26.582437Z", "type": "ticket_email", "email": "*****@gmail.com", "state": "delivered", "status": "opened", "delivery_error_detail": null, "click_count": 0, "open_count": 3, "subject": "Your Ticket attached!", "body": null } ``` -------------------------------- ### Sample Pagination Response Structure Source: https://api.guestmanager.com/index_topics Illustrates the structure of a typical pagination response from a GET collection endpoint. It includes the 'data' payload and a 'meta' object containing pagination details and links for navigation. ```json { "data": [...], "meta": { "count": 10, "total": 14633, "page": { "number": 1, "size": 10, "next": 2, "prev": null, "total": 1464, "last": false, "first": true, "out_of_range": false }, "links": { "self": ".../api/public/v2/events?page[number]=1", "next": ".../api/public/v2/events?page%5Bnumber%5D=2", "prev": null, "last": ".../api/public/v2/events?page[number]=1464", "first": ".../api/public/v2/events?page[number]=1" } } } ``` -------------------------------- ### Pagination Source: https://api.guestmanager.com/index_topics Explains the pagination mechanism for `GET` collection endpoints, including default and maximum page sizes, and details the structure of pagination metadata in responses. ```APIDOC ## Pagination ### Description All requests to `GET` collection endpoints are paginated. The default number of records per page is 10, with a maximum of 100. Some resources may have specific limits (e.g., 50 for events). ### Pagination Request Parameters | Parameter | Default | Description | |--------------|---------|-------------------------------------------| | `page[number]` | `1` | The page number to return records for. | | `page[size]` | `10` | The number of records to return per page. | ### Pagination Response Metadata Pagination information is returned within the `meta` key of the response. Links for navigating between pages are also provided. | Parameter | Type | Description | |-------------------------|---------|-----------------------------------------------------------------------------| | `meta[count]` | `integer` | The number of records returned in the current request. | | `meta[total]` | `integer` | The total number of records across all pages. | | `meta[page][number]` | `integer` | The current page number. | | `meta[page][size]` | `integer` | The number of records per page. | | `meta[page][next]` | `integer` | The next page number (`null` if no next page). | | `meta[page][prev]` | `integer` | The previous page number (`null` if no previous page). | | `meta[page][total]` | `integer` | The total number of pages. | | `meta[page][last]` | `integer` | The last page number. | | `meta[page][first]` | `integer` | The first page number. | | `meta[page][out_of_range]`| `boolean` | `true` if the requested page number has no results. | | `meta[links][self]` | `URL` | The URL for the current request. | | `meta[links][next]` | `URL` | The URL to retrieve the next page of results (`null` if no next page). | | `meta[links][prev]` | `URL` | The URL to retrieve the previous page of results (`null` if no previous page).| | `meta[links][last]` | `URL` | The URL for the last page of results. | | `meta[links][first]` | `URL` | The URL for the first page of results. | ### Sample Pagination Response ```json { "data": [...], "meta": { "count": 10, "total": 14633, "page": { "number": 1, "size": 10, "next": 2, "prev": null, "total": 1464, "last": false, "first": true, "out_of_range": false }, "links": { "self": ".../api/public/v2/events?page[number]=1", "next": ".../api/public/v2/events?page%5Bnumber%5D=2", "prev": null, "last": ".../api/public/v2/events?page%5Bnumber%5D=1464", "first": ".../api/public/v2/events?page%5Bnumber%5D=1" } } } ``` *Note: Full URLs omitted for brevity.* ``` -------------------------------- ### Money Data Type Example Source: https://api.guestmanager.com/index_topics Illustrates the structure of the 'money' data type in the GuestManager API. This object provides multiple representations of a monetary value for convenience. ```json { "decimal": "53.5", "amount": 5350, // Integer "formatted": "$53.50" // Includes appropriate currency symbol } ``` -------------------------------- ### GuestManager API Order Response Example Source: https://api.guestmanager.com/index_topics This JSON object represents a successful response after applying a coupon code to an order. It details the order's state, items, pricing adjustments, and associated tickets. This response is crucial for verifying the coupon application and understanding the updated order total. ```json { "id": 214895, "number": "GMIZAJD7EKOQUX", "currency": "AUD", "state": "cart", "checkout_steps": [ "tickets", "address", "form", "payment", "complete" ], "item_count": 2, "contact_id": 1390001, "guest_token": "af73d05bd847d66b62c21e56661c7069", "guest_checkout": true, "first_name": "Jeff", "last_name": "Blake", "email": "jeff@gmail.com", "phone_number": "+12068423456", "phone_number_country": "US", "completed_at": null, "expires_at": "2019-01-10T23:08:28.081445Z", "total": { "decimal": "26.72", "amount": 2672, "formatted": "$26.72" }, "item_total": { "decimal": "30.0", "amount": 3000, "formatted": "$30.00" }, "adjustment_total": { "decimal": "-3.28", "amount": -328, "formatted": "$-3.28" }, "promo_total": { "decimal": "-6.0", "amount": -600, "formatted": "$-6.00" }, "bill_address": null, "ship_address": null, "line_items": [ { "id": 222988, "order_id": 214895, "name": "Sell tix", "description": null, "variant_id": 10542, "quantity": 2, "currency": "AUD", "bundle_item_id": null, "price": { "decimal": "15.0", "amount": 1500, "formatted": "$15.00" }, "subtotal": { "decimal": "30.0", "amount": 3000, "formatted": "$30.00" } } ], "adjustments": [ { "id": 405431, "label": "Promotion", "order_id": 214895, "adjustable_id": 222988, "adjustable_type": "LineItem", "source_id": 329, "source_type": "PromotionAction", "included": false, "mandatory": true, "eligible": true, "groupable": true, "finalized": false, "amount": { "decimal": "-6.0", "amount": -600, "formatted": "$-6.00" } }, { "id": 405430, "label": "Service Fee", "order_id": 214895, "adjustable_id": 222988, "adjustable_type": "LineItem", "source_id": 4946, "source_type": "ServiceFeeRate", "included": false, "mandatory": true, "eligible": true, "groupable": true, "finalized": false, "amount": { "decimal": "2.72", "amount": 272, "formatted": "$2.72" } } ], "promotions": [ { "id": 9185, "promotion_id": 301, "code": null } ], "tickets": [ { "id": 2596879, "number": "DRHTvauq8N3Ay7ERFh7TUsmW", "status": "pending", "name": null, "email": null, "barcode": "2395309216989206", "note": null, "event_id": 71615, "ticket_type_id": 2470, "event_ticket_type_id": 19503, "list_id": 1017266, "contact_id": 1390001, "dispatched_at": null, "downloaded_at": null, "checkin_at": null, "source_type": "line_item", "source_id": 222988, "links": { "pdf": null, "wallet": null } }, { "id": 2596878, "number": "nKUcCduXxmXN9DoYtsDnJqt4", "status": "pending", "name": null, "email": null, "barcode": "2208377212609034", "note": null, "event_id": 71615, "ticket_type_id": 2470, "event_ticket_type_id": 19503, "list_id": 1017266, "contact_id": 1390001, "dispatched_at": null, "downloaded_at": null, "checkin_at": null, "source_type": "line_item", "source_id": 222988, "links": { "pdf": null, "wallet": null } } ], "payments": [], "responses": [ { "id": 52691, "form_id": 3587 } ] } ``` -------------------------------- ### Create Company Source: https://api.guestmanager.com/index Creates a new company. Requires company name and country code. Returns API keys for the new company. ```APIDOC ## POST /companies ### Description Creates a new company. Requires company name and country code. Returns API keys for the new company. ### Method POST ### Endpoint /companies ### Parameters #### Request Body - **company[name]** (string) - Required - Company name. - **company[address][country_code]** (string) - Required - ISO code of the company's country. ### Request Example ```json { "company": { "name": "New company", "address": { "country_code": "US" } } } ``` ### Response #### Success Response (200) - **id** (integer) - The ID of the newly created company. - **name** (string) - The name of the company. - **password** (string) - The password for the Check In App. - **pin** (string) - The PIN for the Check In App. - **address** (object) - The address details of the company. - **api_keys** (array) - An array of API keys associated with the company. #### Response Example ```json { "id": 10, "name": "New company", "password": "******", "pin": "1234", "address": { "country_code": "US" }, "api_keys": [ { "id": 1234, "name": null, "access_token": "....", "read": true, "write": false }, { "id": 1235, "name": null, "access_token": "....", "read": true, "write": true } ] } ``` ``` -------------------------------- ### List Tickets API Request Example (cURL) Source: https://api.guestmanager.com/index_topics An example using cURL to list tickets for a specific event. It includes authorization, content type headers, and a JSON payload for filtering by event IDs. ```curl curl -X GET \ https://app.guestmanager.com/api/public/v2/tickets \ -H 'Authorization: Token abcedfg' \ -H 'Content-Type: application/json' \ -d '{ "filter": { "event_ids": "1234" } }' ``` -------------------------------- ### Update Order Line Item - Response Example Source: https://api.guestmanager.com/index_topics This is an example of a successful response when updating a line item. It returns the full order object with the updated line item details, including quantity, price, and any associated adjustments or tickets. ```json { "id": 214895, "number": "GMIZAJD7EKOQUX", "currency": "AUD", "state": "cart", "checkout_steps": [ "tickets", "address", "form", "payment", "complete" ], "item_count": 1, "contact_id": 1390001, "guest_token": "af73d05bd847d66b62c21e56661c7069", "guest_checkout": true, "first_name": "Jeff", "last_name": "Blake", "email": "jeff@gmail.com", "phone_number": "+12068423456", "phone_number_country": "US", "completed_at": null, "expires_at": "2019-01-10T23:08:28.081445Z", "total": { "decimal": "16.45", "amount": 1645, "formatted": "$16.45" }, "item_total": { "decimal": "15.0", "amount": 1500, "formatted": "$15.00" }, "adjustment_total": { "decimal": "1.45", "amount": 145, "formatted": "$1.45" }, "promo_total": { "decimal": "0.0", "amount": 0, "formatted": "$0.00" }, "bill_address": null, "ship_address": null, "line_items": [ { "id": 222989, "order_id": 214895, "name": "Sell tix", "description": null, "variant_id": 10542, "quantity": 1, "currency": "AUD", "bundle_item_id": null, "price": { "decimal": "15.0", "amount": 1500, "formatted": "$15.00" }, "subtotal": { "decimal": "15.0", "amount": 1500, "formatted": "$15.00" } } ], "adjustments": [ { "id": 405432, "label": "Service Fee", "order_id": 214895, "adjustable_id": 222989, "adjustable_type": "LineItem", "source_id": 4946, "source_type": "ServiceFeeRate", "included": false, "mandatory": true, "eligible": true, "groupable": true, "finalized": false, "amount": { "decimal": "1.45", "amount": 145, "formatted": "$1.45" } } ], "promotions": [ { "id": 9185, "promotion_id": 301, "code": null } ], "tickets": [ { "id": 2596882, "number": "cYV9WBPdCA71C2f6zw86GTK6", "status": "pending", "name": null, "email": null, "barcode": "2035349948646978", "note": null, "event_id": 71615, "ticket_type_id": 2470, "event_ticket_type_id": 19503, "list_id": 1017266, "contact_id": 1390001, "dispatched_at": null, "downloaded_at": null, "checkin_at": null, "source_type": "line_item", "source_id": 222989, "links": { "pdf": null, "wallet": null } }, { "id": 2596881, "number": "gSH3Q7K1atT1EsEcVpUWTATr", "status": "pending", "name": null, "email": null, "barcode": "8393038480612290", "note": null, "event_id": 71615, "ticket_type_id": 2470, "event_ticket_type_id": 19503, "list_id": 1017266, "contact_id": 1390001, "dispatched_at": null, "downloaded_at": null, "checkin_at": null, "source_type": "line_item", "source_id": 222989, "links": { "pdf": null, "wallet": null } } ], "payments": [], "responses": [ { "id": 52691, "form_id": 3587 } ] } ``` -------------------------------- ### Venue Object Example Source: https://api.guestmanager.com/index_topics An example JSON object representing a venue. This object includes details such as the venue's ID, name, description, timezone, and address information. It is used to define a physical location within the Guest Manager system. ```json { "id": 0, "name": "Knoxfield", "description": null, "slug": "knoxfield", "created_at": "2016-09-19T20:35:16.794759Z", "updated_at": "2018-06-11T01:17:40.799858Z", "time_zone": "Melbourne", "tzinfo": { "name": "Melbourne", "identifier": "Australia/Melbourne", "offset": 36000, "formatted_offset": "+10:00" }, "address": { "id": 78013, "address1": "206-210 Coventry Street", "city": "South Melbourne", "zipcode": "3205", "state_name": "Victoria", "state_code": "VIC", "country_name": "Australia", "country_code": "AU" } } ``` -------------------------------- ### Create Company using cURL Source: https://api.guestmanager.com/index_topics Creates a new company. Requires the company name and country code for the address. The response includes the newly created company's details, including two API keys (one read-only, one read-write) and login credentials (password, PIN). ```bash curl -X POST \ https://app.guestmanager.com/api/public/enterprise/v1/companies \ -H 'Authorization: Token abcdefg' \ -H 'Content-Type: application/json' \ -d '{ "company": { "name": "New company", "address": { "country_code": "US" } } }' ``` -------------------------------- ### Sort Events by Start Time using cURL Source: https://api.guestmanager.com/index_topics Shows how to sort a list of events based on their start time in ascending order. The `sort` parameter in the request body allows specifying the field and direction for sorting. Multiple fields can be sorted by providing them in the `sort` object. ```cURL curl -X GET \ http://app.guestmanager.test:3000/api/public/v2/events \ -H 'Authorization: Token ....' \ -H 'Content-Type: application/json' \ -d '{ "sort": { "starts_at": "asc" } }' ``` -------------------------------- ### POST /orders Source: https://api.guestmanager.com/index_topics Create a new order. Refer to the Objects section for detailed field and relationship information. ```APIDOC ## POST /orders ### Description Create a new order. Refer to the Objects section for detailed field and relationship information. ### Method POST ### Endpoint /orders ### Parameters #### Query Parameters - **page[size]** (integer) - Optional - How many records to return per request. Default is `10`, maximum is `100`. - **page[number]** (integer) - Optional - The page of records to request. Default is `1`. - **sort[{field}]** (string) - Optional - Replace `{field}` with one of `id`, `created_at`, `updated_at`, `name`, and set the value to `asc` or `desc`. You may specify multiple sort fields. - **fields** (string) - Optional - Comma separated list of attributes to return. Default is `id,name`. - **include** (string) - Optional - Relationships to include. See `Venue` object for possible relationships. ### Request Example (No specific request body example provided in the source text for creating an order. Please refer to the Objects section for structure.) ### Response #### Success Response (200) (Response details for creating an order are not provided in the source text. Please refer to the Objects section for structure.) ``` -------------------------------- ### GET /api/public/v2/venues Source: https://api.guestmanager.com/index_topics Retrieves a list of venues. This endpoint can include address information when requested. ```APIDOC ## GET /api/public/v2/venues ### Description Retrieves a list of venues. This endpoint can include address information when requested. ### Method GET ### Endpoint /api/public/v2/venues ### Parameters #### Query Parameters - **include** (string) - Optional - Specifies related resources to include in the response. Use `address` to include venue addresses. ### Request Example ``` https://app.guestmanager.com/api/public/v2/venues?include=address ``` ### Response #### Success Response (200) - **data** (array) - An array of venue objects. - **meta** (object) - Metadata about the response, including pagination information. #### Response Example ```json { "data": [...], "meta": { "count": 8, "total": 8, "page": { "number": 1, "size": 10, "next": null, "prev": null, "total": 1, "last": true, "first": true, "out_of_range": false }, "links": { "self": ".../api/public/v2/venues?include=address", "next": null, "prev": null, "last": ".../api/public/v2/venues?include=address&page%5Bnumber%5D=1", "first": ".../api/public/v2/venues?include=address&page%5Bnumber%5D=1" } } } ``` ``` -------------------------------- ### Begin Checkout Source: https://api.guestmanager.com/index_topics Attempts to move an order to the next step in the checkout process without providing any new attributes. This is commonly used to initiate the checkout flow from the 'cart' state to the first checkout step. ```APIDOC ## PATCH /checkout/{id}/begin ### Description Initiates the checkout process for an order by transitioning it to the next logical step. This endpoint is typically used to move an order from the 'cart' state to the initial checkout phase, and it does not require any additional attributes in the request body. ### Method PATCH ### Endpoint `/checkout/{id}/begin` ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the order to begin checkout for. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X PATCH https://app.guestmanager.com/api/public/v2/checkout/{id}/begin \ -H "Accept: application/json" \ -H "Authorization: Token abcdefg" ``` ### Response #### Success Response (200) - **id** (integer) - The ID of the order. - **state** (string) - The new state of the order after initiating checkout (e.g., 'email', 'address'). #### Response Example ```json { "id": 123456, "state": "address", "expires_at": "2023-10-27T10:00:00Z" } ``` #### Error Response (400/422) - **type** (string) - The type of error. - **message** (string) - A description of the error. - **model** (string) - The model associated with the error. - **id** (integer) - The ID of the order. - **errors** (object) - Detailed error information. #### Error Response Example ```json { "type": "validation_error", "message": "Order cannot begin checkout in its current state.", "model": "Order", "id": 123456, "errors": { "attributes": [ { "attribute": "state", "label": "State", "code": "invalid_transition", "message": "cannot begin checkout from current state.", "detail": { "event": "begin_checkout", "state": "complete" } } ] } } ``` ``` -------------------------------- ### Create Event Source: https://api.guestmanager.com/index Creates a new event. ```APIDOC ## POST /events ### Description Creates a new event. ### Method POST ### Endpoint `https://app.guestmanager.com/api/public/v2/events` ### Headers - **Authorization** (string) - Required - `Token abcdefg` - **Content-Type** (string) - Required - `application/json` ### Request Body - **name** (string) - Required - The name of the event. - **start_date** (string) - Required - The start date and time of the event (ISO 8601 format). - **end_date** (string) - Required - The end date and time of the event (ISO 8601 format). ### Request Example ```json { "name": "New Year's Gala", "start_date": "2024-01-01T19:00:00Z", "end_date": "2024-01-02T02:00:00Z" } ``` ### Response #### Success Response (201) - **id** (integer) - The ID of the newly created event. - **name** (string) - The name of the event. - **start_date** (string) - The start date and time of the event. - **end_date** (string) - The end date and time of the event. #### Response Example ```json { "id": 101, "name": "New Year's Gala", "start_date": "2024-01-01T19:00:00Z", "end_date": "2024-01-02T02:00:00Z" } ``` ``` -------------------------------- ### GET /api/public/v2/categories Source: https://api.guestmanager.com/index_topics Retrieves a list of categories. This endpoint supports optional image resizing parameters for category images. ```APIDOC ## GET /api/public/v2/categories ### Description Retrieves a list of categories. This endpoint supports optional image resizing parameters for category images. ### Method GET ### Endpoint /api/public/v2/categories ### Parameters #### Query Parameters - **page[size]** (integer) - Optional - How many records to return per request. Default is `10`, maximum is `100` - **page[number]** (integer) - Optional - The page of records to request. - **sort[{field}]** (object) - Optional - Replace `{field}` with one of `position`, with value of `asc` or `desc` - **images[category][image]** (array) - Optional - Request custom sized images. See _Topics_ for details. ### Request Example ```json { "images": { "category": { "image": [ { "key": "thumbnail", "options": { "resize": "250x250>" } } ] } } } ``` ### Response #### Success Response (200) - **data** (array) - An array of category objects. - **meta** (object) - Metadata about the response, including pagination information. #### Response Example ```json { "data": [ { "id": 18, "name": "MasterClasses", "subtitle": null, "position": 3, "short_description": null, "description": null, "image": { "original": "../image.png" } } ], "meta": { "count": 3, "total": 3, "page": { "number": 1, "size": 10, "next": null, "prev": null, "total": 1, "last": true, "first": true, "out_of_range": false }, "links": { "self": "https://app.guestmanager.com/api/public/v2/categories", "next": null, "prev": null, "first": "https://app.guestmanager.com/api/public/v2/categories?page%5Bnumber%5D=1", "last": "https://app.guestmanager.com/api/public/v2/categories?page%5Bnumber%5D=1" } } } ``` ``` -------------------------------- ### Fetch Order Parameters Source: https://api.guestmanager.com/index_topics Details the parameters for fetching an order. The `guest_token` is mandatory, while `fields` and `include` are optional for specifying the desired response data. ```markdown Parameter | Type | Required | Default | Description ---|---|---|---|--- `guest_token` | `string` | _yes_ | | Provide the `guest_token` given to you in the create order endpoint. `fields` | `string` | _no_ | | Request a subset of the order attributes if desired. `include` | `string` | _no_ | | Request specific relationships. ``` -------------------------------- ### Authenticate API Request (cURL) Source: https://api.guestmanager.com/index_topics Demonstrates how to authenticate an API request using cURL by providing an API key in the Authorization header. This is essential for accessing protected API resources. ```bash curl -X GET \ https://app.guestmanager.com/api/public/v2 \ -H 'Authorization: Token abcedf123' \ -H 'Content-Type: application/json' ``` -------------------------------- ### Exceptional Errors Source: https://api.guestmanager.com/index Details on exceptional errors that indicate a problem with the request format, including common error types and examples. ```APIDOC ## Exceptional Errors Exceptional errors indicate a problem with your request's format. Please refer to the examples below for specific error structures. ### Error Attributes | Attribute | Type | Meaning | |-----------|--------|-------------------------------------------------------------------------| | `type` | string | The type of exceptional error (e.g., `forbidden`, `not_found`, `routing_error`, `parameter_missing`, `unpermitted_parameters`). | | `message` | string | A description of the error. | | `detail` | object | Detailed information about the error, which varies depending on the error type. | ### Example: `rate_limit_exceeded` ```json { "type": "rate_limit_exceeded", "message": "Throttle limit reached. Retry later." } ``` ### Example: `not_found` ```json { "type": "not_found", "message": "Resource not found: Couldn't find Order with 'id'=1762272 [WHERE \"orders\".\"deleted_at\" IS NULL AND \"orders\".\"company_id\" = $1]", "detail": { "id": "1762272", "model": "Order", "primary_key": "id" } } ``` ### Example: `parameter_missing` ```json { "type": "parameter_missing", "message": "param is missing or the value is empty: order" } ``` ### Example: `unpermitted_parameters` ```json { "type": "unpermitted_parameters", "message": "found unpermitted parameter: :total", "detail": { "params": [ "total" ] } } ``` ``` -------------------------------- ### Validation Errors Source: https://api.guestmanager.com/index Explains validation errors, which occur when provided attributes do not meet model requirements, and provides examples for single and associated object errors. ```APIDOC ## Validation Errors Validation errors occur when an attribute you provide does not meet the validation rules defined for the corresponding model. These errors will always return a `422` status code. ### Error Response Structure | Attribute | Type | Meaning | |------------------|--------|--------------------------------------------------------------------------------------------------------| | `type` | string | Always `validation_error`. | | `message` | string | A concatenated message of all validation errors. | | `errors` | object | Contains details about individual validation errors. The key corresponds to the resource being modified (e.g., `order`). | | `errors[attributes]` | array | Errors related to the main object itself. | | `errors[associations]` | hash | Errors related to associated objects. | ### Error Node Structure | Attribute | Type | Meaning | |------------|--------|--------------------------------------------------------------------------------------------------------| | `attribute`| string | The specific attribute on the model that caused the error. | | `label` | string | A human-readable version of the attribute name. | | `name` | string | If the attribute is a relationship, this will be the name of the associated record. | | `code` | string | The type of validation error (e.g., `invalid`, `blank`). | | `message` | string | A human-readable explanation of the `code`. | | `detail` | object | Any additional attributes that may be helpful, depending on the specific error. | ### Example: Simple Validation Error ```json { "type": "validation_error", "message": "Email is invalid", "errors": { "attributes": [ { "field": "email", "label": "Email", "name": null, "code": "invalid", "message": "is invalid" } ], "associations": { "tickets": {}, "form_responses": {} } } } ``` ### Example: Validation Error with Associations ```json { "type": "validation_error", "message": "", "errors": { "attributes": [], "associations": { "tickets": { "2148094": { "type": "validation_error", "message": "Name can't be blank", "errors": { "attributes": [ { "attribute": "name", "label": "Name", "code": "blank", "message": "can't be blank" } ], "associations": {} } } }, "form_responses": {} } } } ``` ``` -------------------------------- ### List Recurring Events (GET) Source: https://api.guestmanager.com/index_topics Retrieves a list of recurring events. Supports pagination and sorting parameters. The response includes event data and metadata about the pagination. ```curl curl -X GET \ https://app.guestmanager.com/api/public/v2/recurring_events \ -H 'Authorization: Token abcdefg' \ -H 'Content-Type: application/json' ``` -------------------------------- ### POST /venues Source: https://api.guestmanager.com/index_topics Create a new venue with basic or full details. The request body should contain venue information such as name, description, time zone, and address. ```APIDOC ## POST /venues ### Description Create a new venue with basic or full details. The request body should contain venue information such as name, description, time zone, and address. ### Method POST ### Endpoint /api/public/v2/venues ### Parameters #### Request Body - **venue** (object) - Required - Contains venue details. - **name** (string) - Required - Name of the venue. - **description** (string) - Optional - Any additional details about the venue. - **time_zone** (string) - Required - Time zone. See Object reference for list of time zones. - **address** (object) - Optional - Venue address. See Object reference for parameters. ### Request Example ```json { "venue": { "name": "The Rio Theatre", "time_zone": "Pacific Time (US & Canada)" } } ``` ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the venue. - **name** (string) - Name of the venue. - **description** (string) - Description of the venue. - **slug** (string) - URL-friendly identifier for the venue. - **created_at** (string) - Timestamp when the venue was created. - **updated_at** (string) - Timestamp when the venue was last updated. - **time_zone** (string) - Time zone of the venue. - **tzinfo** (object) - Time zone information. - **name** (string) - Name of the time zone. - **identifier** (string) - Time zone identifier. - **offset** (integer) - Time zone offset in seconds. - **formatted_offset** (string) - Formatted time zone offset. - **address** (object) - Address details of the venue. #### Response Example ```json { "id": 3245, "name": "The Rio Theatre", "description": null, "slug": "the-rio-theatre", "created_at": "2019-01-07T20:33:44.583012Z", "updated_at": "2019-01-07T20:33:44.583012Z", "time_zone": "Pacific Time (US & Canada)", "tzinfo": { "name": "Pacific Time (US & Canada)", "identifier": "America/Los_Angeles", "offset": -28800, "formatted_offset": "-08:00" }, "address": null } ``` ```