Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Organization mandate

List all mandates that the organization has been given

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Query parameters

includestring

Comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names. Allowed relationship paths: active_plan, additional_enabled_plans.

Example:"active_plan,additional_enabled_plans"

Returns

Returns an array of resource objects of type organization_mandate

Examples

import { buildClient } from "@datocms/dashboard-client";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const organizationMandates = await client.organizationMandates.givenList();
for (const organizationMandate of organizationMandates) {
// Check the 'Returned output' tab for the result ☝️
console.log(organizationMandate);
}
}
run();
{
id: "312",
meta: {
appointed_organization_name: false,
mandator_organization_name: false,
},
active_plan: { type: "per_owner_pricing_plan", id: "124" },
additional_enabled_plans: [{ type: "per_owner_pricing_plan", id: "124" }],
mandator_organization: { type: "organization", id: "124" },
appointed_organization: { type: "organization", id: "124" },
}