Set up an area of work (a programme or service) for an Organisation, as the onboarding journey does after an Organisation is created: one workspace per name with a Toolkit installed, extra workspaces such as Referrals or Volunteers, each with its own Project Type, and a Checklist (participant journey) that every contact in the area's workspaces gets.
+spacing says how the area is split into workspaces: facilitator, site, cohort or single. The workspaces are made in the background: POST answers 202 with status: building; ask GET until it is completed or failed. Charity Editors and Charity Reporters of the Organisation can use it.
facilitator, site, cohort or single" },
+ { name: "workspace_names", in: "body", type: "array", required: false, desc: "One name per workspace, up to 50. For single, the area of work's name when empty" },
+ { name: "extra_ids", in: "body", type: "array", required: false, desc: "Extras from GET /onboarding_extras" }
+ ], [
+ { code: "202", cls: "response-2xx", desc: "The set-up, with status building" },
+ { code: "403", cls: "response-4xx", desc: "Not a Charity Editor or Charity Reporter of this Organisation" },
+ { code: "404", cls: "response-4xx", desc: "No such Organisation" },
+ { code: "422", cls: "response-4xx", desc: "A missing name, unknown spacing, unlisted Toolkit or too many workspaces; nothing is saved" }
+ ])}
+ ${endpointCard("GET", "/onboarding_journeys/{id}", "Get an area of work set-up", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "The set-up's ID" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "status (building, completed or failed), the answers, and once completed workspace_ids and checklist_id" },
+ { code: "404", cls: "response-4xx", desc: "No such set-up, or someone else's" }
+ ])}
+ ${endpointCard("GET", "/onboarding_extras", "List the extra workspaces an area of work can have", true, [
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number (default 1)" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Records per page (default 10, max 200)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "page, page_size, page_count, total_count and data: each extra's id, name, description, project_type_id and project_type_name" }
+ ])}
+