{
    "openapi": "3.0.0",
    "info": {
        "title": "Positive App API",
        "version": "v1",
        "description": "The API an installed marketplace app calls with its installation token. Read-only in v1; versioned by path: v1 only ever receives additive changes.\n\nEvery collection answers `{ \"items\": [...], \"nextCursor\": string|null }`, ordered by id, and is limited to the organizations the installation covers. Errors are RFC 7807 problems. The rate limit is 600 requests per minute per installation, announced by the `X-RateLimit-*` headers."
    },
    "servers": [
        {
            "url": "https://{tenant}-api.{domain}",
            "description": "The API host of your platform",
            "variables": {
                "tenant": {
                    "default": "your-tenant",
                    "description": "The part of your API host before -api"
                },
                "domain": {
                    "default": "your-domain",
                    "description": "The rest of your API host, after the dot that follows -api"
                }
            }
        }
    ],
    "paths": {
        "/api/app/v1/billing/charges": {
            "post": {
                "operationId": "api_appv1billingcharges_post",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "201": {
                        "description": "AppCharge resource created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppCharge.AppChargeCreated"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "links": {}
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The plan cannot be sold (`plan-not-sellable`) or the installation has too many sales waiting (`too-many-pending-sales`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "The body is over 8 KB.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The plan is not a one-time plan, or the return URL is not on the origin of the app URL or of one of its redirect URLs.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "Ask for a one-time charge for a plan of the app.",
                "description": "Opens a pending charge and answers with the `confirmationUrl` where a platform administrator approves the price and pays. The sale is pending for 24 hours; the app learns every outcome by the `app_charge/updated` webhook and can read the charge by its id. The installation is always the token's own.",
                "parameters": [],
                "requestBody": {
                    "description": "The new AppCharge resource",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AppCharge.BillingSaleInput"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/billing/charges/{id}": {
            "get": {
                "operationId": "api_appv1billingcharges_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppCharge resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppCharge"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such charge for this installation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "Read a charge of the installation.",
                "description": "Only a charge of the calling installation can be read.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "AppCharge identifier",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/billing/plans": {
            "get": {
                "operationId": "api_appv1billingplans_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppBillingPlans resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppBillingPlans"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "List the plans the calling app can sell.",
                "description": "The plans of the app that are for sale right now: price in cents excluding VAT, currency, interval and trial. A plan is chosen by its id when the app asks for a subscription or a charge.",
                "parameters": [],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/billing/subscriptions": {
            "post": {
                "operationId": "api_appv1billingsubscriptions_post",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "201": {
                        "description": "AppSubscription resource created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppSubscription.AppSubscriptionCreated"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "links": {}
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The plan cannot be sold (`plan-not-sellable`), the platform already has a live subscription to the app (`subscription-already-live`) or the installation has too many sales waiting (`too-many-pending-sales`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "The body is over 8 KB.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The plan is not a recurring plan, or the return URL is not on the origin of the app URL or of one of its redirect URLs.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "Ask for a subscription to a plan of the app.",
                "description": "Opens a pending subscription and answers with the `confirmationUrl` where a platform administrator approves the price and pays. Send the administrator there (an embedded app navigates its host page to it). The sale is pending for 24 hours; the app learns every outcome by the `app_subscription/updated` webhook and sees it through `current`. The installation is always the token's own.",
                "parameters": [],
                "requestBody": {
                    "description": "The new AppSubscription resource",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AppSubscription.BillingSaleInput"
                            }
                        }
                    },
                    "required": true
                },
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/billing/subscriptions/current": {
            "get": {
                "operationId": "api_appv1billingsubscriptionscurrent_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppSubscription resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppSubscription"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The installation has no live subscription, nor a canceled one that is still paid for.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "Read the current subscription of the installation.",
                "description": "The live subscription, or a canceled one whose paid period has not ended. The app enforces its own access from the status.",
                "parameters": [],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/billing/subscriptions/current/cancel": {
            "post": {
                "operationId": "api_appv1billingsubscriptionscurrentcancel_post",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "202": {
                        "description": "AppSubscription resource created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppSubscription"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "links": {}
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The installation has no live subscription.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error occurred",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ConstraintViolation"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ConstraintViolation"
                                }
                            }
                        },
                        "links": {}
                    },
                    "429": {
                        "description": "Too many billing calls from this installation; Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "The marketplace is unavailable.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "summary": "Cancel the current subscription at the end of the paid period.",
                "description": "Nothing more is billed after the current period, which stays paid for. The status changes by webhook.",
                "parameters": [],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/ingredients": {
            "get": {
                "operationId": "api_appv1ingredients_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppIngredientPage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppIngredientPage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is invalid (`invalid-parameter`), or the cursor is not valid for this installation, resource and filters (`invalid-cursor`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the ingredients.",
                "description": "Needs the `read_ingredients` scope. The ingredients owned by the organizations the installation covers, by ascending id, one cursor page at a time.",
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "query",
                        "description": "Only the ingredients of this organization, which must be one the installation covers (otherwise 404).",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "updatedSince",
                        "in": "query",
                        "description": "Only the ingredients updated at or after this ATOM date.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The nextCursor of the previous page. Opaque: pass it back unchanged with the same filters.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The page size, from 1 to 100 (a larger value is lowered to 100): 50 by default.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        },
                        "style": "form",
                        "explode": true
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/ingredients/{id}": {
            "get": {
                "operationId": "api_appv1ingredients_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppIngredient resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppIngredient"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Read an ingredient.",
                "description": "Needs the `read_ingredients` scope. The ingredient must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the ingredient.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/ingredients/{id}/scores": {
            "get": {
                "operationId": "api_appv1ingredients_idscores_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppScorePage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppScorePage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the scores of an ingredient.",
                "description": "Needs the `read_ingredients` scope. The headline scores of the ingredient for the active campaign, with `value` null while a score is not computed. The ingredient must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the ingredient.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/installation": {
            "get": {
                "operationId": "api_appv1installation_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "CurrentAppInstallation resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CurrentAppInstallation"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Only an installed marketplace app can use this operation.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "links": {}
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Describe the installation of the calling app.",
                "description": "Returns the installation the app token belongs to: the platform, the granted scopes, the organizations granted at consent and, in coveredOrganizationIds, those plus their descendants.",
                "parameters": [],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/organizations": {
            "get": {
                "operationId": "api_appv1organizations_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppOrganizationPage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppOrganizationPage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is invalid (`invalid-parameter`), or the cursor is not valid for this installation, resource and filters (`invalid-cursor`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the organizations.",
                "description": "Needs the `read_organizations` scope. The organizations the installation covers: the granted ones and their descendants, by ascending id, one cursor page at a time.",
                "parameters": [
                    {
                        "name": "updatedSince",
                        "in": "query",
                        "description": "Only the organizations updated at or after this ATOM date.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The nextCursor of the previous page. Opaque: pass it back unchanged with the same filters.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The page size, from 1 to 100 (a larger value is lowered to 100): 50 by default.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        },
                        "style": "form",
                        "explode": true
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/organizations/{id}": {
            "get": {
                "operationId": "api_appv1organizations_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppOrganization resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppOrganization"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Read an organization.",
                "description": "Needs the `read_organizations` scope. The organization must be one the installation covers (the granted ones and their descendants), otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the organization.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/packagings": {
            "get": {
                "operationId": "api_appv1packagings_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppPackagingPage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppPackagingPage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is invalid (`invalid-parameter`), or the cursor is not valid for this installation, resource and filters (`invalid-cursor`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the packagings.",
                "description": "Needs the `read_packagings` scope. The packagings owned by the organizations the installation covers, by ascending id, one cursor page at a time.",
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "query",
                        "description": "Only the packagings of this organization, which must be one the installation covers (otherwise 404).",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "updatedSince",
                        "in": "query",
                        "description": "Only the packagings updated at or after this ATOM date.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The nextCursor of the previous page. Opaque: pass it back unchanged with the same filters.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The page size, from 1 to 100 (a larger value is lowered to 100): 50 by default.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        },
                        "style": "form",
                        "explode": true
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/packagings/{id}": {
            "get": {
                "operationId": "api_appv1packagings_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppPackaging resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppPackaging"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Read a packaging.",
                "description": "Needs the `read_packagings` scope. The packaging must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the packaging.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/packagings/{id}/scores": {
            "get": {
                "operationId": "api_appv1packagings_idscores_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppScorePage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppScorePage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the scores of a packaging.",
                "description": "Needs the `read_packagings` scope. The headline scores of the packaging for the active campaign, with `value` null while a score is not computed. The packaging must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the packaging.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/products": {
            "get": {
                "operationId": "api_appv1products_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppProductPage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppProductPage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is invalid (`invalid-parameter`), or the cursor is not valid for this installation, resource and filters (`invalid-cursor`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the products.",
                "description": "Needs the `read_products` scope. The products owned by the organizations the installation covers, by ascending id, one cursor page at a time.",
                "parameters": [
                    {
                        "name": "organizationId",
                        "in": "query",
                        "description": "Only the products of this organization, which must be one the installation covers (otherwise 404).",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "updatedSince",
                        "in": "query",
                        "description": "Only the products updated at or after this ATOM date.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The nextCursor of the previous page. Opaque: pass it back unchanged with the same filters.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The page size, from 1 to 100 (a larger value is lowered to 100): 50 by default.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        },
                        "style": "form",
                        "explode": true
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/products/{id}": {
            "get": {
                "operationId": "api_appv1products_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppProduct resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppProduct"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Read a product.",
                "description": "Needs the `read_products` scope. The product must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the product.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/products/{id}/scores": {
            "get": {
                "operationId": "api_appv1products_idscores_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppScorePage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppScorePage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the scores of a product.",
                "description": "Needs the `read_products` scope. The headline scores of the product for the active campaign, with `value` null while a score is not computed. The product must be owned by an organization the installation covers, otherwise 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the product.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/questionnaires": {
            "get": {
                "operationId": "api_appv1questionnaires_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppQuestionnaireAnswersPage resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppQuestionnaireAnswersPage"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is invalid (`invalid-parameter`), or the cursor is not valid for this installation, resource and filters (`invalid-cursor`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "List the questionnaire answers of the entities of one type.",
                "description": "Needs the `read_questionnaires` scope and the read scope of the entity type. The summaries (without `values`) of the answers of the entities owned by the organizations the installation covers, by ascending id; `GET /questionnaires/{id}` gives the values. An `entityId` outside the coverage answers 404.",
                "parameters": [
                    {
                        "name": "entityType",
                        "in": "query",
                        "description": "Required. The type of entity whose answers are listed: product, ingredient, packaging or organization.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "product",
                                "ingredient",
                                "packaging",
                                "organization"
                            ]
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "entityId",
                        "in": "query",
                        "description": "Only the answers of this entity, which must be one the installation covers (otherwise 404).",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "updatedSince",
                        "in": "query",
                        "description": "Only the answers updated at or after this ATOM date.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "description": "The nextCursor of the previous page. Opaque: pass it back unchanged with the same filters.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "string"
                        },
                        "style": "form",
                        "explode": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "The page size, from 1 to 100 (a larger value is lowered to 100): 50 by default.",
                        "required": false,
                        "deprecated": false,
                        "schema": {
                            "type": "integer",
                            "default": 50
                        },
                        "style": "form",
                        "explode": true
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        },
        "/api/app/v1/questionnaires/{id}": {
            "get": {
                "operationId": "api_appv1questionnaires_id_get",
                "tags": [
                    "App API v1"
                ],
                "responses": {
                    "200": {
                        "description": "AppQuestionnaireAnswers resource",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AppQuestionnaireAnswers"
                                }
                            }
                        },
                        "headers": {
                            "X-RateLimit-Limit": {
                                "description": "The requests an installation may make in a minute: 600.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "description": "The requests left in the current budget.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "The Unix time by which the budget is whole again.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Credentials are missing or invalid: no or invalid bearer token or session, an invalid API key, or an unknown or disabled service account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AuthenticationError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The caller is not an installed app, or the installation was not granted the scope the operation needs (`scope-missing`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The resource does not exist, or is not owned by an organization the installation covers (`not-found`).",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "The installation exceeded its 600 requests a minute (`rate-limited`); Retry-After gives the delay.",
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait before the next attempt.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "summary": "Read the answers of an entity to a questionnaire.",
                "description": "Needs the `read_questionnaires` scope and the read scope of the entity the answers belong to (`read_products`, `read_ingredients`, `read_packagings`, or `read_organizations` for the questionnaire of an organization). The entity must be owned by an organization the installation covers, otherwise 404. `values` lists every answer, one entry per answered question (and per position of a multiple question).",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The id of the questionnaire answers.",
                        "required": true,
                        "deprecated": false,
                        "schema": {
                            "type": "integer"
                        },
                        "style": "simple",
                        "explode": false
                    }
                ],
                "security": [
                    {
                        "installationToken": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "AppBillingPlans": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": {
                                "anyOf": [
                                    {
                                        "type": "object",
                                        "additionalProperties": {
                                            "type": "string"
                                        }
                                    },
                                    {
                                        "type": "integer"
                                    },
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        }
                    }
                }
            },
            "AppCharge": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "object",
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "paidAt": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string"
                    }
                }
            },
            "AppCharge.AppChargeCreated": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "object",
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "paidAt": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "confirmationUrl": {
                        "type": "string"
                    }
                }
            },
            "AppCharge.BillingSaleInput": {
                "type": "object",
                "required": [
                    "planId",
                    "returnUrl"
                ],
                "properties": {
                    "planId": {
                        "format": "uuid",
                        "externalDocs": {
                            "url": "https://schema.org/identifier"
                        },
                        "type": "string"
                    },
                    "returnUrl": {
                        "maxLength": 2048,
                        "type": "string"
                    }
                }
            },
            "AppIngredient": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "organizationId": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "reference": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    }
                }
            },
            "AppIngredientPage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AppIngredient"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppOrganization": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "parentIds": {
                        "description": "every parent of the organization within the installation's coverage, ascending; empty for a root of the coverage",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "AppOrganizationPage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AppOrganization"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppPackaging": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "organizationId": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "reference": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    }
                }
            },
            "AppPackagingPage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AppPackaging"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppProduct": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "organizationId": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "reference": {
                        "type": "string",
                        "nullable": true
                    },
                    "sku": {
                        "type": "string",
                        "nullable": true
                    },
                    "brand": {
                        "type": "string",
                        "nullable": true
                    },
                    "category": {
                        "type": "string",
                        "nullable": true
                    },
                    "status": {
                        "type": "string"
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    }
                }
            },
            "AppProductPage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AppProduct"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppQuestionnaireAnswers": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "questionnaire": {
                        "$ref": "#/components/schemas/QuestionnaireRef"
                    },
                    "entity": {
                        "$ref": "#/components/schemas/EntityRef"
                    },
                    "status": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    },
                    "values": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/QuestionnaireAnswerValue"
                        }
                    }
                }
            },
            "AppQuestionnaireAnswersPage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/QuestionnaireAnswersSummary"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppScorePage": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Score"
                        }
                    },
                    "nextCursor": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "AppSubscription": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "object",
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "trialEndsAt": {
                        "type": "string",
                        "nullable": true
                    },
                    "currentPeriodEnd": {
                        "type": "string",
                        "nullable": true
                    },
                    "cancelAtPeriodEnd": {
                        "type": "boolean"
                    },
                    "createdAt": {
                        "type": "string"
                    }
                }
            },
            "AppSubscription.AppSubscriptionCreated": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "object",
                        "additionalProperties": {
                            "anyOf": [
                                {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "trialEndsAt": {
                        "type": "string",
                        "nullable": true
                    },
                    "currentPeriodEnd": {
                        "type": "string",
                        "nullable": true
                    },
                    "cancelAtPeriodEnd": {
                        "type": "boolean"
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "confirmationUrl": {
                        "type": "string"
                    }
                }
            },
            "AppSubscription.BillingSaleInput": {
                "type": "object",
                "required": [
                    "planId",
                    "returnUrl"
                ],
                "properties": {
                    "planId": {
                        "format": "uuid",
                        "externalDocs": {
                            "url": "https://schema.org/identifier"
                        },
                        "type": "string"
                    },
                    "returnUrl": {
                        "maxLength": 2048,
                        "type": "string"
                    }
                }
            },
            "AuthenticationError": {
                "type": "object",
                "required": [
                    "message"
                ],
                "properties": {
                    "code": {
                        "type": "integer",
                        "example": 401
                    },
                    "message": {
                        "type": "string",
                        "example": "Invalid credentials."
                    },
                    "type": {
                        "type": "string",
                        "example": "api_key_authentication_error",
                        "description": "Present when an API key is rejected."
                    }
                }
            },
            "ConstraintViolation": {
                "type": "object",
                "description": "Unprocessable entity",
                "properties": {
                    "status": {
                        "default": 422,
                        "type": "integer"
                    },
                    "violations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "propertyPath": {
                                    "type": "string",
                                    "description": "The property path of the violation"
                                },
                                "message": {
                                    "type": "string",
                                    "description": "The message associated with the violation"
                                },
                                "code": {
                                    "type": "string",
                                    "description": "The code of the violation"
                                },
                                "hint": {
                                    "type": "string",
                                    "description": "An extra hint to understand the violation"
                                },
                                "payload": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "description": "The serialized payload of the violation"
                                }
                            },
                            "required": [
                                "propertyPath",
                                "message"
                            ]
                        }
                    },
                    "detail": {
                        "readOnly": true,
                        "type": "string"
                    },
                    "type": {
                        "readOnly": true,
                        "type": "string"
                    },
                    "title": {
                        "readOnly": true,
                        "type": "string",
                        "nullable": true
                    },
                    "instance": {
                        "readOnly": true,
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "CurrentAppInstallation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "handle": {
                        "type": "string"
                    },
                    "platform": {
                        "type": "string"
                    },
                    "grantedScopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "organizationIds": {
                        "description": "the organizations granted at consent",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "coveredOrganizationIds": {
                        "description": "those and their descendants: what a session token's `org` may name",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "EntityRef": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "id": {
                        "type": "integer"
                    }
                }
            },
            "Error": {
                "type": "object",
                "description": "A representation of common errors.",
                "properties": {
                    "title": {
                        "readOnly": true,
                        "description": "A short, human-readable summary of the problem.",
                        "type": "string",
                        "nullable": true
                    },
                    "detail": {
                        "readOnly": true,
                        "description": "A human-readable explanation specific to this occurrence of the problem.",
                        "type": "string",
                        "nullable": true
                    },
                    "status": {
                        "type": "integer",
                        "default": 400,
                        "nullable": true,
                        "example": [
                            404
                        ]
                    },
                    "instance": {
                        "readOnly": true,
                        "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
                        "type": "string",
                        "nullable": true
                    },
                    "type": {
                        "readOnly": true,
                        "description": "A URI reference that identifies the problem type",
                        "type": "string"
                    }
                }
            },
            "QuestionnaireAnswerValue": {
                "type": "object",
                "properties": {
                    "questionCode": {
                        "type": "string",
                        "nullable": true
                    },
                    "label": {
                        "type": "string"
                    },
                    "value": {
                        "anyOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "unit": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "QuestionnaireAnswersSummary": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "questionnaire": {
                        "$ref": "#/components/schemas/QuestionnaireRef"
                    },
                    "entity": {
                        "$ref": "#/components/schemas/EntityRef"
                    },
                    "status": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    }
                }
            },
            "QuestionnaireRef": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "versionId": {
                        "type": "integer"
                    }
                }
            },
            "Score": {
                "type": "object",
                "properties": {
                    "scoreId": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string",
                        "nullable": true
                    },
                    "label": {
                        "type": "string"
                    },
                    "value": {
                        "type": "number",
                        "nullable": true
                    },
                    "unit": {
                        "type": "string",
                        "nullable": true
                    }
                }
            }
        },
        "securitySchemes": {
            "installationToken": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT",
                "description": "The installation token: the access token the platform issues to the app when an administrator installs it (OAuth 2.0 authorization code flow), and renews with the refresh token. Send it as `Authorization: Bearer <token>`. It is valid for an hour."
            }
        }
    },
    "tags": [
        {
            "name": "App API v1",
            "description": "The API an installed marketplace app calls with its installation token (`/api/app/v1`). Read-only in v1, versioned by path: v1 only ever receives additive changes."
        }
    ]
}
