A Toolkit is a ready-made set of Surveys, Contact Forms, Impact Frameworks, metrics and tips on Explore Toolkits that an Organisation can add to its Projects in one go. The database calls them Collections; the API uses toolkits. Each has a Toolkit number (e.g. T14), a thumbnail for its Explore Toolkits card, a cover image for its page, and a setting for each image that lays a dark translucent layer over it.
toolkit_number, thumbnail_image_url, cover_image_url, darken_thumbnail_image, darken_cover_image and its page url" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Toolkit you can't see" }
+ ])}
+ ${endpointCard("PATCH", "/toolkits/{id}", "Change a Toolkit's number and image darkening", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "Toolkit ID" },
+ { name: "toolkit_number", type: "string", required: false, desc: "The Toolkit's number, e.g. T14; null clears it" },
+ { name: "darken_thumbnail_image", type: "boolean", required: false, desc: "Darken the thumbnail on Explore Toolkits" },
+ { name: "darken_cover_image", type: "boolean", required: false, desc: "Darken the cover image on the Toolkit's page" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The Toolkit" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "403", cls: "response-4xx", desc: "You can see the Toolkit but not edit it" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Toolkit you can't see" },
+ { code: "422", cls: "response-4xx", desc: "{errors: [...]}" }
+ ], "As the Create/Edit Collection page does. Only the fields sent change. You must be able to edit the Toolkit: its owner, an editor of its Organisation, or a user with Marketing or Admin system access.")}
+ ${endpointCard("PATCH", "/toolkits/{id}/image", "Replace a Toolkit's thumbnail or cover image", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "Toolkit ID" },
+ { name: "kind", type: "string", required: true, desc: "thumbnail (Explore Toolkits card) or cover (top of the Toolkit's page)" },
+ { name: "image", type: "file", required: true, desc: "A JPEG or PNG, sent as multipart/form-data" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The Toolkit, with its new image URL" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "403", cls: "response-4xx", desc: "Needs Marketing or Admin system access" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Toolkit you can't see" },
+ { code: "422", cls: "response-4xx", desc: "{errors: [...]}, e.g. an unknown kind or a file that isn't an image" }
+ ], "As Replace does on Site Overview › Manage Toolkits.")}
+