From d9c52749f0469c81702d44794fcd85f85ebd0977 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 10:33:08 +0000 Subject: [PATCH] Document Explore Forms endpoints (CP-8871) GET /explore/forms and GET /explore/forms/{id}: the published, approved forms of the Makerble ImpactStore and one form's fields. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xp61sB4y8227TmZzhP --- openapi.yaml | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++ server.js | 33 ++++++++ 2 files changed, 261 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index a8a529b..fa3c777 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12192,6 +12192,168 @@ paths: $ref: '#/components/responses/Unauthorized' "404": $ref: '#/components/responses/NotFound' + /explore/forms: + get: + tags: [Explore] + summary: Explore Forms + operationId: listExploreForms + description: | + Lists the forms published to the Makerble® ImpactStore™ and approved by Makerble, with the + same search, filters, counts and sort as the Explore Forms page: Contact Forms (bio forms), + Case Forms, Custom Forms for Contacts, Event Forms and Project Forms. Every caller sees the + same forms; `yours` depends on the caller's organisations. + + - Each form's `id` is a key naming its type and number, such as `contact-4`, `case-5`, + `event-6` or `project-7`. Case Forms and Custom Forms for Contacts both use `case-`. + - `query` matches the form's name, and a Contact Form's description. + - The filters take option keys, as arrays (`type[]=case_form`) or comma-separated + (`type=case_form,event_form`). Options in one filter combine with OR and filters + combine with AND: + - `type` (Type of form): `contact_form`, `case_form`, `custom_contact_form`, `event_form`, + `project_form` + - `theme`: `referral_and_intake`, `equality_monitoring`, `safeguarding`, `events`, + `project_information`. Event Forms always have `events` and Project Forms + `project_information`. + - `fields` (Number of fields): `up_to_10`, `11_to_25`, `over_25` + - `includes`: `consent` (a consent question), `standard_dropdowns` (Dropdowns from the + ImpactStore), `address` (an address or postcode field) + - A form's fields are the questions it asks: built-in fields and section headings are not + counted. + - `chip` is one of the page's Popular chips: `Referral`, `Equality monitoring`, + `Safeguarding`, `Registration`. + - `facets` gives each filter's options with how many forms each would return, given the + other filters already chosen. + - `sort` is `added` (used by the most organisations first, the default), `new` or `az`. + - Add a form to your organisation in the app with **Add to organisation** on Explore Forms. + security: [{tokenAuth: []}] + parameters: + - name: query + in: query + required: false + schema: + type: string + example: referral + description: Words to look for in the form's name, or a Contact Form's description + - name: type + in: query + required: false + schema: + type: string + example: case_form + description: Type of form option keys, comma-separated or repeated as type[] + - name: theme + in: query + required: false + schema: + type: string + example: safeguarding + description: Theme option keys, comma-separated or repeated as theme[] + - name: fields + in: query + required: false + schema: + type: string + example: up_to_10 + description: Number of fields option keys, comma-separated or repeated as fields[] + - name: includes + in: query + required: false + schema: + type: string + example: standard_dropdowns + description: Includes option keys, comma-separated or repeated as includes[] + - name: chip + in: query + required: false + schema: + type: string + enum: [Referral, Equality monitoring, Safeguarding, Registration] + description: One of the Popular chips + - name: sort + in: query + required: false + schema: + type: string + enum: [added, new, az] + default: added + description: Most added, Newest, or A to Z + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PerPage' + - $ref: '#/components/parameters/LastSyncDatetime' + responses: + "200": + description: The listed forms that match, and each filter's option counts + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExploreForms' + example: + page: 1 + page_size: 1 + page_count: 1 + total_count: 1 + data: + - id: case-5 + name: Safeguarding concern + type: case_form + field_count: 14 + uses_standard_dropdowns: true + themes: [safeguarding] + shared_by: Makerble Templates + used_by_count: 12 + yours: false + public_url: https://www.makerble.com/case-forms/safeguarding-concern + facets: + - key: type + label: Type of form + options: + - value: case_form + label: Case form + count: 1 + selected: true + "401": + $ref: '#/components/responses/Unauthorized' + /explore/forms/{id}: + get: + tags: [Explore] + summary: Preview an Explore Form + operationId: getExploreForm + description: | + One form listed on Explore Forms: the fields of **Explore Forms** plus the name of every + field it asks, in order. A form that isn't listed on Explore (not published or not + approved), or a key that names no form, is a 404. + security: [{tokenAuth: []}] + parameters: + - name: id + in: path + required: true + schema: + type: string + example: case-5 + description: The form's key from Explore Forms + responses: + "200": + description: The form and its fields + content: + application/json: + schema: + $ref: '#/components/schemas/ExploreFormPreview' + example: + id: case-5 + name: Safeguarding concern + type: case_form + field_count: 3 + uses_standard_dropdowns: false + themes: [safeguarding] + shared_by: Makerble Templates + used_by_count: 12 + yours: false + public_url: https://www.makerble.com/case-forms/safeguarding-concern + fields: [Date of concern, What happened, Action taken] + "401": + $ref: '#/components/responses/Unauthorized' + "404": + $ref: '#/components/responses/NotFound' /explore/dropdowns: get: tags: [Explore] @@ -24467,6 +24629,72 @@ components: items: $ref: '#/components/schemas/ExploreFacetGroup' + ExploreFormPreview: + allOf: + - $ref: '#/components/schemas/ExploreForm' + - type: object + properties: + fields: + type: array + items: + type: string + + ExploreForm: + type: object + properties: + id: + type: string + description: The form's key, naming its type and number, e.g. case-5 + name: + type: string + type: + type: string + enum: [contact_form, case_form, custom_contact_form, event_form, project_form] + field_count: + type: integer + description: How many fields it asks, leaving out built-in fields and section headings + uses_standard_dropdowns: + type: boolean + description: Whether any field uses a Dropdown from the ImpactStore + themes: + type: array + items: + type: string + enum: [referral_and_intake, equality_monitoring, safeguarding, events, project_information] + shared_by: + type: string + nullable: true + used_by_count: + type: integer + description: How many organisations use it + yours: + type: boolean + description: Whether one of the caller's organisations owns it + public_url: + type: string + nullable: true + description: Its public page, for Contact Forms and Case Forms + + PaginatedExploreForms: + type: object + properties: + page: + type: integer + page_size: + type: integer + page_count: + type: integer + total_count: + type: integer + data: + type: array + items: + $ref: '#/components/schemas/ExploreForm' + facets: + type: array + items: + $ref: '#/components/schemas/ExploreFacetGroup' + ExploreDropdownPreview: allOf: - $ref: '#/components/schemas/ExploreDropdown' diff --git a/server.js b/server.js index ee082bc..1bef9b8 100644 --- a/server.js +++ b/server.js @@ -952,6 +952,7 @@ function buildDocsPage() { GETLibrary GETExplore Surveys GETExplore Report Templates + GETExplore Forms GETExplore Dropdowns GETExplore Checklist Templates GETExplore Impact Frameworks @@ -3033,6 +3034,38 @@ function buildDocsPage() { + +
+
Forms and surveys
+

