A Financial Value is a published money value per person for an outcome, e.g. "Moving into work: £1,234 a year" from HACT, in the currency of its country. A project puts Financial Values against its Metrics (Changes and Indicators) on its Financial Value calculator (project › More Options › Financial Values). The project's financial value is each Metric's result times the amounts of its Financial Values, as on its Financial Calculator tile, added up separately for each currency.
+You can use your own Financial Values, your organisations', those shared with you and those shared with everyone. One shared with only_project_colleagues can only be used in the projects in its project_ids.
GET /financial_values before creating one. Then put it against a project's Metric with POST /projects/{project_id}/financial_values, which also turns on the project's Financial Calculator.
+ id, name, code, amount, currency, year, country, category, sources, publisher, short_description, calculation_description, verified, owner_type (Organisation or User), owner_id, privacy and project_ids" },
+ { code: "422", cls: "response-4xx", desc: "per_page over 200" }
+ ])}
+ ${endpointCard("GET", "/financial_values/{id}", "Get a Financial Value", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "Financial Value ID" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The Financial Value" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or not one you may use" }
+ ])}
+ ${endpointCard("POST", "/financial_values", "Create a Financial Value", true, [], [
+ { code: "201", cls: "response-2xx", desc: "The new Financial Value" },
+ { code: "403", cls: "response-4xx", desc: "You aren't an Organisation Admin of organisation_id" },
+ { code: "422", cls: "response-4xx", desc: "Something was wrong, e.g. a country that doesn't exist; existing_id when its owner already has a Financial Value with this name" }
+ ], "Body: name, amount (per person, no currency symbol), year, country (a name; sets the currency) and privacy (Project colleagues only, Organisation colleagues only, Network & organisation colleagues only or Everyone) are required. Optional: organisation_id (leave out to make it your own), project_ids (for Project colleagues only), code, category and sources (names), publisher, short_description, calculation_description.")}
+ ${endpointCard("GET", "/projects/{project_id}/financial_values", "List a project's Financial Values and their total", true, [
+ { name: "project_id", in: "path", type: "integer", required: true, desc: "Project ID" },
+ { name: "page", type: "integer", required: false, desc: "Page number" },
+ { name: "per_page", type: "integer", required: false, desc: "Records per page (default 10, max 200)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "project_id, financial_calculator_enabled, totals (one per currency) and a page of attachments: id, metric_type, metric_id, metric_name, color, financial_value, quantity (the Metric's result) and sub_total" },
+ { code: "403", cls: "response-4xx", desc: "You aren't a Project Manager or Organisation Admin of the project" },
+ { code: "404", cls: "response-4xx", desc: "A project outside your organisations" }
+ ])}
+ ${endpointCard("POST", "/projects/{project_id}/financial_values", "Put a Financial Value against a project's Metric", true, [
+ { name: "project_id", in: "path", type: "integer", required: true, desc: "Project ID" }
+ ], [
+ { code: "201", cls: "response-2xx", desc: "The attachment" },
+ { code: "403", cls: "response-4xx", desc: "You aren't a Project Manager or Organisation Admin of the project" },
+ { code: "404", cls: "response-4xx", desc: "A project outside your organisations" },
+ { code: "422", cls: "response-4xx", desc: "Not one of the project's Metrics, a Financial Value you may not use or one shared with other projects only, or a bad colour" }
+ ], "Body: metric_type (Change or Indicator), metric_id, financial_value_id and optional color (hex). Turns on the project's Financial Calculator if it is off. Attaching one that is already there only changes its colour.")}
+ ${endpointCard("DELETE", "/projects/{project_id}/financial_values/{id}", "Take a Financial Value off a project's Metric", true, [
+ { name: "project_id", in: "path", type: "integer", required: true, desc: "Project ID" },
+ { name: "id", in: "path", type: "integer", required: true, desc: "The attachment id, from the list" }
+ ], [
+ { code: "204", cls: "response-2xx", desc: "Removed" },
+ { code: "403", cls: "response-4xx", desc: "You aren't a Project Manager or Organisation Admin of the project" },
+ { code: "404", cls: "response-4xx", desc: "Not one of this project's attachments" }
+ ])}
+