{"swagger":"2.0","info":{"title":"Retreat Booking Guru API","version":"v1.1","x-logo":{"url":"https://retreat.guru/images/brand/logo.svg"},"description":"Welcome to the Retreat Booking Guru API, so awesome to have you here!\n\n And just in case you have no idea where you are, [Retreat Booking Guru](https://bookingsoftware.guru)\nis a software package for spiritual retreat centers to manage programs, registrations, finances and\neverything in between.\n\nLets get started, shall we?\n\n## Authentication\n\nIn order to use the API you'll need an API token.\n\nTo get the API token for your installation:\n\n- Go to *Settings*\n- Select the *API* tab\n- Grab the token\n\nIf there isn't a token there yet, hit *Generate Token*, then *Save changes* and then copy the token.\n\nYou can authenticate the API in two ways:\n\n- using a `token` URL parameter\n- using HTTP basic authentication\n\n\n\n## Data types\n\n1. All values and parameters that have the `date` type are in `YYYY-MM-DD` format,\n all values that have the `date-time` type are in the `YYYY-MM-DDTHH:MM:SS` format.\n The special value `today` can also be used with any date argument.\n\n2. If a parameters can take multiple values (the `id` parameter usually does), you can provide multiple comma-separated values.\n\n## Support\n\nOur API is under active development. If you have any questions about it or our\nsoftware in general, please contact us at support@retreat.guru.\n"},"host":"secure.retreat.guru","basePath":"/api/v1","produces":["application/json"],"securityDefinitions":{"Token":{"in":"query","type":"apiKey","name":"token","description":"Pass your API token as the `token` URL parameter:\n```\nhttps://secure.retreat.guru/api/v1/programs?token=0000\n```\n"},"HTTP":{"type":"basic","description":"Pass `api` as the username and your API token as the password.\n```\nhttps://api:0000@secure.retreat.guru/api/v1/programs\n```\n"}},"paths":{"/programs":{"get":{"tags":["Programs"],"summary":"Get program info","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"lang","in":"query","type":"string","description":"Get the content for a particular language. The language values are two-letter identifiers from\n[ISO 639-1](http://www.loc.gov/standards/iso639-2/php/code_list.php).\nOnly the languages that are enabled for your install will work. The default language is `en` (English).\n"},{"name":"category","in":"query","type":"array","items":{"type":"string"},"description":"Get all the programs that belong to this category or categories (by category slug)\n"},{"name":"on_date","in":"query","type":"string","format":"date","description":"Get all the programs that occur on this date (start on and before it and end on or after it).\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Get all the programs that start on or after this date.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Get all the programs that end on or after this date.\n"},{"name":"current","in":"query","type":"boolean","description":"Get all current and future programs\n"},{"name":"teacher_id","in":"query","type":"integer","description":"Get all the programs for the teacher\n"},{"name":"status","in":"query","type":"array","items":{"type":"string"},"description":"Filter the programs with the given status, ex: confirmed, p-cancelled. Separate multiple statuses with commas.\n"},{"name":"post_status","in":"query","type":"array","items":{"type":"string"},"description":"Filter the programs with the given post status, ex: draft, publish, pending. Separate multiple post statuses with commas.\n"},{"name":"venue_id","in":"query","type":"integer","description":"Get all the programs that utilize the specified venue\n"},{"name":"public","in":"query","type":"boolean","description":"Get all the programs that are listed publicly (controlled by the \"Remove from public listings\" setting for a program)\n"},{"name":"order","in":"query","type":"string","description":"Set to `asc` or `desc` to define whether results should be ordered in ascending or descending order, or leave blank for default (ascending).\n"},{"name":"orderby","in":"query","type":"string","description":"Set to any of ['ID', 'start_date', 'end_date'] to define whether results should be ordered by any of these fields, or leave blank for default (id).\n"},{"name":"fields","in":"query","type":"string","description":"Filter which program object fields are returned. Provide a comma seperated list of fields, ex: &fields=id,name.\n"},{"name":"include","in":"query","type":"array","items":{"type":"string"},"description":"Include additional data in the response. The valid values are:\n\n- `teachers` to include Teacher objects\n- `venue_uses` to include VenueUse objects\n- `flexible_date_limits` to include flexible date limits\n - `flexible_date_earliest_start`: *string* *\\*\n - Earliest date that guests are allowed to book for flexible prgoram dates (hotel, package)\n - `flexible_date_latest_end`: *string* *\\*\n - Latest date that guests are allowed to book for flexible program dates (hotel, package)\n"}],"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/programs?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/programs?token=0000\");\n$programs = json_decode($result);\nvar_dump($programs);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/programs?token=0000\")\nprint(result.json())\n"}],"responses":{"200":{"description":"An array of programs","schema":{"type":"array","items":{"type":"object","description":"A single program returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"always program"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"program name"},"name_no_analzyer":{"type":"string","description":"normalized program name"},"excerpt":{"type":"string","description":"program listing excerpt"},"content":{"type":"string","description":"program description"},"date_type":{"type":"string","description":"Type of date in affect for the program, will be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default)\n * `package` - registration start date is flexibile but the length is not\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"registration_open_date":{"type":"string","format":"date","description":"program registration opening date"},"package_nights":{"type":"integer","description":"fixed length of the program"},"package_exclude_days":{"description":"days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat","type":"array","items":{"type":"string"}},"public":{"type":"boolean","description":"is the programs listed publicly (controlled by the \"Remove from public listings\" setting for a program)"},"program_type":{"type":"string","description":"will be either `program` or `rental`"},"status":{"type":"string","description":"status of the program or the rental"},"post_status":{"type":"string","description":"post status of the submission"},"program_registration_status":{"type":"string","description":"registration status of the program 'open', 'closed' etc."},"registrations_url":{"type":"string","format":"uri","description":"API URL for program registrations"},"transactions_url":{"type":"string","format":"uri","description":"API URL for all program transactions (includes payments and items)"},"payments_url":{"type":"string","format":"uri","description":"API URL for program payments"},"items_url":{"type":"string","format":"uri","description":"API URL for program items"},"teachers":{"type":"array","items":{"type":"string"},"description":"teacher names for the program (if `['include' => ['teachers']]` specified in request)"},"teachers_url":{"type":"string","format":"uri","description":"API URL for program teachers"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL for all venue uses for this program"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"notes":{"type":"array","items":{"type":"array"},"description":"program notes as name-value pairs"},"tasks":{"type":"array","items":{"type":"string"},"description":"slugs for the tasks assigned to the program"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"program_link":{"type":"string","format":"uri","description":"URL of public program info page"},"registration_link":{"type":"string","format":"uri","description":"URL of public registration page for program"},"remote_registration_link":{"type":"string","format":"uri","description":"link to remote registration page"},"reg_external_url":{"type":"string","format":"uri","description":"External URL for program registration (overrides default registration page)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"admin_link":{"type":"string","format":"uri","description":"link to admin program edit page"},"location":{"type":"string","description":"program location"},"address":{"type":"string","description":"program location address"},"program_has_capacity":{"description":"returns true if the program has spaces available for bookings","type":"boolean"},"available_spaces":{"description":"number of program spaces available for bookings","type":"integer"},"images":{"type":"array","items":{"type":"array"},"description":"info about program images including urls and sizes"},"waitlist_enabled":{"description":"returns true if the program waitlist is set to enabled","type":"boolean"},"pricing_type":{"type":"string","description":"Type of pricing in affect for the program, will be one of the following:\n\n * `tiered` - simple, multiple pricing\n * `lodging` - lodging based pricing\n * `special` - free, custom pricing\n * `suggested-donation` - suggested donation\n * `sliding-scale` - sliding scale pricing\n"},"pricing_options":{"description":"available pricing options for the type (currently only shows for `tiered` pricing)","type":"array"},"program_info":{"type":"array","description":"Program information fields including:\n * datetime_title\n * datetime_details\n * location_title\n * location\n * location_address_title\n * location_address\n * contact_title\n * contact_name\n * contact_email\n * contact_phone\n * alternate_url\n * extra_display_fields\n * show_location_name\n * show_address\n"},"hide_from_marketplace":{"type":"integer","description":"0 or 1 to enable or disable copying to the marketplace."},"deposit_percentage":{"type":"integer","description":"percentage of program cost required as deposit (50 is 50%)"},"max_capacity":{"description":"program is limited to this number of registrations - empty means no limit.","type":"integer"},"currency":{"description":"currency of the prices being displayed","type":"string"},"online_event_page_link":{"description":"link to the program's online landing page.","format":"uri","type":"string"},"is_online":{"description":"returns true if online landing page is enabled for this program or the program name indicates it is an online program","type":"boolean"},"updated_at_local_time":{"type":"string","format":"time","description":"local time the program was last updated"},"updated_at_gmt":{"type":"string","format":"time","description":"gmt time the program was last updated"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}}}},"/programs/create":{"post":{"tags":["Programs"],"summary":"Create a new program","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"program","in":"body","description":"The program to create","schema":{"type":"object","description":"A single program to create or update","properties":{"name":{"type":"string","description":"program name"},"date_type":{"type":"string","description":"Sets the way dates are handled for program registrations, must be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default). requires start_date and end_date to also be set\n * `package` - registration start date is flexibile but the length is not. requires package_nights to also be set\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"package_nights":{"type":"integer","description":"set the length of the program, use together with date_type set to `package`"},"package_exclude_days":{"type":"array","description":"set days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat"},"content":{"type":"string","format":"html","description":"description content for the program (supports HTML)"},"image_url":{"type":"string","format":"url","description":"URL of a remote image file to grab for the featured image (use sparingly and only when an image is being changed)."},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the program from the marketplace"},"pricing_type":{"type":"string","enum":["tiered"],"description":"the type of pricing to use (currently only `tiered` is supported)"},"pricing_options":{"type":"array","items":{"type":"array"},"description":"array of pricing options in `['price' => '0.00', 'description' => '']` format"},"post_departure_email_type":{"type":"string","enum":["standard","disabled"],"description":"the type of post departure email to use.\n"},"max_capacity":{"type":"integer","description":"limit registration to this number of people"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"public":{"type":"boolean","description":"set to false to hide program from public listings"},"teacher_ids":{"type":"string","description":"list of teacher ids for this program, separated by commas"}}}}],"responses":{"200":{"description":"A reference to the new program","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl -X POST \"https://secure.retreat.guru/api/v1/programs/create?token=0000\" -d \"name=Test+API+Program&start_date=2018-01-01&end_date=2018-01-10\"\n"},{"lang":"PHP","source":"$postdata = http_build_query([\n 'name' => 'Test API Program',\n 'date_type' => 'fixed',\n 'start_date' => '2018-01-01',\n 'end_date' => '2018-01-10',\n 'list_until_date' => '2030-01-01',\n 'package_nights' => null,\n 'package_exclude_days' => null,\n 'content' => 'It is a very special retreat',\n 'pricing_type' => 'tiered',\n 'pricing_options' => [\n [\n 'price' => '100.00',\n 'description' => 'light package',\n ],\n [\n 'price' => '200.00',\n 'description' => 'intensive package',\n ],\n ],\n 'post_departure_email_type' => 'standard',\n 'public' => true,\n 'image_url' => 'https://upload.wikimedia.org/wikipedia/en/b/bd/SE_rehab_retreat.jpg',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/programs/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nresult = requests.post(\"https://secure.retreat.guru/api/v1/programs/create?token=0000\", data={\n 'name': 'Test API Program',\n 'start_date': '2018-01-01',\n 'end_date': '2018-01-10'\n}, verify=False)\nprint(result.json())\n"}]}},"/programs/{id}/update":{"post":{"tags":["Programs"],"summary":"Update an existing program","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"program","in":"body","description":"The program to create","schema":{"type":"object","description":"A single program to create or update","properties":{"name":{"type":"string","description":"program name"},"date_type":{"type":"string","description":"Sets the way dates are handled for program registrations, must be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default). requires start_date and end_date to also be set\n * `package` - registration start date is flexibile but the length is not. requires package_nights to also be set\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"package_nights":{"type":"integer","description":"set the length of the program, use together with date_type set to `package`"},"package_exclude_days":{"type":"array","description":"set days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat"},"content":{"type":"string","format":"html","description":"description content for the program (supports HTML)"},"image_url":{"type":"string","format":"url","description":"URL of a remote image file to grab for the featured image (use sparingly and only when an image is being changed)."},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the program from the marketplace"},"pricing_type":{"type":"string","enum":["tiered"],"description":"the type of pricing to use (currently only `tiered` is supported)"},"pricing_options":{"type":"array","items":{"type":"array"},"description":"array of pricing options in `['price' => '0.00', 'description' => '']` format"},"post_departure_email_type":{"type":"string","enum":["standard","disabled"],"description":"the type of post departure email to use.\n"},"max_capacity":{"type":"integer","description":"limit registration to this number of people"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"public":{"type":"boolean","description":"set to false to hide program from public listings"},"teacher_ids":{"type":"string","description":"list of teacher ids for this program, separated by commas"}}}}],"responses":{"200":{"description":"A reference to the updated program","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=18\ncurl -X POST \"https://secure.retreat.guru/api/v1/programs/$ID/update?token=0000\" -d \"name=Updated+Program\"\n"},{"lang":"PHP","source":"$id = 18;\n\n$postdata = http_build_query([\n 'name' => 'Updated Program',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/programs/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 18\nresult = requests.post(\"https://secure.retreat.guru/api/v1/programs/{id}/update?token=0000\".format(id=id), data={\n 'name': 'Updated Program',\n}, verify=False)\nprint(result.json())\n"}]}},"/lodgings":{"get":{"tags":["Lodgings"],"summary":"Get lodging info","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"lang","in":"query","type":"string","description":"Get the content for a particular language. The language values are two-letter identifiers from\n[ISO 639-1](http://www.loc.gov/standards/iso639-2/php/code_list.php).\nOnly the languages that are enabled for your install will work. The default language is `en` (English).\n"},{"name":"program_id","in":"query","type":"integer","items":{"type":"integer"},"description":"Get lodgings for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"}],"responses":{"200":{"description":"An array of lodgings","schema":{"type":"array","items":{"type":"object","description":"A single lodging","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"type of content"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"name of lodging"},"description":{"type":"string","description":"lodging description"},"occupancy_type":{"type":"string","description":"type of lodging, either shared or hotel"},"max_occupancy":{"type":"integer","description":"maximum number of occupants allowed"},"base_price":{"type":"number","description":"base price of the lodging (see pricing_options for the program price)"},"images":{"type":"array","description":"info about lodging images including urls and sizes"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/lodgings?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/lodgings?token=0000\");\n$lodgings = json_decode($result);\nvar_dump($lodgings);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/lodgings?token=0000\")\nprint(result.json())\n"}]}},"/teachers":{"get":{"tags":["Teachers"],"summary":"Get teacher info","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"lang","in":"query","type":"string","description":"Get the content for a particular language. The language values are two-letter identifiers from\n[ISO 639-1](http://www.loc.gov/standards/iso639-2/php/code_list.php).\nOnly the languages that are enabled for your install will work. The default language is `en` (English).\n"},{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Get teachers for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"order","in":"query","type":"string","description":"Set to `asc` or `desc` to define whether results should be ordered in ascending or descending order, or leave blank for default (ascending).\n"},{"name":"orderby","in":"query","type":"string","description":"Set to any of ['ID', 'name'] to define whether results should be ordered by any of these fields, or leave blank for default (id).\n"}],"responses":{"200":{"description":"An array of teachers","schema":{"type":"array","items":{"type":"object","description":"A single teacher","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"teacher name"},"email":{"type":"string","description":"teacher email"},"content":{"type":"string","description":"teacher description"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the teacher belongs to (array of category slugs)"},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the teacher information on the marketplace"},"programs_url":{"type":"string","format":"uri","description":"API URL for the teacher's programs"},"images":{"type":"array","items":{"type":"array"},"description":"info about teacher images including urls and sizes"},"website":{"type":"string","items":{"type":"string"},"description":"teacher personal website as entered in their teacher bio"},"phone":{"type":"string","items":{"type":"string"},"description":"teacher phone number"},"location":{"type":"string","items":{"type":"string"},"description":"teacher location"},"post_status":{"type":"string","items":{"type":"string"},"description":"teacher post status"},"video_url":{"type":"string","items":{"type":"string"},"description":"teacher video url"},"tags":{"type":"string","items":{"type":"string"},"description":"tags that describe the teachers style and retreat content"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/teachers?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/teachers?token=0000\");\n$teachers = json_decode($result);\nvar_dump($teachers);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/teachers?token=0000\")\nprint(result.json())\n"}]}},"/teachers/create":{"post":{"tags":["Teachers"],"summary":"Create a new teacher","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"teacher","in":"body","description":"The teacher to create","schema":{"type":"object","description":"A single teacher","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"teacher name"},"email":{"type":"string","description":"teacher email"},"content":{"type":"string","description":"teacher description"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the teacher belongs to (array of category slugs)"},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the teacher information on the marketplace"},"programs_url":{"type":"string","format":"uri","description":"API URL for the teacher's programs"},"images":{"type":"array","items":{"type":"array"},"description":"info about teacher images including urls and sizes"},"website":{"type":"string","items":{"type":"string"},"description":"teacher personal website as entered in their teacher bio"},"phone":{"type":"string","items":{"type":"string"},"description":"teacher phone number"},"location":{"type":"string","items":{"type":"string"},"description":"teacher location"},"post_status":{"type":"string","items":{"type":"string"},"description":"teacher post status"},"video_url":{"type":"string","items":{"type":"string"},"description":"teacher video url"},"tags":{"type":"string","items":{"type":"string"},"description":"tags that describe the teachers style and retreat content"}}}}],"responses":{"200":{"description":"A reference to the new teacher","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl -X POST \"https://secure.retreat.guru/api/v1/teachers/create?token=0000\" -d \"name=Test+API+New+Teacher&content=A+nice+person\"\n"},{"lang":"PHP","source":"$postdata = http_build_query([\n 'name' => 'Test Teacher',\n 'content' => 'It is a very special teacher',\n 'categories' => '',\n 'hide_from_markeplace' => false,\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/teachers/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nresult = requests.post(\"https://secure.retreat.guru/api/v1/teachers/create?token=0000\", data={\n 'name': 'Test Teacher'\n}, verify=False)\nprint(result.json())\n"}]}},"/teachers/{id}/update":{"post":{"tags":["Teachers"],"summary":"Update an existing teacher","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"teacher","in":"body","description":"The teacher to update","schema":{"type":"object","description":"A single teacher","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"teacher name"},"email":{"type":"string","description":"teacher email"},"content":{"type":"string","description":"teacher description"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the teacher belongs to (array of category slugs)"},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the teacher information on the marketplace"},"programs_url":{"type":"string","format":"uri","description":"API URL for the teacher's programs"},"images":{"type":"array","items":{"type":"array"},"description":"info about teacher images including urls and sizes"},"website":{"type":"string","items":{"type":"string"},"description":"teacher personal website as entered in their teacher bio"},"phone":{"type":"string","items":{"type":"string"},"description":"teacher phone number"},"location":{"type":"string","items":{"type":"string"},"description":"teacher location"},"post_status":{"type":"string","items":{"type":"string"},"description":"teacher post status"},"video_url":{"type":"string","items":{"type":"string"},"description":"teacher video url"},"tags":{"type":"string","items":{"type":"string"},"description":"tags that describe the teachers style and retreat content"}}}}],"responses":{"200":{"description":"A reference to the updated teacher","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=18\ncurl -X POST \"https://secure.retreat.guru/api/v1/teachers/$ID/update?token=0000\" -d \"name=Updated+Teacher\"\n"},{"lang":"PHP","source":"$id = 18;\n\n$postdata = http_build_query([\n 'name' => 'Updated Teacher',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/teachers/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 18\nresult = requests.post(\"https://secure.retreat.guru/api/v1/teachers/{id}/update?token=0000\".format(id=id), data={\n 'name': 'Updated Teacher',\n}, verify=False)\nprint(result.json())\n"}]}},"/venues":{"get":{"tags":["Venues"],"summary":"Get venue info","description":"Retrieves base venue information\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"}],"responses":{"200":{"description":"An array of venues","schema":{"type":"array","items":{"type":"object","description":"A single venue","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"venue name"},"notes":{"type":"string","description":"notes attached to the venue"},"capacity":{"type":"integer","description":"maximum capacity for the venue"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve `VenueUse` objects for this venue"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/venues?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/venues?token=0000\");\n$teachers = json_decode($result);\nvar_dump($teachers);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/venues?token=0000\")\nprint(result.json())\n"}]}},"/venue_uses":{"get":{"tags":["Venues"],"summary":"Get venue bookings","description":"Retrieves bookings for venues based on provided request criteria\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"include","in":"query","type":"array","items":{"type":"string"},"description":"Specify `venue` and/or `program` to return program or venue objects directly in the result\n(using these on large, unfiltered, result sets is not recommended for performance reasons)\n"},{"name":"venue_id","in":"query","type":"integer","description":"Filter bookings for a specific venue.\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Get bookings for venues on or after `min_date`. Can be combined with `max_date` for a range of dates.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Get bookings for venues on or before `max_date`.\n"}],"responses":{"200":{"description":"An array of `VenueUse` objects\n","schema":{"type":"array","items":{"type":"object","description":"A program booking for a venue","properties":{"id":{"type":"integer","description":"unique identifier for this venue use entry"},"program_id":{"type":"integer","description":"unique identifier for the program for this booking"},"program_name":{"type":"string","description":"the name of the program for this booking"},"program_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve program object for current booking"},"venue_id":{"type":"integer","description":"unique identifier for the venue_id"},"venue_name":{"type":"string","description":"the name of the venue for this booking"},"venue_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve venue object for current booking"},"venue":{"$ref":"#/definitions/Venue"},"program":{"$ref":"#/definitions/Program"},"custom_dates":{"type":"boolean","description":"whether to use custom dates for this booking or the existing program dates"},"start_date":{"type":"string","format":"date-time","description":"the start date of the current booking","example":"2019-08-24T00:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"the end date of the current booking","example":"2019-08-26T00:00:00Z"},"daily_start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$","description":"the daily start time of the current booking","x-nullable":true,"example":"13:00:00"},"daily_end_time":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$","description":"the daily end time of the current booking","x-nullable":true,"example":"15:00:00"},"notes":{"type":"string","description":"additional notes for this venue booking"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/venue_uses?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/venue_uses?token=0000\");\n$registrations = json_decode($result);\nvar_dump($registrations);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/venue_uses?token=0000\")\nprint(result.json())\n"}]}},"/registrations":{"get":{"tags":["Registrations"],"summary":"Get registration info","description":"Retrieves registration details including names, emails and programs people have registered to. Registrations are always sorted\nin reverse chronological order with the newest registrations at the top of the result list.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"person_id","in":"query","type":"integer","description":"Filter registrations for a specific person.\n"},{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter registrations for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"room_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter registrations for a specific room or rooms (for multiple rooms supply a comma separated list of ids).\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Get registrations that were submitted on or after `min_date`. Can be combined with `max_date` for a range of dates.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Get registrations that were submitted on or before `max_date`.\n"},{"name":"min_stay","in":"query","type":"string","format":"date","description":"Get all registrations for which the registration stay dates are on or after `min_stay`. In particular\nthis includes registrations that start on `min_stay`, those that start before `min_stay` and end on or after it,\nand those that start after `min_stay`. This will not include registrations that end before `min_stay`.\n"},{"name":"max_stay","in":"query","type":"string","format":"date","description":"Get all registrations for which the registration stay dates are on or before `max_stay`. In particular\nthis includes registrations that those that start before `max_stay` and end on or after it,\nand those that start after `max_stay`. This will not include registrations that start after `max_stay`.\n"},{"name":"min_last_update","in":"query","type":"string","format":"date","description":"Get registrations that were last changed on or after the day `min_last_update` names (`2026-09-16`). The day\nis read in the site's local time. Can be combined with `max_last_update` for a range.\n"},{"name":"max_last_update","in":"query","type":"string","format":"date","description":"Get registrations that were last changed on or before the day `max_last_update` names (`2026-09-16`). The\nwhole day is included.\n"},{"name":"include","in":"query","type":"array","items":{"type":"string"},"description":"Include additional data in the response. The valid values are:\n\n- `payments` - to include Payment objects\n- `items` - to include Item objects\n- `transactions` - to include Transaction objects (both items and payments)\n- `all_questions` - to include all questions including admin-only fields (without this only questions enabled for the program are included)\n- `parent_registration` - to include Registration object of the parent (group-lead) registrations if the results includes a reservation that is a member of group)\n- `person` - to include the person object of the registration.\n"},{"name":"field_source","in":"query","type":"string","description":"Select the source of the fields (e.g. first_name, last_name). `registration` populates the field values from the registration fields, while `person` populates field values from\nuses values from the person fields. If the `field_source` parameter is not included in the request, registration fields are returned by default.\n"}],"responses":{"200":{"description":"An array of registrations","schema":{"type":"array","items":{"type":"object","description":"A single registration returned from a query","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"always registration"},"self_url":{"type":"string","description":"API URL pointing back to the object","format":"uri"},"submitted":{"type":"string","description":"time the registration was submitted","format":"date-time"},"last_update":{"type":"string","description":"time the registration was last changed, in the site's local time","format":"date-time"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"guest_type":{"type":"string","enum":["participant","program-staff","center-staff","volunteer","child","other","..."],"description":"guest type (the list can be customized in the admin, any slug set there can appear here)"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"full_name":{"type":"string","description":"guest's full name"},"email":{"type":"string","format":"email","description":"guest's email address"},"program":{"type":"string","description":"name of program the registration is for"},"program_id":{"type":"integer","description":"id for the program"},"program_url":{"type":"string","format":"uri","description":"URL for API representation of program"},"program_categories":{"type":"array","items":{"type":"string"},"description":"categories for the program"},"program_external_code":{"type":"string","description":"external code for the program (can be set up in the admin under Program / Advanced)"},"transactions_url":{"type":"string","format":"uri","description":"API URL for all registration's transactions"},"payments_url":{"type":"string","format":"uri","description":"API URL for registration's item transactions"},"items_url":{"type":"string","format":"uri","description":"API URL for registration's payment transactions"},"optional_items":{"type":"array","items":{"type":"string"},"description":"optional items (add-ons) selected for the registration"},"room_id":{"type":"integer","description":"the id of the room object associated with this registration"},"room":{"type":"string","description":"name of room guest will be staying in"},"lodging_id":{"type":"integer","description":"the id of the lodging object associated with this registration"},"lodging":{"type":"string","description":"name of lodging type selected"},"nights":{"type":"integer","description":"total nights of stay"},"person_id":{"type":"integer","description":"the id of the Person object associated with this registration"},"person_url":{"type":"string","format":"uri","description":"API URL for registration's person record"},"parent_registration_id":{"type":"integer","description":"the parent registration id (if this registration is a member of group)"},"parent_registration_url":{"type":"string","format":"uri","description":"API URL for the parent registration object (if this registration is a member of group)"},"sub_registration_ids":{"type":"array","items":{"type":"integer"},"description":"an array of IDs of child registrations of this registration"},"guest_statement_link":{"type":"string","format":"uri","description":"link to the (user-facing) guest statement"},"guest_edit_link":{"type":"string","format":"uri","description":"Deprecated - use registration_form_questions_link."},"registration_form_questions_link":{"type":"string","format":"uri","description":"link to registration form questions(where a guest can update their details)"},"admin_link":{"type":"string","format":"uri","description":"link to admin registration edit page"},"total_items":{"type":"number","description":"total amount of the registration's items"},"total_payments":{"type":"number","description":"total amount of the registration's payments"},"total_taxes":{"type":"number","description":"total amount of the registration's taxes"},"grand_total":{"type":"number","description":"total amount owed for the registration's guest statement"},"balance_due":{"type":"number","description":"current balance"},"registration_total":{"type":"number","description":"total of items and discounts originating from this registration, regardless of whether present on this registration's guest statement"},"secondary_form_questions_link":{"type":"string","format":"uri","description":"link to secondary form questions if applicable to program"},"online_event_page_link":{"type":"string","format":"uri","description":"link to the online landing page specific to this registration."},"questions":{"type":"array","description":"an array of all the custom fields that have been configured for the program for which this registration was entered"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/registrations?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/registrations?token=0000\");\n$registrations = json_decode($result);\nvar_dump($registrations);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/registrations?token=0000\")\nprint(result.json())\n"}]}},"/registrations/create":{"post":{"tags":["Registrations"],"summary":"Create a new registration","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"registration","in":"body","description":"The registration to create","schema":{"type":"object","description":"A single registration to create or update","properties":{"program_id":{"type":"integer","description":"id for the program"},"person_id":{"type":"integer","description":"person id to associate with the registration"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"email":{"type":"string","format":"email","description":"guest's email address"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"guest_type":{"type":"string","enum":["participant","program-staff","center-staff","volunteer","child","other","..."],"description":"guest type (the list can be customized in the admin, any slug set there will work here)"},"pricing_option":{"type":"number","description":"the selected price option (or the lodging id for lodging-priced programs)"},"pricing_amount":{"type":"number","description":"the selected price amount (only valid for sliding scale and donation priced programs)"},"questions":{"type":"array","description":"custom fields that have been configured for the program. Values should be passed in array style with the key being the slug of the field and the value being the desired value. Any hyphens `-` within the field slug should be replaced with underscores `_` in the request. Example: `questions[gender]=male,questions[legal_name]=Bob,questions[phone]=1234567890`\n"}}}}],"responses":{"200":{"description":"A reference to the new registration","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"PROGRAM=18\ncurl -X POST \"https://secure.retreat.guru/api/v1/registrations/create?token=0000\"\\\n -d \"first_name=Andrew&last_name=Fitzgerald&email=andrew@test.com&start_date=2018-01-01&end_date=2018-01-10&program_id=$PROGRAM\"\n"},{"lang":"PHP","source":"$program = 18;\n\n$postdata = http_build_query([\n 'first_name' => 'Andrew',\n 'last_name' => 'Fitzgerald',\n 'email' => 'andrew@test.com',\n 'program_id' => $program,\n 'start_date' => '2018-01-01',\n 'end_date' => '2018-01-10',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/registrations/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nprogram = 18\nresult = requests.post(\"https://secure.retreat.guru/api/v1/registrations/create?token=0000\", data={\n 'first_name': 'Andrew',\n 'last_name': 'Fitzgerald',\n 'email': 'andrew@test.com',\n 'program_id': program,\n 'start_date': '2018-01-01',\n 'end_date': '2018-01-10',\n}, verify=False)\nprint(result.json())\n"}]}},"/registrations/{id}/update":{"post":{"tags":["Registrations"],"summary":"Update an existing registration","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"registration","in":"body","description":"The registration to update","schema":{"type":"object","description":"A single registration to create or update","properties":{"program_id":{"type":"integer","description":"id for the program"},"person_id":{"type":"integer","description":"person id to associate with the registration"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"email":{"type":"string","format":"email","description":"guest's email address"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"guest_type":{"type":"string","enum":["participant","program-staff","center-staff","volunteer","child","other","..."],"description":"guest type (the list can be customized in the admin, any slug set there will work here)"},"pricing_option":{"type":"number","description":"the selected price option (or the lodging id for lodging-priced programs)"},"pricing_amount":{"type":"number","description":"the selected price amount (only valid for sliding scale and donation priced programs)"},"questions":{"type":"array","description":"custom fields that have been configured for the program. Values should be passed in array style with the key being the slug of the field and the value being the desired value. Any hyphens `-` within the field slug should be replaced with underscores `_` in the request. Example: `questions[gender]=male,questions[legal_name]=Bob,questions[phone]=1234567890`\n"}}}}],"responses":{"200":{"description":"A reference to the updated registration","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/registrations/$ID/update?token=0000\" -d \"first_name=John\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'first_name' => 'John',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/registrations/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/registrations/{id}/update?token=0000\".format(id=id), data={\n 'first_name': 'John',\n}, verify=False)\nprint(result.json())\n"}]}},"/transactions":{"get":{"tags":["Transactions"],"summary":"Get transaction info","description":"Transactions represent the financial details of the registration, including items the guest has purchased, discounts, taxes,\ncredit card payments, cash payments and any other custom transaction type you may have defined on your install.\n\nTransactions are always sorted in reverse chronological order with the newest transaction at the top of the result list.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"person_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter \"personal credit\" transactions for a specific person or people (for multiple people supply a comma separated list of ids).\n"},{"name":"registration_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific registration or registrations.\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or after this date.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or before this date.\n"},{"name":"class","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by class. Classes are hard coded and segment transaction into 8 broad categories:\n\n * `item` - an item the guest needs to pay for\n * `discount` - a discount the guest has received\n * `card-payment` - a credit card payment\n * `card-refund` - a credit card refund\n * `non-cc-payment` - a non credit card payment (cash, wire transfer, etc)\n * `non-cc-refund` - a non credit card refund\n * `person-credit` - personal credit was added for the guest\n * `person-debit` - personal credit was used for payment\n"},{"name":"category","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by category. Categories are user defined and can be very specific.\n"}],"responses":{"200":{"description":"An array of transactions","schema":{"type":"array","items":{"type":"object","description":"A single transaction returned from a query","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"submitted":{"type":"string","format":"date-time","description":"exact time when transaction was submitted"},"trans_date":{"type":"string","format":"date-time","description":"exact time of the transaction (can be modified manually, as opposed to `submitted`)"},"class":{"type":"string","description":"coarce grained classification of transactions"},"category":{"type":"string","description":"fine grained (and user defined) classification of transactions"},"status":{"type":"string","enum":["complete","cancel"],"description":"transaction status"},"description":{"type":"string","description":"transaction description (auto-generated or user-entered in the admin interface)"},"notes":{"type":"string","description":"notes entered about the transaction by the admin"},"staff_name":{"type":"string","description":"username of staff member who entered the transaction (if manually entered in the admin interface)"},"program_name":{"type":"string","description":"name of program for which this transaction was made"},"program_url":{"type":"string","format":"uri","description":"API URL of program for which this transaction was made"},"person_name":{"type":"string","description":"name of person on the registration"},"registration_url":{"type":"string","format":"uri","description":"API URL of connected registration object"},"details_url":{"type":"string","format":"uri","description":"API URL of detailed payment or item object"},"charge_amount":{"type":"number","description":"amount that was charged (usually used for purchased items)"},"credit_amount":{"type":"number","description":"amount that was credited (usually used for payments made)"},"associated_registration_id":{"type":"number","description":"Id for the associated registration"},"associated_registration_url":{"type":"string","format":"uri","description":"API URL for the associated registration"},"associated_transaction":{"type":"number","description":"Id for the associated transaction"},"expiry_date":{"type":"string","format":"date-time","description":"date of expiry"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/transactions?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/transactions?token=0000\");\n$transactions = json_decode($result);\nvar_dump($transactions);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/transactions?token=0000\")\nprint(result.json())\n"}]}},"/transactions/create":{"post":{"tags":["Transactions"],"summary":"Create a new transaction","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"transaction","in":"body","description":"The transaction to create","schema":{"type":"object","description":"A single transaction to create or update","properties":{"registration_id":{"type":"integer","description":"id for the registration the transaction will be added to"},"trans_date":{"type":"string","format":"date-time","description":"exact time of the transaction (can be modified manually, as opposed to `submitted`)"},"category":{"type":"string","description":"fine grained (and user defined) classification of transactions"},"status":{"type":"string","enum":["complete","cancel"],"description":"transaction status"},"description":{"type":"string","description":"transaction description (auto-generated or user-entered in the admin interface)"},"charge_amount":{"type":"number","description":"amount that was charged (usually used for purchased items)"},"credit_amount":{"type":"number","description":"amount that was credited (usually used for payments made)"}}}}],"responses":{"200":{"description":"A reference to the new transaction","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"REGISTRATION=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/transactions/create?token=0000\"\\\n -d \"registration_id=$REGISTRATION&category=program&charge_amount=100\"\n"},{"lang":"PHP","source":"$registration = 1;\n\n$postdata = http_build_query([\n 'registration_id' => $registration,\n 'category' => 'program',\n 'charge_amount' => 100,\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/transactions/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nregistration = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/transactions/create?token=0000\", data={\n 'registration_id': registration,\n 'category': 'program',\n 'charge_amount': 100,\n}, verify=False)\nprint(result.json())\n"}]}},"/transactions/{id}/update":{"post":{"tags":["Transactions"],"summary":"Update an existing transaction","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"transaction","in":"body","description":"The transaction to create","schema":{"type":"object","description":"A single transaction to create or update","properties":{"registration_id":{"type":"integer","description":"id for the registration the transaction will be added to"},"trans_date":{"type":"string","format":"date-time","description":"exact time of the transaction (can be modified manually, as opposed to `submitted`)"},"category":{"type":"string","description":"fine grained (and user defined) classification of transactions"},"status":{"type":"string","enum":["complete","cancel"],"description":"transaction status"},"description":{"type":"string","description":"transaction description (auto-generated or user-entered in the admin interface)"},"charge_amount":{"type":"number","description":"amount that was charged (usually used for purchased items)"},"credit_amount":{"type":"number","description":"amount that was credited (usually used for payments made)"}}}}],"responses":{"200":{"description":"A reference to the updated transaction","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/transactions/$ID/update?token=0000\" -d \"charge_amount=200\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'charge_amount' => 200,\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/transactions/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/transactions/{id}/update?token=0000\".format(id=id), data={\n 'charge_amount': 200,\n}, verify=False)\nprint(result.json())\n"}]}},"/payments":{"get":{"tags":["Transactions"],"summary":"Get payment transaction info","description":"Payment transactions can be credit card transactions entered automatically through the Retreat Booking Guru\nregistration system and entires done manually through the admin interface. Refunds are also represented\nhere Every payment is also available through the `/transactions` endpoint, but objects received through\nthis endpoint are filtered for easier use and contain more details that are only relevant for payments.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"lang","in":"query","type":"string","description":"Get the content for a particular language. The language values are two-letter identifiers from\n[ISO 639-1](http://www.loc.gov/standards/iso639-2/php/code_list.php).\nOnly the languages that are enabled for your install will work. The default language is `en` (English).\n"},{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"registration_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific registration or registrations.\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or after this date.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or before this date.\n"},{"name":"class","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by class. Classes are hard coded and segment transaction into 8 broad categories:\n\n * `item` - an item the guest needs to pay for\n * `discount` - a discount the guest has received\n * `card-payment` - a credit card payment\n * `card-refund` - a credit card refund\n * `non-cc-payment` - a non credit card payment (cash, wire transfer, etc)\n * `non-cc-refund` - a non credit card refund\n * `person-credit` - personal credit was added for the guest\n * `person-debit` - personal credit was used for payment\n"},{"name":"category","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by category. Categories are user defined and can be very specific.\n"}],"responses":{"200":{"description":"An array of payments","schema":{"type":"array","items":{"type":"object","description":"A single payment or refund transaction. The object includes all fields in Transaction and additional\nfields that are only relevant for payments made by the guest.\n","properties":{"fund_method":{"type":"string","description":"type of funding"},"merchant_name":{"type":"string","description":"name of credit card processor (e.g. Paypal)"},"merchant_trans_id":{"type":"string","description":"transaction id as recorded by credit card processor"},"merchant_profile":{"type":"string","description":"profile id as recorded by credit card processor"},"merchant_account":{"type":"string","description":"name of account the transaction was made on"},"merchant_cc_details":{"type":"string","description":"credit card details as recorded by credit card processor"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/payments?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/payments?token=0000\");\n$payments = json_decode($result);\nvar_dump($payments);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/payments?token=0000\")\nprint(result.json())\n"}]}},"/items":{"get":{"tags":["Transactions"],"summary":"Get item transaction info","description":"Item transactions represent anything purchased by a guest and any discount they received. This\nincludes payment for programs, lodging, meals and any optional items that were set up. Every item\ntransaction is also available through the `/transactions` endpoint, but objects received here\nare filtered for easier use and contain more details that are only relevant for items.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"registration_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific registration or registrations.\n"},{"name":"class","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by class. Classes are hard coded and segment transaction into 8 broad categories:\n\n * `item` - an item the guest needs to pay for\n * `discount` - a discount the guest has received\n * `card-payment` - a credit card payment\n * `card-refund` - a credit card refund\n * `non-cc-payment` - a non credit card payment (cash, wire transfer, etc)\n * `non-cc-refund` - a non credit card refund\n * `person-credit` - personal credit was added for the guest\n * `person-debit` - personal credit was used for payment\n"},{"name":"min_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or after this date.\n"},{"name":"max_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or before this date.\n"},{"name":"category","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by category. Categories are user defined and can be very specific.\n"}],"responses":{"200":{"description":"An array of items","schema":{"type":"array","items":{"type":"object","description":"A single item or discount transaction. The object includes all fields in Transaction and additional\nfields that are only relevant for items purchased by the guest.\n","properties":{"is_addon":{"type":"boolean","description":"is this item an addon (an optional item) selected by the guest"},"discount_amount":{"type":"string","description":"discount amount (either entered directly or calculated from `discount_percent`)"},"discount_percent":{"type":"string","description":"discount percentage"},"subtotal":{"type":"string","description":"total after applying discount, before applying taxes"},"tax_1_info":{"type":"string","description":"first tax description"},"tax_1_amount":{"type":"string","description":"first tax amount"},"tax_2_info":{"type":"string","description":"second tax description"},"tax_2_amount":{"type":"string","description":"second tax amount"},"grand_total":{"type":"string","description":"total after applying discount and taxes"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/items?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/items?token=0000\");\n$items = json_decode($result);\nvar_dump($items);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/items?token=0000\")\nprint(result.json())\n"}]}},"/leads":{"get":{"tags":["Leads"],"summary":"Get leads info","description":"Leads are created in two cases: (1) when a person enters a waiting list on a program that's fully booked and,\n(2) when the Advanced Registration Form is enabled and the user only enters their name and email in the Welcome\nsection. In the latter case the lead type is 'abandoned-reg', in the former it is 'wait-list'.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"program_id","in":"query","type":"integer","description":"Filter leads for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},{"name":"lead_type","in":"query","type":"string","enum":["abandoned-reg","wait-list"],"description":"Filter transactions for a lead type.\n"},{"name":"include_registered","in":"query","type":"boolean","description":"Include leads which have completed registration. Default value is `false`.\nIf used in conjunction with the `id` parameter to provide a specific ID, or list of IDs, this parameter will\nbe ignored and the result set will include the matching records regardless of registration status.\n"},{"name":"order","in":"query","type":"string","enum":["asc","desc"],"description":"Set to `asc` or `desc` to define whether results should be ordered in ascending or descending order, or leave blank for default (ascending).\n"},{"name":"orderby","in":"query","type":"string","enum":["ID","time_submitted","menu_order"],"description":"Set to any of ['ID', 'time_submitted', 'menu_order'] to define whether results should be ordered by any of these fields, or leave blank for default (menu_order).\n- `ID`: Sort by lead ID\n- `time_submitted`: Sort by submission timestamp\n- `menu_order`: Sort by manual ordering (default if not specified)\n"}],"responses":{"200":{"description":"An array of leads","schema":{"type":"array","items":{"type":"object","description":"A single lead, either an abandoned registration or a waiting list entry.\n","properties":{"submitted":{"type":"string","format":"date-time","description":"exact time when lead was submitted"},"lead_type":{"type":"string","enum":["abandoned-reg","wait-list"],"description":"type of lead"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"full_name":{"type":"string","description":"guest's full name"},"email":{"type":"string","format":"email","description":"guest's email"},"program":{"type":"string","description":"name of program for which the guest attempted to register"},"program_id":{"type":"integer","description":"id for the program"},"program_url":{"type":"string","format":"uri","description":"API URL for the program"},"program_categories":{"type":"array","description":"categories for the program"},"program_external_code":{"type":"string","description":"external code for the program (can be set up in the admin under Program / Advanced)"},"language":{"type":"string","description":"language code in which the registration was completed (i.e. en, fr, etc.)"},"program_link":{"type":"string","format":"uri","description":"link to program description page"},"registration_link":{"type":"string","format":"uri","description":"link to registration page"},"remote_registration_link":{"type":"string","format":"uri","description":"link to remote registration page"},"questions":{"type":"array","description":"an array of answers to all custom questions"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/leads?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/leads?token=0000\");\n$leads = json_decode($result);\nvar_dump($leads);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/leads?token=0000\")\nprint(result.json())\n"}]}},"/leads/create":{"post":{"tags":["Leads"],"summary":"Create a new lead","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"lead","in":"body","description":"The lead to update","schema":{"allOf":[{"$ref":"#/definitions/PostLead"},{"required":["program_id","lead_type","first_name","last_name","email"]}]}}],"responses":{"200":{"description":"A reference to the updated lead","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"403":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/leads/create?token=0000\" -d \"program_id=1&lead_type=wait-list&first_name=John\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'program_id' => 1,\n 'lead_type' => 'wait-list',\n 'first_name' => 'John',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/leads/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nresult = requests.post(\"https://secure.retreat.guru/api/v1/leads/create?token=0000\".format(id=id), data={\n 'program_id': 1,\n 'lead_type': 'wait-list',\n 'first_name': 'John',\n}, verify=False)\nprint(result.json())\n"}]}},"/leads/{id}/update":{"post":{"tags":["Leads"],"summary":"Update an existing lead","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"lead","in":"body","description":"The lead to update","schema":{"type":"object","description":"A lead record to update","properties":{"program_id":{"type":"integer","description":"the ID of the program associated with this waiting list / abandoned registration entry"},"lead_type":{"type":"string","description":"the type of lead to create (waiting list entry, or abandoned registration record)","enum":["wait-list","abandoned-reg"]},"first_name":{"type":"string","description":"lead first name"},"last_name":{"type":"string","description":"lead last name"},"email":{"type":"string","description":"email address"},"registration_id":{"type":"integer","description":"registration ID associated with the lead (if any)"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the registration and / or waiting list questions configured on your RG install."}}}}],"responses":{"200":{"description":"A reference to the updated lead","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"403":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/leads/$ID/update?token=0000\" -d \"first_name=Bill\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'first_name' => 'Bill',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/leads/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/leads/{id}/update?token=0000\".format(id=id), data={\n 'first_name': 'Bill',\n}, verify=False)\nprint(result.json())\n"}]}},"/leads/{id}/delete":{"delete":{"tags":["Leads"],"summary":"Delete an existing lead","description":"Removes a lead from the database","responses":{"200":{"description":"A reference to the deleted lead id","schema":{"type":"object","description":"A reference to the deleted id","properties":{"id":{"type":"integer","description":"id of the deleted object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"403":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X DELETE \"https://secure.retreat.guru/api/v1/leads/$ID/delete?token=0000\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$opts = array('http' => [\n 'method' => 'DELETE',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/leads/$id/delete?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.delete(\"https://secure.retreat.guru/api/v1/leads/{id}/delete?token=0000\".format(id=id))\nprint(result.json())\n"}]}},"/people":{"get":{"tags":["People"],"summary":"Get person information","description":"Retrieves person details including names, emails and registrations.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"email","in":"query","type":"string","description":"Filter person records returned by email. Email address must be properly formatted.\n"}],"responses":{"200":{"description":"An array of people or empty array if none found.","schema":{"type":"array","items":{"type":"object","description":"A single person returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"full_name":{"type":"string","description":"the person's full name"},"first_name":{"type":"string","description":"the person's first name"},"last_name":{"type":"string","description":"the person's last name"},"email":{"type":"string","format":"email","description":"person registered email"},"registered":{"type":"string","description":"date that the person was created in the system, in `YYYY-MM-DDTHH:MM:SS` format"},"questions":{"type":"array","items":{"type":"string"},"description":"lists all additional data for this person"}}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"Not found","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/people?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/people?token=0000\");\n$people = json_decode($result);\nvar_dump($people);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/people?token=0000\")\nprint(result.json())\n"}]}},"/people/create":{"post":{"tags":["People"],"summary":"Create a new person","description":"Saves new person details including names, emails and questions.\n","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"person","in":"body","description":"The person to create","schema":{"type":"object","description":"A person record to update","properties":{"first_name":{"type":"string","description":"person first name"},"last_name":{"type":"string","description":"person last name"},"email":{"type":"string","description":"email address"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the non registration custom questions configured on your RG install."}}}}],"responses":{"200":{"description":"A reference to the created person","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"403":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl -X POST \"https://secure.retreat.guru/api/v1/people/create?token=0000\" -d \"first_name=John\" -d \"last_name=Doe\"\n"},{"lang":"PHP","source":"$postdata = http_build_query([\n 'first_name' => 'John',\n 'last_name' => 'Doe',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/people/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/people/create?token=0000\".format(id=id), data={\n 'first_name': 'John',\n 'last_name': 'Doe',\n}, verify=False)\nprint(result.json())\n"}]}},"/people/{id}/update":{"post":{"tags":["People"],"summary":"Update an existing person","description":"Updates person identified by ID\n","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"person","in":"body","description":"The person to update","schema":{"type":"object","description":"A person record to update","properties":{"first_name":{"type":"string","description":"person first name"},"last_name":{"type":"string","description":"person last name"},"email":{"type":"string","description":"email address"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the non registration custom questions configured on your RG install."}}}}],"responses":{"200":{"description":"A reference to the updated person","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"400":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"403":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"404":{"description":"An error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/people/$ID/update?token=0000\" -d \"first_name=John\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'first_name' => 'John',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/people/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/people/{id}/update?token=0000\".format(id=id), data={\n 'first_name': 'John',\n}, verify=False)\nprint(result.json())\n"}]}},"/rentals":{"get":{"tags":["Rentals"],"summary":"Get rental information","description":"Retrieves rentals details including blocked rooms, blocked venues, quote proposal and rental invoice.\nRentals endpoints require a separate feature enablement.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},{"name":"status","in":"query","type":"array","items":{"type":"string"},"description":"Filter rentals by their status slug. Comma-separated multiple options are supported. e.g. `&status=lead,evaluating`\n"},{"name":"start_date","in":"query","type":"string","format":"date","description":"Filter by event start date. When provided alone, finds rentals with that start date.\nWhen provided in combination with `end_date` will be the min value for the date range inclusive.\n"},{"name":"end_date","in":"query","type":"string","format":"date","description":"Filter by event end date. When provided alone, finds rentals with that end date.\nWhen provided in combination with `start_date` will be the max value for the date range inclusive.\n"},{"name":"min_inquiry_date","in":"query","type":"string","format":"date","description":"Filter rentals created on or after this date.\n"},{"name":"max_inquiry_date","in":"query","type":"string","format":"date","description":"Filter rentals created on or before this date.\n"},{"name":"timeline","in":"query","type":"array","items":{"type":"string"},"description":"Filter rentals based on their start date being in the past, current or future.\nComma-separated input is supported. e.g. `&timeline=current,future`\nValid entries: `past`, `current`, `future`\n"}],"responses":{"200":{"description":"An array of rentals or empty array if none found.","schema":{"type":"array","items":{"type":"object","description":"A single rental returned for a query","properties":{"id":{"type":"integer","x-nullable":true,"readOnly":true,"description":"internal unique id","example":12},"hash":{"type":"string","x-nullable":true,"readOnly":true,"description":"unique hash for the rental instance"},"name":{"type":"string","description":"name of the rental instance"},"created_at":{"type":"string","x-nullable":true,"readOnly":true,"format":"date","description":"date the rental instance was created"},"date_start":{"type":"string","x-nullable":true,"format":"date","description":"rental start date"},"date_end":{"type":"string","x-nullable":true,"format":"date","description":"rental end date"},"contact_email":{"type":"string","x-nullable":true,"format":"email","description":"email address for the specific rental instance"},"status":{"type":"object","$ref":"#/definitions/RentalStatus"},"organization":{"type":"object","$ref":"#/definitions/Organization"},"contact":{"type":"object","$ref":"#/definitions/RentalContact"},"quote":{"type":"object","$ref":"#/definitions/RentalQuote"},"agreements":{"type":"array","items":{"$ref":"#/definitions/RentalAgreement"}},"program":{"type":"object","$ref":"#/definitions/RentalProgram"},"template_program":{"type":"object","$ref":"#/definitions/RentalTemplateProgram"},"invoice":{"type":"object","$ref":"#/definitions/RentalInvoice"},"room_block":{"type":"object","$ref":"#/definitions/RoomBlock"},"venues":{"type":"array","items":{"$ref":"#/definitions/RentalVenue"}},"custom_fields":{"type":"object","$ref":"#/definitions/RentalCustomFieldsValues"},"rental_conversion_options":{"type":"object","$ref":"#/definitions/RentalConversionOptions"},"tasks":{"type":"array","items":{"$ref":"#/definitions/SlugAndName"}},"is_trashed":{"type":"boolean","readOnly":true}}}}},"404":{"description":"Not found","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"422":{"description":"Request parameters error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/rentals?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/rentals?token=0000\");\n$rentals = json_decode($result);\nvar_dump($rentals);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/rentals?token=0000\")\nprint(result.json())\n"}]}},"/rentals/create":{"post":{"tags":["Rentals"],"summary":"Create a new rental","description":"Saves new rental details.\n","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"rental","in":"body","description":"The rental to create","schema":{"type":"object","description":"A single rental returned for a query","properties":{"id":{"type":"integer","x-nullable":true,"readOnly":true,"description":"internal unique id","example":12},"hash":{"type":"string","x-nullable":true,"readOnly":true,"description":"unique hash for the rental instance"},"name":{"type":"string","description":"name of the rental instance"},"created_at":{"type":"string","x-nullable":true,"readOnly":true,"format":"date","description":"date the rental instance was created"},"date_start":{"type":"string","x-nullable":true,"format":"date","description":"rental start date"},"date_end":{"type":"string","x-nullable":true,"format":"date","description":"rental end date"},"contact_email":{"type":"string","x-nullable":true,"format":"email","description":"email address for the specific rental instance"},"status":{"type":"object","$ref":"#/definitions/RentalStatus"},"organization":{"type":"object","$ref":"#/definitions/Organization"},"contact":{"type":"object","$ref":"#/definitions/RentalContact"},"quote":{"type":"object","$ref":"#/definitions/RentalQuote"},"agreements":{"type":"array","items":{"$ref":"#/definitions/RentalAgreement"}},"program":{"type":"object","$ref":"#/definitions/RentalProgram"},"template_program":{"type":"object","$ref":"#/definitions/RentalTemplateProgram"},"invoice":{"type":"object","$ref":"#/definitions/RentalInvoice"},"room_block":{"type":"object","$ref":"#/definitions/RoomBlock"},"venues":{"type":"array","items":{"$ref":"#/definitions/RentalVenue"}},"custom_fields":{"type":"object","$ref":"#/definitions/RentalCustomFieldsValues"},"rental_conversion_options":{"type":"object","$ref":"#/definitions/RentalConversionOptions"},"tasks":{"type":"array","items":{"$ref":"#/definitions/SlugAndName"}},"is_trashed":{"type":"boolean","readOnly":true}}}}],"responses":{"200":{"description":"A reference to the created rental","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"422":{"description":"A validation error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Authorization error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Not found error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"415":{"description":"Invalid content type error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"500":{"description":"Server error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}}},"x-code-samples":[{"lang":"Shell","source":"curl -X POST \"https://secure.retreat.guru/api/v1/rentals/create?token=0000\" -d \"name=Our Event\" -d \"date_start=2024-12-24\" \"date_end=2024-12-25\"\n"},{"lang":"PHP","source":"$postdata = http_build_query([\n 'name' => 'Our Event',\n 'date_start' => '2024-12-24',\n 'date_end' => '2024-12-25',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/rentals/create?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/rentals/create?token=0000\".format(id=id), data={\n 'name': 'Our event',\n 'date_start': '2024-12-24',\n 'date_end': '2024-12-25',\n}, verify=False)\nprint(result.json())\n"}]}},"/rentals/{id}/update":{"post":{"tags":["Rentals"],"summary":"Update rental","description":"Updates existing rental details.\n","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"rental","in":"body","description":"The rental to update","schema":{"type":"object","description":"A single rental returned for a query","properties":{"id":{"type":"integer","x-nullable":true,"readOnly":true,"description":"internal unique id","example":12},"hash":{"type":"string","x-nullable":true,"readOnly":true,"description":"unique hash for the rental instance"},"name":{"type":"string","description":"name of the rental instance"},"created_at":{"type":"string","x-nullable":true,"readOnly":true,"format":"date","description":"date the rental instance was created"},"date_start":{"type":"string","x-nullable":true,"format":"date","description":"rental start date"},"date_end":{"type":"string","x-nullable":true,"format":"date","description":"rental end date"},"contact_email":{"type":"string","x-nullable":true,"format":"email","description":"email address for the specific rental instance"},"status":{"type":"object","$ref":"#/definitions/RentalStatus"},"organization":{"type":"object","$ref":"#/definitions/Organization"},"contact":{"type":"object","$ref":"#/definitions/RentalContact"},"quote":{"type":"object","$ref":"#/definitions/RentalQuote"},"agreements":{"type":"array","items":{"$ref":"#/definitions/RentalAgreement"}},"program":{"type":"object","$ref":"#/definitions/RentalProgram"},"template_program":{"type":"object","$ref":"#/definitions/RentalTemplateProgram"},"invoice":{"type":"object","$ref":"#/definitions/RentalInvoice"},"room_block":{"type":"object","$ref":"#/definitions/RoomBlock"},"venues":{"type":"array","items":{"$ref":"#/definitions/RentalVenue"}},"custom_fields":{"type":"object","$ref":"#/definitions/RentalCustomFieldsValues"},"rental_conversion_options":{"type":"object","$ref":"#/definitions/RentalConversionOptions"},"tasks":{"type":"array","items":{"$ref":"#/definitions/SlugAndName"}},"is_trashed":{"type":"boolean","readOnly":true}}}}],"responses":{"200":{"description":"A reference to the updated rental","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"422":{"description":"A validation error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Authorization error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Not found error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"415":{"description":"Invalid content type error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}},"500":{"description":"Server error","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/rentals/$ID/update?token=0000\" -d \"name=Our Event\" -d \"date_start=2024-12-23\" \"date_end=2024-12-25\"\n"},{"lang":"PHP","source":"$id = 1;\n\n$postdata = http_build_query([\n 'name' => 'Our Event',\n 'date_start' => '2024-12-23',\n 'date_end' => '2024-12-25',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/rentals/$id/update?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/rentals/{id}/update?token=0000\".format(id=id), data={\n 'name': 'Our event',\n 'date_start': '2024-12-24',\n 'date_end': '2024-12-25',\n}, verify=False)\nprint(result.json())\n"}]}},"/rooms":{"get":{"tags":["Rooms"],"summary":"Get room information","description":"Retrieves room details.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"}],"responses":{"200":{"description":"An array of rooms or empty array if none found.","schema":{"type":"array","items":{"type":"object","description":"A single room returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"name":{"type":"string"},"room_status":{"type":"object","$ref":"#/definitions/SlugAndName"},"status_admin_note":{"type":"string","x-nullable":true}}}}},"default":{"description":"Unexpected error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"curl \"https://secure.retreat.guru/api/v1/rooms?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/rooms?token=0000\");\n$rooms = json_decode($result);\nvar_dump($rooms);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/rooms?token=0000\")\nprint(result.json())\n"}]}},"/rooms/{id}/room_status":{"post":{"tags":["Rooms"],"summary":"Update room status","description":"Updates room status for the specified room.\n","consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"room","in":"body","description":"The room status data to update.","schema":{"type":"object","description":"Room status payload for status updates","required":["room_status"],"properties":{"id":{"type":"integer","description":"Optional id field. If provided, it must match the path id."},"room_status":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","enum":["clean","vacant-dirty","repair","occupied"],"description":"Room status slug."}}},"status_admin_note":{"type":"string","x-nullable":true,"description":"Optional admin note saved with the room status change."}}}}],"responses":{"200":{"description":"A reference to the updated room","schema":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}}},"404":{"description":"Not found","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"415":{"description":"Invalid content type","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}},"422":{"description":"Validation error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"Shell","source":"ID=1\ncurl -X POST \"https://secure.retreat.guru/api/v1/rooms/$ID/room_status?token=0000\" -d \"room_status[slug]=repair\" -d \"status_admin_note=Broken sink\"\n"},{"lang":"PHP","source":"$id = 1;\n$postdata = http_build_query([\n 'room_status' => [\n 'slug' => 'repair',\n ],\n 'status_admin_note' => 'Broken sink',\n]);\n\n$opts = array('http' => [\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata,\n 'ignore_errors' => true,\n]);\n\n$context = stream_context_create($opts);\n$result = file_get_contents(\"https://secure.retreat.guru/api/v1/rooms/$id/room_status?token=0000\", false, $context);\n$result = json_decode($result);\nvar_dump($result);\n"},{"lang":"Python","source":"import requests\nid = 1\nresult = requests.post(\"https://secure.retreat.guru/api/v1/rooms/{id}/room_status?token=0000\".format(id=id), data={\n 'room_status[slug]': 'repair',\n 'status_admin_note': 'Broken sink',\n}, verify=False)\nprint(result.json())\n"}]}},"/room_blocks":{"get":{"tags":["Room Blocks"],"summary":"Get room block information","description":"Retrieves room blocks details including blocked rooms and lodging assignments.\n","parameters":[{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},{"name":"start_date","in":"query","type":"string","format":"date","description":"Filter results that start on or after this date.\n"},{"name":"end_date","in":"query","type":"string","format":"date","description":"Filter results that end on or before this date.\n"},{"name":"block_type","in":"query","type":"string","enum":["standard","restrict","whitelist"],"description":"Filter room blocks by type. Supported values are `standard`, `restrict`, and `whitelist`.\n"},{"name":"room_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter room blocks for a specific room or rooms. To match multiple rooms provide a comma separated list of ids.\n"},{"name":"display_lodging_id","in":"query","type":"integer","description":"Include rooms that default to the specified lodging when filtering room blocks.\n"},{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"}],"produces":["application/json"],"responses":{"200":{"description":"List of room blocks","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":6},"name":{"type":"string","x-nullable":true,"readOnly":true},"description":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true,"format":"date","description":"block start date"},"end_date":{"type":"string","x-nullable":true,"format":"date","description":"block end date"},"date_type":{"type":"object","$ref":"#/definitions/SlugAndName"},"lodgings":{"type":"array","items":{"$ref":"#/definitions/RoomBlockLodging"}}}}}},"default":{"description":"Unexpected error","schema":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}}}},"x-code-samples":[{"lang":"cURL","source":"curl \"https://secure.retreat.guru/api/v1/room_blocks?token=0000\"\n"},{"lang":"PHP","source":"$result = file_get_contents(\"https://secure.retreat.guru/api/v1/room_blocks?token=0000\");\n$room_blocks = json_decode($result);\nvar_dump($room_blocks);\n"},{"lang":"Python","source":"import requests\nresult = requests.get(\"https://secure.retreat.guru/api/v1/room_blocks?token=0000\")\nprint(result.json())\n"}]}}},"parameters":{"page":{"name":"page","in":"query","type":"integer","description":"Get further pages of results. By default the first `limit` results is returned, to get further results\npass higher values to `page`. When a page is higher than available data the request will return an empty JSON array.\n"},"id":{"name":"id","in":"query","type":"array","items":{"type":"integer"},"description":"Get instances with a specific id or list of ids. To get multiple objects, provide a comma separated list of values.\n"},"limit":{"name":"limit","in":"query","type":"integer","description":"Limit number of return values. The default limit is 20. Pass `limit=0` To get all the objects without\nlimits, but please use this with caution to not overload our servers.\n"},"room_id":{"name":"room_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter room blocks for a specific room or rooms. To match multiple rooms provide a comma separated list of ids.\n"},"block_type":{"name":"block_type","in":"query","type":"string","enum":["standard","restrict","whitelist"],"description":"Filter room blocks by type. Supported values are `standard`, `restrict`, and `whitelist`.\n"},"display_lodging_id":{"name":"display_lodging_id","in":"query","type":"integer","description":"Include rooms that default to the specified lodging when filtering room blocks.\n"},"email":{"name":"email","in":"query","type":"string","description":"Filter person records returned by email. Email address must be properly formatted.\n"},"lang":{"name":"lang","in":"query","type":"string","description":"Get the content for a particular language. The language values are two-letter identifiers from\n[ISO 639-1](http://www.loc.gov/standards/iso639-2/php/code_list.php).\nOnly the languages that are enabled for your install will work. The default language is `en` (English).\n"},"transaction_program_id":{"name":"program_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific program or programs (for multiple programs supply a comma separated list of ids).\n"},"transaction_person_id":{"name":"person_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter \"personal credit\" transactions for a specific person or people (for multiple people supply a comma separated list of ids).\n"},"transaction_registration_id":{"name":"registration_id","in":"query","type":"array","items":{"type":"integer"},"description":"Filter transactions for a specific registration or registrations.\n"},"transaction_min_date":{"name":"min_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or after this date.\n"},"transaction_max_date":{"name":"max_date","in":"query","type":"string","format":"date","description":"Filter transactions that were submitted on or before this date.\n"},"transaction_category":{"name":"category","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by category. Categories are user defined and can be very specific.\n"},"transaction_class":{"name":"class","in":"query","type":"array","items":{"type":"string"},"description":"Filter transactions by class. Classes are hard coded and segment transaction into 8 broad categories:\n\n * `item` - an item the guest needs to pay for\n * `discount` - a discount the guest has received\n * `card-payment` - a credit card payment\n * `card-refund` - a credit card refund\n * `non-cc-payment` - a non credit card payment (cash, wire transfer, etc)\n * `non-cc-refund` - a non credit card refund\n * `person-credit` - personal credit was added for the guest\n * `person-debit` - personal credit was used for payment\n"},"start_date":{"name":"start_date","in":"query","type":"string","format":"date","description":"Filter results that start on or after this date.\n"},"end_date":{"name":"end_date","in":"query","type":"string","format":"date","description":"Filter results that end on or before this date.\n"},"rental_status":{"name":"status","in":"query","type":"array","items":{"type":"string"},"description":"Filter rentals by their status slug. Comma-separated multiple options are supported. e.g. `&status=lead,evaluating`\n"},"rental_start_date":{"name":"start_date","in":"query","type":"string","format":"date","description":"Filter by event start date. When provided alone, finds rentals with that start date.\nWhen provided in combination with `end_date` will be the min value for the date range inclusive.\n"},"rental_end_date":{"name":"end_date","in":"query","type":"string","format":"date","description":"Filter by event end date. When provided alone, finds rentals with that end date.\nWhen provided in combination with `start_date` will be the max value for the date range inclusive.\n"},"rental_min_inquiry_date":{"name":"min_inquiry_date","in":"query","type":"string","format":"date","description":"Filter rentals created on or after this date.\n"},"rental_max_inquiry_date":{"name":"max_inquiry_date","in":"query","type":"string","format":"date","description":"Filter rentals created on or before this date.\n"},"rental_timeline":{"name":"timeline","in":"query","type":"array","items":{"type":"string"},"description":"Filter rentals based on their start date being in the past, current or future.\nComma-separated input is supported. e.g. `&timeline=current,future`\nValid entries: `past`, `current`, `future`\n"}},"definitions":{"Person":{"type":"object","description":"A single person returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"full_name":{"type":"string","description":"the person's full name"},"first_name":{"type":"string","description":"the person's first name"},"last_name":{"type":"string","description":"the person's last name"},"email":{"type":"string","format":"email","description":"person registered email"},"registered":{"type":"string","description":"date that the person was created in the system, in `YYYY-MM-DDTHH:MM:SS` format"},"questions":{"type":"array","items":{"type":"string"},"description":"lists all additional data for this person"}}},"Program":{"type":"object","description":"A single program returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"always program"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"program name"},"name_no_analzyer":{"type":"string","description":"normalized program name"},"excerpt":{"type":"string","description":"program listing excerpt"},"content":{"type":"string","description":"program description"},"date_type":{"type":"string","description":"Type of date in affect for the program, will be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default)\n * `package` - registration start date is flexibile but the length is not\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"registration_open_date":{"type":"string","format":"date","description":"program registration opening date"},"package_nights":{"type":"integer","description":"fixed length of the program"},"package_exclude_days":{"description":"days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat","type":"array","items":{"type":"string"}},"public":{"type":"boolean","description":"is the programs listed publicly (controlled by the \"Remove from public listings\" setting for a program)"},"program_type":{"type":"string","description":"will be either `program` or `rental`"},"status":{"type":"string","description":"status of the program or the rental"},"post_status":{"type":"string","description":"post status of the submission"},"program_registration_status":{"type":"string","description":"registration status of the program 'open', 'closed' etc."},"registrations_url":{"type":"string","format":"uri","description":"API URL for program registrations"},"transactions_url":{"type":"string","format":"uri","description":"API URL for all program transactions (includes payments and items)"},"payments_url":{"type":"string","format":"uri","description":"API URL for program payments"},"items_url":{"type":"string","format":"uri","description":"API URL for program items"},"teachers":{"type":"array","items":{"type":"string"},"description":"teacher names for the program (if `['include' => ['teachers']]` specified in request)"},"teachers_url":{"type":"string","format":"uri","description":"API URL for program teachers"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL for all venue uses for this program"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"notes":{"type":"array","items":{"type":"array"},"description":"program notes as name-value pairs"},"tasks":{"type":"array","items":{"type":"string"},"description":"slugs for the tasks assigned to the program"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"program_link":{"type":"string","format":"uri","description":"URL of public program info page"},"registration_link":{"type":"string","format":"uri","description":"URL of public registration page for program"},"remote_registration_link":{"type":"string","format":"uri","description":"link to remote registration page"},"reg_external_url":{"type":"string","format":"uri","description":"External URL for program registration (overrides default registration page)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"admin_link":{"type":"string","format":"uri","description":"link to admin program edit page"},"location":{"type":"string","description":"program location"},"address":{"type":"string","description":"program location address"},"program_has_capacity":{"description":"returns true if the program has spaces available for bookings","type":"boolean"},"available_spaces":{"description":"number of program spaces available for bookings","type":"integer"},"images":{"type":"array","items":{"type":"array"},"description":"info about program images including urls and sizes"},"waitlist_enabled":{"description":"returns true if the program waitlist is set to enabled","type":"boolean"},"pricing_type":{"type":"string","description":"Type of pricing in affect for the program, will be one of the following:\n\n * `tiered` - simple, multiple pricing\n * `lodging` - lodging based pricing\n * `special` - free, custom pricing\n * `suggested-donation` - suggested donation\n * `sliding-scale` - sliding scale pricing\n"},"pricing_options":{"description":"available pricing options for the type (currently only shows for `tiered` pricing)","type":"array"},"program_info":{"type":"array","description":"Program information fields including:\n * datetime_title\n * datetime_details\n * location_title\n * location\n * location_address_title\n * location_address\n * contact_title\n * contact_name\n * contact_email\n * contact_phone\n * alternate_url\n * extra_display_fields\n * show_location_name\n * show_address\n"},"hide_from_marketplace":{"type":"integer","description":"0 or 1 to enable or disable copying to the marketplace."},"deposit_percentage":{"type":"integer","description":"percentage of program cost required as deposit (50 is 50%)"},"max_capacity":{"description":"program is limited to this number of registrations - empty means no limit.","type":"integer"},"currency":{"description":"currency of the prices being displayed","type":"string"},"online_event_page_link":{"description":"link to the program's online landing page.","format":"uri","type":"string"},"is_online":{"description":"returns true if online landing page is enabled for this program or the program name indicates it is an online program","type":"boolean"},"updated_at_local_time":{"type":"string","format":"time","description":"local time the program was last updated"},"updated_at_gmt":{"type":"string","format":"time","description":"gmt time the program was last updated"}}},"PostProgram":{"type":"object","description":"A single program to create or update","properties":{"name":{"type":"string","description":"program name"},"date_type":{"type":"string","description":"Sets the way dates are handled for program registrations, must be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default). requires start_date and end_date to also be set\n * `package` - registration start date is flexibile but the length is not. requires package_nights to also be set\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"package_nights":{"type":"integer","description":"set the length of the program, use together with date_type set to `package`"},"package_exclude_days":{"type":"array","description":"set days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat"},"content":{"type":"string","format":"html","description":"description content for the program (supports HTML)"},"image_url":{"type":"string","format":"url","description":"URL of a remote image file to grab for the featured image (use sparingly and only when an image is being changed)."},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the program from the marketplace"},"pricing_type":{"type":"string","enum":["tiered"],"description":"the type of pricing to use (currently only `tiered` is supported)"},"pricing_options":{"type":"array","items":{"type":"array"},"description":"array of pricing options in `['price' => '0.00', 'description' => '']` format"},"post_departure_email_type":{"type":"string","enum":["standard","disabled"],"description":"the type of post departure email to use.\n"},"max_capacity":{"type":"integer","description":"limit registration to this number of people"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"public":{"type":"boolean","description":"set to false to hide program from public listings"},"teacher_ids":{"type":"string","description":"list of teacher ids for this program, separated by commas"}}},"PostPerson":{"type":"object","description":"A person record to update","properties":{"first_name":{"type":"string","description":"person first name"},"last_name":{"type":"string","description":"person last name"},"email":{"type":"string","description":"email address"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the non registration custom questions configured on your RG install."}}},"CreateLead":{"allOf":[{"type":"object","description":"A lead record to update","properties":{"program_id":{"type":"integer","description":"the ID of the program associated with this waiting list / abandoned registration entry"},"lead_type":{"type":"string","description":"the type of lead to create (waiting list entry, or abandoned registration record)","enum":["wait-list","abandoned-reg"]},"first_name":{"type":"string","description":"lead first name"},"last_name":{"type":"string","description":"lead last name"},"email":{"type":"string","description":"email address"},"registration_id":{"type":"integer","description":"registration ID associated with the lead (if any)"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the registration and / or waiting list questions configured on your RG install."}}},{"required":["program_id","lead_type","first_name","last_name","email"]}]},"PostLead":{"type":"object","description":"A lead record to update","properties":{"program_id":{"type":"integer","description":"the ID of the program associated with this waiting list / abandoned registration entry"},"lead_type":{"type":"string","description":"the type of lead to create (waiting list entry, or abandoned registration record)","enum":["wait-list","abandoned-reg"]},"first_name":{"type":"string","description":"lead first name"},"last_name":{"type":"string","description":"lead last name"},"email":{"type":"string","description":"email address"},"registration_id":{"type":"integer","description":"registration ID associated with the lead (if any)"},"questions":{"type":"array","items":{"type":"string"},"description":"an array of key value pairs for the registration and / or waiting list questions configured on your RG install."}}},"Teacher":{"type":"object","description":"A single teacher","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"teacher name"},"email":{"type":"string","description":"teacher email"},"content":{"type":"string","description":"teacher description"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the teacher belongs to (array of category slugs)"},"hide_from_marketplace":{"type":"boolean","description":"If true, hide the teacher information on the marketplace"},"programs_url":{"type":"string","format":"uri","description":"API URL for the teacher's programs"},"images":{"type":"array","items":{"type":"array"},"description":"info about teacher images including urls and sizes"},"website":{"type":"string","items":{"type":"string"},"description":"teacher personal website as entered in their teacher bio"},"phone":{"type":"string","items":{"type":"string"},"description":"teacher phone number"},"location":{"type":"string","items":{"type":"string"},"description":"teacher location"},"post_status":{"type":"string","items":{"type":"string"},"description":"teacher post status"},"video_url":{"type":"string","items":{"type":"string"},"description":"teacher video url"},"tags":{"type":"string","items":{"type":"string"},"description":"tags that describe the teachers style and retreat content"}}},"Lodging":{"type":"object","description":"A single lodging","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"type of content"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"name of lodging"},"description":{"type":"string","description":"lodging description"},"occupancy_type":{"type":"string","description":"type of lodging, either shared or hotel"},"max_occupancy":{"type":"integer","description":"maximum number of occupants allowed"},"base_price":{"type":"number","description":"base price of the lodging (see pricing_options for the program price)"},"images":{"type":"array","description":"info about lodging images including urls and sizes"}}},"Venue":{"type":"object","description":"A single venue","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"venue name"},"notes":{"type":"string","description":"notes attached to the venue"},"capacity":{"type":"integer","description":"maximum capacity for the venue"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve `VenueUse` objects for this venue"}}},"VenueUse":{"type":"object","description":"A program booking for a venue","properties":{"id":{"type":"integer","description":"unique identifier for this venue use entry"},"program_id":{"type":"integer","description":"unique identifier for the program for this booking"},"program_name":{"type":"string","description":"the name of the program for this booking"},"program_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve program object for current booking"},"venue_id":{"type":"integer","description":"unique identifier for the venue_id"},"venue_name":{"type":"string","description":"the name of the venue for this booking"},"venue_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve venue object for current booking"},"venue":{"type":"object","description":"A single venue","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"venue name"},"notes":{"type":"string","description":"notes attached to the venue"},"capacity":{"type":"integer","description":"maximum capacity for the venue"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL pointing to retrieve `VenueUse` objects for this venue"}}},"program":{"type":"object","description":"A single program returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"always program"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"name":{"type":"string","description":"program name"},"name_no_analzyer":{"type":"string","description":"normalized program name"},"excerpt":{"type":"string","description":"program listing excerpt"},"content":{"type":"string","description":"program description"},"date_type":{"type":"string","description":"Type of date in affect for the program, will be one of the following:\n\n * `fixed` - program has a fixed start and end date (the default)\n * `package` - registration start date is flexibile but the length is not\n * `hotel` - registration dates are flexible (like booking at a hotel)\n * `dateless` - no dates, often used for online programs\n"},"start_date":{"type":"string","format":"date","description":"program start date"},"end_date":{"type":"string","format":"date","description":"program end date"},"list_until_date":{"type":"string","format":"date","description":"program registration end date"},"registration_open_date":{"type":"string","format":"date","description":"program registration opening date"},"package_nights":{"type":"integer","description":"fixed length of the program"},"package_exclude_days":{"description":"days of the week program cannot start - one of sun, mon, tue, wed, thu, fri, sat","type":"array","items":{"type":"string"}},"public":{"type":"boolean","description":"is the programs listed publicly (controlled by the \"Remove from public listings\" setting for a program)"},"program_type":{"type":"string","description":"will be either `program` or `rental`"},"status":{"type":"string","description":"status of the program or the rental"},"post_status":{"type":"string","description":"post status of the submission"},"program_registration_status":{"type":"string","description":"registration status of the program 'open', 'closed' etc."},"registrations_url":{"type":"string","format":"uri","description":"API URL for program registrations"},"transactions_url":{"type":"string","format":"uri","description":"API URL for all program transactions (includes payments and items)"},"payments_url":{"type":"string","format":"uri","description":"API URL for program payments"},"items_url":{"type":"string","format":"uri","description":"API URL for program items"},"teachers":{"type":"array","items":{"type":"string"},"description":"teacher names for the program (if `['include' => ['teachers']]` specified in request)"},"teachers_url":{"type":"string","format":"uri","description":"API URL for program teachers"},"venue_uses_url":{"type":"string","format":"uri","description":"API URL for all venue uses for this program"},"categories":{"type":"array","items":{"type":"string"},"description":"categories the program belongs to"},"notes":{"type":"array","items":{"type":"array"},"description":"program notes as name-value pairs"},"tasks":{"type":"array","items":{"type":"string"},"description":"slugs for the tasks assigned to the program"},"external_code":{"type":"string","description":"custom program code for linking with other software (entered manually in admin interface)"},"program_link":{"type":"string","format":"uri","description":"URL of public program info page"},"registration_link":{"type":"string","format":"uri","description":"URL of public registration page for program"},"remote_registration_link":{"type":"string","format":"uri","description":"link to remote registration page"},"reg_external_url":{"type":"string","format":"uri","description":"External URL for program registration (overrides default registration page)"},"custom_thank_you_url":{"type":"string","format":"uri","description":"Custom thank you page URL to redirect to after registration completion"},"custom_thank_you_go_direct":{"type":"boolean","description":"When true, redirects directly to custom_thank_you_url instead of showing default thank you page"},"admin_link":{"type":"string","format":"uri","description":"link to admin program edit page"},"location":{"type":"string","description":"program location"},"address":{"type":"string","description":"program location address"},"program_has_capacity":{"description":"returns true if the program has spaces available for bookings","type":"boolean"},"available_spaces":{"description":"number of program spaces available for bookings","type":"integer"},"images":{"type":"array","items":{"type":"array"},"description":"info about program images including urls and sizes"},"waitlist_enabled":{"description":"returns true if the program waitlist is set to enabled","type":"boolean"},"pricing_type":{"type":"string","description":"Type of pricing in affect for the program, will be one of the following:\n\n * `tiered` - simple, multiple pricing\n * `lodging` - lodging based pricing\n * `special` - free, custom pricing\n * `suggested-donation` - suggested donation\n * `sliding-scale` - sliding scale pricing\n"},"pricing_options":{"description":"available pricing options for the type (currently only shows for `tiered` pricing)","type":"array"},"program_info":{"type":"array","description":"Program information fields including:\n * datetime_title\n * datetime_details\n * location_title\n * location\n * location_address_title\n * location_address\n * contact_title\n * contact_name\n * contact_email\n * contact_phone\n * alternate_url\n * extra_display_fields\n * show_location_name\n * show_address\n"},"hide_from_marketplace":{"type":"integer","description":"0 or 1 to enable or disable copying to the marketplace."},"deposit_percentage":{"type":"integer","description":"percentage of program cost required as deposit (50 is 50%)"},"max_capacity":{"description":"program is limited to this number of registrations - empty means no limit.","type":"integer"},"currency":{"description":"currency of the prices being displayed","type":"string"},"online_event_page_link":{"description":"link to the program's online landing page.","format":"uri","type":"string"},"is_online":{"description":"returns true if online landing page is enabled for this program or the program name indicates it is an online program","type":"boolean"},"updated_at_local_time":{"type":"string","format":"time","description":"local time the program was last updated"},"updated_at_gmt":{"type":"string","format":"time","description":"gmt time the program was last updated"}}},"custom_dates":{"type":"boolean","description":"whether to use custom dates for this booking or the existing program dates"},"start_date":{"type":"string","format":"date-time","description":"the start date of the current booking","example":"2019-08-24T00:00:00Z"},"end_date":{"type":"string","format":"date-time","description":"the end date of the current booking","example":"2019-08-26T00:00:00Z"},"daily_start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$","description":"the daily start time of the current booking","x-nullable":true,"example":"13:00:00"},"daily_end_time":{"type":"string","pattern":"^\\d{2}:\\d{2}:\\d{2}$","description":"the daily end time of the current booking","x-nullable":true,"example":"15:00:00"},"notes":{"type":"string","description":"additional notes for this venue booking"}}},"Registration":{"type":"object","description":"A single registration returned from a query","properties":{"id":{"type":"integer","description":"internal unique id"},"type":{"type":"string","description":"always registration"},"self_url":{"type":"string","description":"API URL pointing back to the object","format":"uri"},"submitted":{"type":"string","description":"time the registration was submitted","format":"date-time"},"last_update":{"type":"string","description":"time the registration was last changed, in the site's local time","format":"date-time"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"guest_type":{"type":"string","enum":["participant","program-staff","center-staff","volunteer","child","other","..."],"description":"guest type (the list can be customized in the admin, any slug set there can appear here)"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"full_name":{"type":"string","description":"guest's full name"},"email":{"type":"string","format":"email","description":"guest's email address"},"program":{"type":"string","description":"name of program the registration is for"},"program_id":{"type":"integer","description":"id for the program"},"program_url":{"type":"string","format":"uri","description":"URL for API representation of program"},"program_categories":{"type":"array","items":{"type":"string"},"description":"categories for the program"},"program_external_code":{"type":"string","description":"external code for the program (can be set up in the admin under Program / Advanced)"},"transactions_url":{"type":"string","format":"uri","description":"API URL for all registration's transactions"},"payments_url":{"type":"string","format":"uri","description":"API URL for registration's item transactions"},"items_url":{"type":"string","format":"uri","description":"API URL for registration's payment transactions"},"optional_items":{"type":"array","items":{"type":"string"},"description":"optional items (add-ons) selected for the registration"},"room_id":{"type":"integer","description":"the id of the room object associated with this registration"},"room":{"type":"string","description":"name of room guest will be staying in"},"lodging_id":{"type":"integer","description":"the id of the lodging object associated with this registration"},"lodging":{"type":"string","description":"name of lodging type selected"},"nights":{"type":"integer","description":"total nights of stay"},"person_id":{"type":"integer","description":"the id of the Person object associated with this registration"},"person_url":{"type":"string","format":"uri","description":"API URL for registration's person record"},"parent_registration_id":{"type":"integer","description":"the parent registration id (if this registration is a member of group)"},"parent_registration_url":{"type":"string","format":"uri","description":"API URL for the parent registration object (if this registration is a member of group)"},"sub_registration_ids":{"type":"array","items":{"type":"integer"},"description":"an array of IDs of child registrations of this registration"},"guest_statement_link":{"type":"string","format":"uri","description":"link to the (user-facing) guest statement"},"guest_edit_link":{"type":"string","format":"uri","description":"Deprecated - use registration_form_questions_link."},"registration_form_questions_link":{"type":"string","format":"uri","description":"link to registration form questions(where a guest can update their details)"},"admin_link":{"type":"string","format":"uri","description":"link to admin registration edit page"},"total_items":{"type":"number","description":"total amount of the registration's items"},"total_payments":{"type":"number","description":"total amount of the registration's payments"},"total_taxes":{"type":"number","description":"total amount of the registration's taxes"},"grand_total":{"type":"number","description":"total amount owed for the registration's guest statement"},"balance_due":{"type":"number","description":"current balance"},"registration_total":{"type":"number","description":"total of items and discounts originating from this registration, regardless of whether present on this registration's guest statement"},"secondary_form_questions_link":{"type":"string","format":"uri","description":"link to secondary form questions if applicable to program"},"online_event_page_link":{"type":"string","format":"uri","description":"link to the online landing page specific to this registration."},"questions":{"type":"array","description":"an array of all the custom fields that have been configured for the program for which this registration was entered"}}},"PostRegistration":{"type":"object","description":"A single registration to create or update","properties":{"program_id":{"type":"integer","description":"id for the program"},"person_id":{"type":"integer","description":"person id to associate with the registration"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"email":{"type":"string","format":"email","description":"guest's email address"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"guest_type":{"type":"string","enum":["participant","program-staff","center-staff","volunteer","child","other","..."],"description":"guest type (the list can be customized in the admin, any slug set there will work here)"},"pricing_option":{"type":"number","description":"the selected price option (or the lodging id for lodging-priced programs)"},"pricing_amount":{"type":"number","description":"the selected price amount (only valid for sliding scale and donation priced programs)"},"questions":{"type":"array","description":"custom fields that have been configured for the program. Values should be passed in array style with the key being the slug of the field and the value being the desired value. Any hyphens `-` within the field slug should be replaced with underscores `_` in the request. Example: `questions[gender]=male,questions[legal_name]=Bob,questions[phone]=1234567890`\n"}}},"Transaction":{"type":"object","description":"A single transaction returned from a query","properties":{"id":{"type":"integer","description":"internal unique id"},"self_url":{"type":"string","format":"uri","description":"API URL pointing back to the object"},"submitted":{"type":"string","format":"date-time","description":"exact time when transaction was submitted"},"trans_date":{"type":"string","format":"date-time","description":"exact time of the transaction (can be modified manually, as opposed to `submitted`)"},"class":{"type":"string","description":"coarce grained classification of transactions"},"category":{"type":"string","description":"fine grained (and user defined) classification of transactions"},"status":{"type":"string","enum":["complete","cancel"],"description":"transaction status"},"description":{"type":"string","description":"transaction description (auto-generated or user-entered in the admin interface)"},"notes":{"type":"string","description":"notes entered about the transaction by the admin"},"staff_name":{"type":"string","description":"username of staff member who entered the transaction (if manually entered in the admin interface)"},"program_name":{"type":"string","description":"name of program for which this transaction was made"},"program_url":{"type":"string","format":"uri","description":"API URL of program for which this transaction was made"},"person_name":{"type":"string","description":"name of person on the registration"},"registration_url":{"type":"string","format":"uri","description":"API URL of connected registration object"},"details_url":{"type":"string","format":"uri","description":"API URL of detailed payment or item object"},"charge_amount":{"type":"number","description":"amount that was charged (usually used for purchased items)"},"credit_amount":{"type":"number","description":"amount that was credited (usually used for payments made)"},"associated_registration_id":{"type":"number","description":"Id for the associated registration"},"associated_registration_url":{"type":"string","format":"uri","description":"API URL for the associated registration"},"associated_transaction":{"type":"number","description":"Id for the associated transaction"},"expiry_date":{"type":"string","format":"date-time","description":"date of expiry"}}},"PostTransaction":{"type":"object","description":"A single transaction to create or update","properties":{"registration_id":{"type":"integer","description":"id for the registration the transaction will be added to"},"trans_date":{"type":"string","format":"date-time","description":"exact time of the transaction (can be modified manually, as opposed to `submitted`)"},"category":{"type":"string","description":"fine grained (and user defined) classification of transactions"},"status":{"type":"string","enum":["complete","cancel"],"description":"transaction status"},"description":{"type":"string","description":"transaction description (auto-generated or user-entered in the admin interface)"},"charge_amount":{"type":"number","description":"amount that was charged (usually used for purchased items)"},"credit_amount":{"type":"number","description":"amount that was credited (usually used for payments made)"}}},"Payment":{"type":"object","description":"A single payment or refund transaction. The object includes all fields in Transaction and additional\nfields that are only relevant for payments made by the guest.\n","properties":{"fund_method":{"type":"string","description":"type of funding"},"merchant_name":{"type":"string","description":"name of credit card processor (e.g. Paypal)"},"merchant_trans_id":{"type":"string","description":"transaction id as recorded by credit card processor"},"merchant_profile":{"type":"string","description":"profile id as recorded by credit card processor"},"merchant_account":{"type":"string","description":"name of account the transaction was made on"},"merchant_cc_details":{"type":"string","description":"credit card details as recorded by credit card processor"}}},"Item":{"type":"object","description":"A single item or discount transaction. The object includes all fields in Transaction and additional\nfields that are only relevant for items purchased by the guest.\n","properties":{"is_addon":{"type":"boolean","description":"is this item an addon (an optional item) selected by the guest"},"discount_amount":{"type":"string","description":"discount amount (either entered directly or calculated from `discount_percent`)"},"discount_percent":{"type":"string","description":"discount percentage"},"subtotal":{"type":"string","description":"total after applying discount, before applying taxes"},"tax_1_info":{"type":"string","description":"first tax description"},"tax_1_amount":{"type":"string","description":"first tax amount"},"tax_2_info":{"type":"string","description":"second tax description"},"tax_2_amount":{"type":"string","description":"second tax amount"},"grand_total":{"type":"string","description":"total after applying discount and taxes"}}},"Lead":{"type":"object","description":"A single lead, either an abandoned registration or a waiting list entry.\n","properties":{"submitted":{"type":"string","format":"date-time","description":"exact time when lead was submitted"},"lead_type":{"type":"string","enum":["abandoned-reg","wait-list"],"description":"type of lead"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"full_name":{"type":"string","description":"guest's full name"},"email":{"type":"string","format":"email","description":"guest's email"},"program":{"type":"string","description":"name of program for which the guest attempted to register"},"program_id":{"type":"integer","description":"id for the program"},"program_url":{"type":"string","format":"uri","description":"API URL for the program"},"program_categories":{"type":"array","description":"categories for the program"},"program_external_code":{"type":"string","description":"external code for the program (can be set up in the admin under Program / Advanced)"},"language":{"type":"string","description":"language code in which the registration was completed (i.e. en, fr, etc.)"},"program_link":{"type":"string","format":"uri","description":"link to program description page"},"registration_link":{"type":"string","format":"uri","description":"link to registration page"},"remote_registration_link":{"type":"string","format":"uri","description":"link to remote registration page"},"questions":{"type":"array","description":"an array of answers to all custom questions"}}},"Rental":{"type":"object","description":"A single rental returned for a query","properties":{"id":{"type":"integer","x-nullable":true,"readOnly":true,"description":"internal unique id","example":12},"hash":{"type":"string","x-nullable":true,"readOnly":true,"description":"unique hash for the rental instance"},"name":{"type":"string","description":"name of the rental instance"},"created_at":{"type":"string","x-nullable":true,"readOnly":true,"format":"date","description":"date the rental instance was created"},"date_start":{"type":"string","x-nullable":true,"format":"date","description":"rental start date"},"date_end":{"type":"string","x-nullable":true,"format":"date","description":"rental end date"},"contact_email":{"type":"string","x-nullable":true,"format":"email","description":"email address for the specific rental instance"},"status":{"type":"object","description":"Status assigned to a rental instance.","properties":{"slug":{"type":"string","example":"evaluating"},"name":{"type":"string","readOnly":true,"example":"Evaluating"},"confidence":{"type":"number","readOnly":true,"example":1},"color":{"type":"string","readOnly":true,"example":"#4682b4"}}},"organization":{"type":"object","description":"Group of people or company","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":34},"name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true,"readOnly":true,"format":"email"},"phone":{"type":"string","x-nullable":true,"readOnly":true},"website":{"type":"string","x-nullable":true,"readOnly":true,"example":"http://sc.com"},"notes":{"type":"string","x-nullable":true,"readOnly":true},"persons":{"type":"array","items":{"$ref":"#/definitions/RentalContact"}}}},"contact":{"type":"object","description":"Individual contact for the rental request","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":null},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true,"format":"email"},"phone":{"type":"string","x-nullable":true,"format":"phone"},"address":{"type":"object","$ref":"#/definitions/Address"}}},"quote":{"type":"object","properties":{"proposal":{"type":"string","x-nullable":true},"terms":{"type":"array","items":{"$ref":"#/definitions/RentalQuoteTerm"}}}},"agreements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":6},"is_accepted":{"type":"boolean","x-nullable":true},"created_at":{"type":"string","format":"date","readOnly":true},"quote":{"type":"object","$ref":"#/definitions/RentalQuote"}}}},"program":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":46},"name":{"type":"string","readOnly":true},"registrations":{"type":"array","readOnly":true,"items":{"$ref":"#/definitions/RentalProgramRegistration"}}}},"template_program":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":6},"name":{"type":"string","readOnly":true}}},"invoice":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/definitions/RentalInvoiceItem"}},"taxes":{"type":"array","items":{"$ref":"#/definitions/RentalInvoiceTax"}},"taxes_sum":{"type":"object","$ref":"#/definitions/MoneyAmount"},"subtotal_pre_tax":{"type":"object","$ref":"#/definitions/MoneyAmount"},"grand_total":{"type":"object","$ref":"#/definitions/MoneyAmount"},"deposit":{"type":"object","$ref":"#/definitions/RentalInvoiceDeposit"},"accepted_payment_methods":{"type":"array","items":{"$ref":"#/definitions/SlugAndName"}}}},"room_block":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":6},"name":{"type":"string","x-nullable":true,"readOnly":true},"description":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true,"format":"date","description":"block start date"},"end_date":{"type":"string","x-nullable":true,"format":"date","description":"block end date"},"date_type":{"type":"object","$ref":"#/definitions/SlugAndName"},"lodgings":{"type":"array","items":{"$ref":"#/definitions/RoomBlockLodging"}}}},"venues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":4},"name":{"type":"string","x-nullable":true,"readOnly":true},"notes":{"type":"string","x-nullable":true,"readOnly":true},"capacity":{"type":"string","x-nullable":true,"readOnly":true},"blocks":{"type":"array","items":{"$ref":"#/definitions/VenueBlock"}}}}},"custom_fields":{"type":"object","properties":{"rs-inquiry-number-of-people":{"type":"string","x-nullable":true},"rs-inquiry-date-notes":{"type":"string","x-nullable":true},"rs-inquiry-event-description":{"type":"string","x-nullable":true},"rs-inquiry-special-needs":{"type":"string","x-nullable":true},"rs-inquiry-rented-before":{"type":"string","x-nullable":true}}},"rental_conversion_options":{"type":"object","properties":{"add_agreement_reg_transactions":{"type":"boolean","description":"indicates whether rental invoice items should be included as registration transactions upon rental agreement acceptance","example":true},"auto_set_group_leader_to_renter":{"type":"boolean","description":"indicates whether renter should be set to the group leader when rental program is created","example":true}}},"tasks":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}}},"is_trashed":{"type":"boolean","readOnly":true}}},"RentalStatus":{"type":"object","description":"Status assigned to a rental instance.","properties":{"slug":{"type":"string","example":"evaluating"},"name":{"type":"string","readOnly":true,"example":"Evaluating"},"confidence":{"type":"number","readOnly":true,"example":1},"color":{"type":"string","readOnly":true,"example":"#4682b4"}}},"Organization":{"type":"object","description":"Group of people or company","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":34},"name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true,"readOnly":true,"format":"email"},"phone":{"type":"string","x-nullable":true,"readOnly":true},"website":{"type":"string","x-nullable":true,"readOnly":true,"example":"http://sc.com"},"notes":{"type":"string","x-nullable":true,"readOnly":true},"persons":{"type":"array","items":{"type":"object","description":"Individual contact for the rental request","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":null},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true,"format":"email"},"phone":{"type":"string","x-nullable":true,"format":"phone"},"address":{"type":"object","$ref":"#/definitions/Address"}}}}}},"RentalContact":{"type":"object","description":"Individual contact for the rental request","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":null},"first_name":{"type":"string","x-nullable":true},"last_name":{"type":"string","x-nullable":true},"email":{"type":"string","x-nullable":true,"format":"email"},"phone":{"type":"string","x-nullable":true,"format":"phone"},"address":{"type":"object","properties":{"street":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"object","$ref":"#/definitions/SlugAndName","x-nullable":true},"country":{"type":"object","$ref":"#/definitions/SlugAndName","x-nullable":true},"zip":{"type":"string","x-nullable":true}}}}},"Address":{"type":"object","properties":{"street":{"type":"string","x-nullable":true},"street2":{"type":"string","x-nullable":true},"city":{"type":"string","x-nullable":true},"state":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"country":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"zip":{"type":"string","x-nullable":true}}},"RentalQuote":{"type":"object","properties":{"proposal":{"type":"string","x-nullable":true},"terms":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"url","description":"full url of the document","example":"https://example.com/terms.pdf"}}}}}},"RentalQuoteTerm":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"url","description":"full url of the document","example":"https://example.com/terms.pdf"}}},"RentalAgreement":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":6},"is_accepted":{"type":"boolean","x-nullable":true},"created_at":{"type":"string","format":"date","readOnly":true},"quote":{"type":"object","properties":{"proposal":{"type":"string","x-nullable":true},"terms":{"type":"array","items":{"$ref":"#/definitions/RentalQuoteTerm"}}}}}},"RentalProgram":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":46},"name":{"type":"string","readOnly":true},"registrations":{"type":"array","readOnly":true,"items":{"type":"object","description":"Registration for the program","properties":{"id":{"type":"integer","description":"internal unique id"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"email":{"type":"string","format":"email","description":"guest's email address"}}}}}},"RentalProgramRegistration":{"type":"object","description":"Registration for the program","properties":{"id":{"type":"integer","description":"internal unique id"},"start_date":{"type":"string","description":"the day the guest's stay starts","format":"date"},"end_date":{"type":"string","description":"the day the guest's stay ends","format":"date"},"status":{"type":"string","enum":["reserved","pending","need-approval","unconfirmed","cancelled","arrived","checked-out","duplicate"],"description":"registration status"},"first_name":{"type":"string","description":"guest's first name"},"last_name":{"type":"string","description":"guest's last name"},"email":{"type":"string","format":"email","description":"guest's email address"}}},"RentalTemplateProgram":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","example":6},"name":{"type":"string","readOnly":true}}},"RentalInvoice":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"object","$ref":"#/definitions/SlugAndName"},"amount":{"type":"object","$ref":"#/definitions/MoneyAmount"},"frequency":{"type":"object","$ref":"#/definitions/SlugAndName"},"quantity":{"type":"integer"},"total":{"type":"object","$ref":"#/definitions/MoneyAmount"},"sort_order":{"type":"integer","readOnly":true,"x-nullable":true}}}},"taxes":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"object","$ref":"#/definitions/MoneyAmount","x-nullable":true},"name":{"type":"string","x-nullable":true},"slug":{"type":"string"}}}},"taxes_sum":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"subtotal_pre_tax":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"grand_total":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"deposit":{"type":"object","properties":{"type":{"type":"object","$ref":"#/definitions/SlugAndName"},"amount":{"type":"object","$ref":"#/definitions/MoneyAmount","x-nullable":true},"percent":{"type":"number","x-nullable":true},"total":{"type":"object","$ref":"#/definitions/MoneyAmount","x-nullable":true}}},"accepted_payment_methods":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}}}}},"RentalInvoiceItem":{"type":"object","properties":{"description":{"type":"string"},"category":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"amount":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"frequency":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"quantity":{"type":"integer"},"total":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"sort_order":{"type":"integer","readOnly":true,"x-nullable":true}}},"RentalInvoiceDeposit":{"type":"object","properties":{"type":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"amount":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"percent":{"type":"number","x-nullable":true},"total":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}}}},"RentalInvoiceTax":{"type":"object","properties":{"amount":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"name":{"type":"string","x-nullable":true},"slug":{"type":"string"}}},"RoomBlock":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":6},"name":{"type":"string","x-nullable":true,"readOnly":true},"description":{"type":"string","x-nullable":true},"start_date":{"type":"string","x-nullable":true,"format":"date","description":"block start date"},"end_date":{"type":"string","x-nullable":true,"format":"date","description":"block end date"},"date_type":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"lodgings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":8},"name":{"type":"string","x-nullable":true,"readOnly":true},"description":{"type":"string","x-nullable":true,"readOnly":true},"rooms":{"type":"array","items":{"$ref":"#/definitions/RoomBlockLodgingRoom"}}}}}}},"Room":{"type":"object","description":"A single room returned for a query","properties":{"id":{"type":"integer","description":"internal unique id"},"name":{"type":"string"},"room_status":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"status_admin_note":{"type":"string","x-nullable":true}}},"PostRoomStatus":{"type":"object","description":"Room status payload for status updates","required":["room_status"],"properties":{"id":{"type":"integer","description":"Optional id field. If provided, it must match the path id."},"room_status":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","enum":["clean","vacant-dirty","repair","occupied"],"description":"Room status slug."}}},"status_admin_note":{"type":"string","x-nullable":true,"description":"Optional admin note saved with the room status change."}}},"RoomBlockLodging":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":8},"name":{"type":"string","x-nullable":true,"readOnly":true},"description":{"type":"string","x-nullable":true,"readOnly":true},"rooms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":23},"name":{"type":"string","x-nullable":true,"readOnly":true}}}}}},"RoomBlockLodgingRoom":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":23},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"MoneyAmount":{"type":"object","properties":{"value":{"type":"number","example":1234.56},"formatted":{"type":"string","readOnly":true,"example":"CAD $1,234.56"}}},"RentalVenue":{"type":"object","properties":{"id":{"type":"integer","x-nullable":true,"description":"internal unique id","example":4},"name":{"type":"string","x-nullable":true,"readOnly":true},"notes":{"type":"string","x-nullable":true,"readOnly":true},"capacity":{"type":"string","x-nullable":true,"readOnly":true},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":6},"name":{"type":"string","x-nullable":true,"readOnly":true},"start_date":{"type":"string","x-nullable":true,"format":"date","description":"block start date"},"end_date":{"type":"string","x-nullable":true,"format":"date","description":"block end date"},"daily_start_time":{"type":"string","x-nullable":true,"format":"hh:mm:ss","description":"daily start time","example":"12:00:00"},"daily_end_time":{"type":"string","x-nullable":true,"format":"hh:mm:ss","description":"daily end time","example":"16:00:00"},"date_type":{"type":"object","$ref":"#/definitions/SlugAndName"},"number_of_guests":{"type":"number","x-nullable":true,"example":11},"notes":{"type":"string","x-nullable":true}}}}}},"VenueBlock":{"type":"object","properties":{"id":{"type":"integer","description":"internal unique id","x-nullable":true,"example":6},"name":{"type":"string","x-nullable":true,"readOnly":true},"start_date":{"type":"string","x-nullable":true,"format":"date","description":"block start date"},"end_date":{"type":"string","x-nullable":true,"format":"date","description":"block end date"},"daily_start_time":{"type":"string","x-nullable":true,"format":"hh:mm:ss","description":"daily start time","example":"12:00:00"},"daily_end_time":{"type":"string","x-nullable":true,"format":"hh:mm:ss","description":"daily end time","example":"16:00:00"},"date_type":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"number_of_guests":{"type":"number","x-nullable":true,"example":11},"notes":{"type":"string","x-nullable":true}}},"RentalConversionOptions":{"type":"object","properties":{"add_agreement_reg_transactions":{"type":"boolean","description":"indicates whether rental invoice items should be included as registration transactions upon rental agreement acceptance","example":true},"auto_set_group_leader_to_renter":{"type":"boolean","description":"indicates whether renter should be set to the group leader when rental program is created","example":true}}},"RentalCustomFieldsValues":{"type":"object","properties":{"rs-inquiry-number-of-people":{"type":"string","x-nullable":true},"rs-inquiry-date-notes":{"type":"string","x-nullable":true},"rs-inquiry-event-description":{"type":"string","x-nullable":true},"rs-inquiry-special-needs":{"type":"string","x-nullable":true},"rs-inquiry-rented-before":{"type":"string","x-nullable":true}}},"RentalError":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"trace_id":{"type":"string"},"site_id":{"type":"integer"},"user_id":{"type":"integer"},"path":{"type":"string"},"query":{"type":"string"},"errors":{"type":"object"}}}}},"SlugAndName":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string","x-nullable":true,"readOnly":true}}},"Error":{"type":"object","description":"An error returned in case of an incorrect request.","properties":{"message":{"type":"string","description":"description of error and steps to correct it"}}},"Reference":{"type":"object","description":"A reference to an object","properties":{"id":{"type":"integer","description":"id of the object"},"url":{"type":"string","format":"uri","description":"API URL for the object"}}},"Deleted":{"type":"object","description":"A reference to the deleted id","properties":{"id":{"type":"integer","description":"id of the deleted object"}}}}}