Explore Forms

+
+

Explore Forms lists the forms published to the Makerble® ImpactStore™ and approved by Makerble: Contact Forms (bio forms), Case Forms, Custom Forms for Contacts, Event Forms and Project Forms. The API gives the same search, filters, counts and sort as the Explore Forms page. Every caller sees the same forms; only yours depends on your organisations.

+

Each form's id is a key naming its type and number, such as contact-4 or case-5. Filters take option keys, as arrays (type[]=case_form) or comma-separated (type=case_form,event_form). Options in one filter match any of them; different filters must all match.

+
+
+ ${endpointCard("GET", "/explore/forms", "Explore Forms", true, [ + { name: "query", type: "string", required: false, desc: "Words in the form's name, or a Contact Form's description" }, + { name: "type", type: "string", required: false, desc: "Type of form: contact_form, case_form, custom_contact_form, event_form, project_form" }, + { name: "theme", type: "string", required: false, desc: "referral_and_intake, equality_monitoring, safeguarding, events, project_information" }, + { name: "fields", type: "string", required: false, desc: "Number of fields: up_to_10, 11_to_25, over_25" }, + { name: "includes", type: "string", required: false, desc: "consent (a consent question), standard_dropdowns (Dropdowns from the ImpactStore), address (an address or postcode field)" }, + { name: "chip", type: "string", required: false, desc: "A Popular chip: Referral, Equality monitoring, Safeguarding, Registration" }, + { name: "sort", type: "string", required: false, desc: "added (used by the most organisations first, default), new or az" }, + { name: "page", type: "integer", required: false, desc: "Page number" }, + { name: "per_page", type: "integer", required: false, desc: "Forms per page (default 10, max 200)" }, + { name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 — only forms updated after this" } + ], [ + { code: "200", cls: "response-2xx", desc: "Forms with id, name, type, field_count, uses_standard_dropdowns, themes, shared_by, used_by_count, yours and public_url (Contact Forms and Case Forms), plus facets: each filter's options with how many forms each would return given the other filters" } + ])} + ${endpointCard("GET", "/explore/forms/{id}", "Preview an Explore Form", true, [ + { name: "id", in: "path", type: "string", required: true, desc: "The form's key from Explore Forms, e.g. case-5" } + ], [ + { code: "200", cls: "response-2xx", desc: "The form's fields as above plus the name of every field it asks, in order, as fields" }, + { code: "404", cls: "response-4xx", desc: "Not listed on Explore Forms (not published or not approved), or no such form" } + ], "To use a form, add it to your organisation in Makerble with Add to organisation on Explore Forms.")} +
+
+
Forms and surveys