{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "Myle API",
    "version" : "2026-11-21",
    "description" : "The Myle API. Errors answer {code, context, error, request_id}: branch on code, read context with that code's schema, show error (French or English, from Accept-Language) to a person, never parse it."
  },
  "tags" : [
    {
      "name" : "Me",
      "description" : "The signed-in user"
    },
    {
      "name" : "Organizations",
      "description" : "The organizations the caller is a member of"
    },
    {
      "name" : "API keys",
      "description" : "Credentials for programs: user keys act as their owner, organization keys as their own robot account, with Myle rights. Managed with a signed-in session only."
    },
    {
      "name" : "Rights",
      "description" : "The rights of the Myle permission model, which members and API keys hold"
    },
    {
      "name" : "Products",
      "description" : "The organization's catalog: the products and services it sells, with their prices and barcodes"
    },
    {
      "name" : "Companies",
      "description" : "The organization's customers: businesses, consumers and foreign clients, with their addresses and e-mail addresses"
    },
    {
      "name" : "Invoices",
      "description" : "The organization's sales invoices: drafts, their validation (the legal number), their PDF and Factur-X"
    },
    {
      "name" : "Quotations",
      "description" : "The organization's quotations: the offers it makes its customers, sent, accepted or refused, extended, and billed as invoices"
    },
    {
      "name" : "Orders",
      "description" : "The organization's orders: what its customers order, confirmed, prepared, delivered (with the stock lots the goods leave from) and billed"
    },
    {
      "name" : "Delivery notes",
      "description" : "The organization's delivery notes: the goods handed to a customer, with the lots they left from"
    },
    {
      "name" : "E-invoicing",
      "description" : "E-invoicing through the organization's approved platform (SuperPDP): its connection and address, a customer's routing, the e-invoice of an invoice, and the e-invoices suppliers send"
    },
    {
      "name" : "Payments",
      "description" : "The organization's Stripe account, its customers' SEPA mandates, the debit and the refund of an invoice, its payment status"
    }
  ],
  "servers" : [
    {
      "url" : "https://api.myleapp.fr",
      "description" : "Production"
    }
  ],
  "paths" : {
    "/me" : {
      "get" : {
        "tags" : [
          "Me"
        ],
        "summary" : "Get the signed-in user",
        "description" : "Returns the user the credential belongs to: the signed-in person for a session or a user key; for an organization key, its robot account (object robot, id robot_<uuid>).",
        "operationId" : "getMe",
        "parameters" : [
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The signed-in user",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UserResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}" : {
      "get" : {
        "tags" : [
          "Organizations"
        ],
        "summary" : "Get an organization",
        "description" : "Returns an organization the caller is a member of. An organization that does not exist and one the caller is not a member of get the same 404.",
        "operationId" : "getOrganization",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The organization",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrganizationResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/me/api-keys" : {
      "get" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "List my API keys",
        "description" : "Returns the signed-in user's own keys (user keys), revoked ones included, newest first.",
        "operationId" : "listMyApiKeys",
        "parameters" : [
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The user's keys",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResourceList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Create a user key",
        "description" : "Creates a key acting as the signed-in user, with their live rights in every organization or in the ones listed, optionally narrowed to a list of rights. Needs a passkey step-up for apiKey.create. The token is in this answer only. At most 10 active user keys per user. A replay of the same request (Idempotency-Key) answers the key without its token, which Myle never keeps.",
        "operationId" : "createMyApiKey",
        "parameters" : [
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateUserApiKey"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new key, with its token",
            "headers" : {
              "Location" : {
                "description" : "The new key's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The limit of active API keys is reached (10 per user, 20 per organization); revoke one first.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "auth.api-key.limit-reached" : "#/components/schemas/Error.auth.api-key.limit-reached"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      }
    },
    "/me/api-keys/{apiKeyId}" : {
      "get" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Get one of my API keys",
        "description" : "Returns one of the signed-in user's keys. With ?organizationId=, its effectiveRights are what it may do in that organization.",
        "operationId" : "getMyApiKey",
        "parameters" : [
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "An organization to compute effectiveRights in",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The key",
            "headers" : {
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Revoke one of my API keys",
        "description" : "Revokes a user key at once. Revoking a revoked key changes nothing. With If-Match, refused (412) if the key changed since it was read.",
        "operationId" : "revokeMyApiKey",
        "parameters" : [
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the key has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The key is revoked"
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Change one of my API keys",
        "description" : "Renames a user key, or narrows or widens its organizations and rights, never beyond the user's own. A revoked or expired key cannot change (409). With If-Match, refused (412) if the key changed since it was read.",
        "operationId" : "updateMyApiKey",
        "parameters" : [
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the key has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateUserApiKey"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateUserApiKey"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The key, changed",
            "headers" : {
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The request conflicts with an existing resource.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.conflict"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      }
    },
    "/me/api-keys/{apiKeyId}/rotate" : {
      "post" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Rotate one of my API keys",
        "description" : "Creates a new key with the same name, organizations and rights, and makes the old one expire within 24 hours. Needs a passkey step-up for apiKey.create. The new token is in this answer only. A replay of the same request (Idempotency-Key) answers the key without its token, which Myle never keeps.",
        "operationId" : "rotateMyApiKey",
        "parameters" : [
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The new key, with its token",
            "headers" : {
              "Location" : {
                "description" : "The new key's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The request conflicts with an existing resource.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "core.conflict" : "#/components/schemas/Error.core.conflict"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/api-keys" : {
      "get" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "List the organization's API keys",
        "description" : "Returns the organization's keys, revoked ones included, newest first.",
        "operationId" : "listApiKeys",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The organization's keys",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResourceList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Create an organization key",
        "description" : "Creates a key acting as its own robot account in this organization, configured like a member: a role and/or direct rights, and a tag scope. You can only give rights you hold, and a role whose rights you hold all. Needs a passkey step-up for apiKey.create. The token is in this answer only. At most 20 active keys per organization. A replay of the same request (Idempotency-Key) answers the key without its token, which Myle never keeps.",
        "operationId" : "createApiKey",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateOrganizationApiKey"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new key, with its token",
            "headers" : {
              "Location" : {
                "description" : "The new key's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.subscription-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The limit of active API keys is reached (10 per user, 20 per organization); revoke one first.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "auth.api-key.limit-reached" : "#/components/schemas/Error.auth.api-key.limit-reached"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/api-keys/{apiKeyId}" : {
      "get" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Get one of the organization's API keys",
        "description" : "Returns one of the organization's keys, with its effective rights.",
        "operationId" : "getApiKey",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The key",
            "headers" : {
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Revoke one of the organization's API keys",
        "description" : "Revokes an organization key at once and deactivates its robot account. Revoking it again changes nothing. With If-Match, refused (412) if the key changed since it was read. Allowed to an organization without an active subscription (read-only), which may always cut an access.",
        "operationId" : "revokeApiKey",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the key has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The key is revoked"
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Change one of the organization's API keys",
        "description" : "Renames an organization key (and its robot account), or changes its role, direct rights or tag scope. What you change must be rights you hold. A revoked or expired key cannot change (409). With If-Match, refused (412) if the key changed since it was read.",
        "operationId" : "updateApiKey",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the key has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateOrganizationApiKey"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateOrganizationApiKey"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The key, changed",
            "headers" : {
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.subscription-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The request conflicts with an existing resource.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.conflict"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/api-keys/{apiKeyId}/rotate" : {
      "post" : {
        "tags" : [
          "API keys"
        ],
        "summary" : "Rotate one of the organization's API keys",
        "description" : "Creates a new key with the same name, rights and robot account, and makes the old one expire within 24 hours. You must hold every right of the key. Needs a passkey step-up for apiKey.create. The new token is in this answer only. A replay of the same request (Idempotency-Key) answers the key without its token, which Myle never keeps.",
        "operationId" : "rotateApiKey",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "apiKeyId",
            "in" : "path",
            "description" : "The apiKey's id (apiKey_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The new key, with its token",
            "headers" : {
              "Location" : {
                "description" : "The new key's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The key's current configuration, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiKeyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.subscription-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The request conflicts with an existing resource.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "core.conflict" : "#/components/schemas/Error.core.conflict"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "API_KEYS_MANAGE"
            ]
          }
        ]
      }
    },
    "/rights" : {
      "get" : {
        "tags" : [
          "Rights"
        ],
        "summary" : "List the rights",
        "description" : "Returns every right of the Myle permission model a member or an API key can hold, with its French and English labels. Public: no credential is needed.",
        "operationId" : "listRights",
        "parameters" : [
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The rights",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RightResourceList"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{id}/products" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "List the products",
        "description" : "Returns the organization's products the caller can see (its tag scope applies), filtered and sorted, one page at a time. For a synchronization: updatedAfter with the largest updatedAt already seen.",
        "operationId" : "listProducts",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name and the number, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Products of one of these statuses (repeat it for several): ACTIVE",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "ACTIVE"
                ]
              }
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Products carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a product carrying one of the tags; ALL, a product carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the products carrying every one of these tags (repeat it for several): one tag leaves out the products carrying it; with several, a product carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "barcode",
            "in" : "query",
            "description" : "Products carrying this barcode, exactly",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Products changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "name",
            "in" : "query",
            "description" : "Products whose name contains these words, in this order, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "number",
            "in" : "query",
            "description" : "Products whose number contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "accountingNumber",
            "in" : "query",
            "description" : "Products whose accounting account contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdBy",
            "in" : "query",
            "description" : "Products created by this person (user_<uuid>) or this organization key's robot (robot_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdByName",
            "in" : "query",
            "description" : "Products whose author's name (first name and last name) contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "hasBarcode",
            "in" : "query",
            "description" : "true: products carrying at least one barcode; false: products carrying none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, accountingNumber, createdAt or updatedAt; with a leading - for descending (-name). Ties are broken by the product's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "accountingNumber",
                "-accountingNumber",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of products of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of products",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_LIST"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Create a product",
        "description" : "Creates a product in the catalog. Its number must not be used by another product (409). With initialStock, creates its stock too, in the same transaction: that requires the Stocks module (402) and STOCKS_CREATE, and STOCKLINES_CREATE for a quantity above 0 (403); the stock's reference derives from the product's. Send an Idempotency-Key to retry safely.",
        "operationId" : "createProduct",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateProduct"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new product",
            "headers" : {
              "Location" : {
                "description" : "The new product's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The product's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The request conflicts with an existing resource.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "core.conflict" : "#/components/schemas/Error.core.conflict"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/products/tags" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "List the products' tags",
        "description" : "Returns the tags the organization's products carry, sorted: the values a tag filter of the product list can take. For a tag-scoped caller, only the tags of the products in its scope. All of them at once: nextCursor is never present. Open to whoever composes a document as well (quotations, orders, delivery notes, invoices), not only to who lists the catalog.",
        "operationId" : "listProductTags",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The tags, sorted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TagList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "session" : [
              "ORDER_CREATE"
            ]
          },
          {
            "session" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "session" : [
              "DELIVERYFORMS_CREATE"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "DELIVERYFORMS_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "userKey" : [
              "ORDER_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "userKey" : [
              "DELIVERYFORMS_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/products/{productId}" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Get a product",
        "description" : "Returns a product the caller can see; one outside its tag scope, deleted or unknown is a 404.",
        "operationId" : "getProduct",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The product",
            "headers" : {
              "ETag" : {
                "description" : "The product's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Delete a product",
        "description" : "Deletes a product: it leaves the catalog, the documents that name it keep it. With If-Match, refused (412) if the product changed since it was read.",
        "operationId" : "deleteProduct",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the product has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The product is deleted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_DELETE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Change a product",
        "description" : "Changes the members sent (a JSON merge patch); the others stay as they are. With If-Match, refused (412) if the product changed since it was read. Its number must not be used by another product (409).",
        "operationId" : "updateProduct",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the product has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateProduct"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateProduct"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The product, changed",
            "headers" : {
              "ETag" : {
                "description" : "The product's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The request conflicts with an existing resource.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.conflict"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_PATCH"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/products/{productId}/neighbors" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Get a product's neighbors in the list",
        "description" : "Returns the products right before and right after this one in the product list read with the same filters and sort (the list's query parameters, without limit, cursor and includeTotal): next is the first product of the page that follows a page ending on this one, previous the one before it in that order. Each is null at an end of the list, and both are null when the filters leave the product out of it. The product must be one the caller can see (404 otherwise); its tag scope applies to the neighbors too.",
        "operationId" : "getProductNeighbors",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name and the number, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Products of one of these statuses (repeat it for several): ACTIVE",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "ACTIVE"
                ]
              }
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Products carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a product carrying one of the tags; ALL, a product carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the products carrying every one of these tags (repeat it for several): one tag leaves out the products carrying it; with several, a product carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "barcode",
            "in" : "query",
            "description" : "Products carrying this barcode, exactly",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Products changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "name",
            "in" : "query",
            "description" : "Products whose name contains these words, in this order, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "number",
            "in" : "query",
            "description" : "Products whose number contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "accountingNumber",
            "in" : "query",
            "description" : "Products whose accounting account contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdBy",
            "in" : "query",
            "description" : "Products created by this person (user_<uuid>) or this organization key's robot (robot_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdByName",
            "in" : "query",
            "description" : "Products whose author's name (first name and last name) contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "hasBarcode",
            "in" : "query",
            "description" : "true: products carrying at least one barcode; false: products carrying none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, accountingNumber, createdAt or updatedAt; with a leading - for descending (-name). Ties are broken by the product's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "accountingNumber",
                "-accountingNumber",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The product's neighbors",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductNeighbors"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_LIST"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/products/{productId}/barcodes" : {
      "post" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Add a barcode to a product",
        "description" : "Adds a barcode to a product the caller can see. The value must be valid for its format (an EAN's check digit), and, for an organization that declared its GS1 company prefix, an EAN-13 must start with it (422). A product carries a value once (409); two products may carry the same one. A new main barcode replaces the previous one. The product's version moves. Send an Idempotency-Key to retry safely.",
        "operationId" : "createProductBarcode",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateBarcode"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new barcode",
            "headers" : {
              "Location" : {
                "description" : "The new barcode's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The product's version: a barcode is part of its product, whose ETag it shares",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BarcodeResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The product already carries this barcode (another product of the organization may carry it too).",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.products.barcode.duplicate"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "products.barcode.duplicate" : "#/components/schemas/Error.products.barcode.duplicate"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: The organization declared its GS1 company prefix, and this EAN-13 does not start with it: register the supplier's barcode on the supplier's product, or use an internal code (restricted distribution, 200 to 299).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.products.barcode.outside-company-prefix"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "products.barcode.outside-company-prefix" : "#/components/schemas/Error.products.barcode.outside-company-prefix"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/products/{productId}/barcodes/{barcodeId}" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Get a barcode of a product",
        "description" : "Returns one barcode of a product the caller can see (the product embeds them all), with the product's ETag.",
        "operationId" : "getProductBarcode",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "barcodeId",
            "in" : "path",
            "description" : "The barcode's id (barcode_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The barcode",
            "headers" : {
              "ETag" : {
                "description" : "The product's version: a barcode is part of its product, whose ETag it shares",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BarcodeResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_BARCODES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_BARCODES_LIST"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_BARCODES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Remove a barcode from a product",
        "description" : "Removes a barcode from a product the caller can see; the documents that printed it keep it. With If-Match (the product's ETag), refused (412) if the product changed since it was read.",
        "operationId" : "deleteProductBarcode",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "barcodeId",
            "in" : "path",
            "description" : "The barcode's id (barcode_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The product's ETag read: the write is refused (412) if the product (its barcodes included) has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The barcode is removed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_BARCODES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_BARCODES_DELETE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_BARCODES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Change a barcode of a product",
        "description" : "Makes the barcode the product's main one ({\"isPrimary\": true}, a JSON merge patch); the previous main barcode stops being. Already the main one, nothing changes. With If-Match (the product's ETag), refused (412) if the product changed since it was read.",
        "operationId" : "updateProductBarcode",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "productId",
            "in" : "path",
            "description" : "The product's id (product_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "barcodeId",
            "in" : "path",
            "description" : "The barcode's id (barcode_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The product's ETag read: the write is refused (412) if the product (its barcodes included) has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateBarcode"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateBarcode"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The barcode, changed",
            "headers" : {
              "ETag" : {
                "description" : "The product's version: a barcode is part of its product, whose ETag it shares",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BarcodeResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ARTICLES_BARCODES_CREATE"
            ]
          }
        ]
      }
    },
    "/products" : {
      "get" : {
        "tags" : [
          "Products"
        ],
        "summary" : "Search the products across organizations",
        "description" : "Returns the products of every organization the caller may read them in — a member with ARTICLES_LIST (a user key: among the organizations it reaches, its rights narrowed; an organization key: its own), whose plan carries the « Products » module —, each inside the caller's tag scope there. The same filters, sort and pages as an organization's list, plus organizationId; each product says its organizationId.",
        "operationId" : "searchProducts",
        "parameters" : [
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "Only the organizations among these (organization_<uuid>, repeat it for several); one the caller cannot read adds nothing",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name and the number, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Products of one of these statuses (repeat it for several): ACTIVE",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "ACTIVE"
                ]
              }
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Products carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a product carrying one of the tags; ALL, a product carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the products carrying every one of these tags (repeat it for several): one tag leaves out the products carrying it; with several, a product carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "barcode",
            "in" : "query",
            "description" : "Products carrying this barcode, exactly",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Products changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "name",
            "in" : "query",
            "description" : "Products whose name contains these words, in this order, accents and case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "number",
            "in" : "query",
            "description" : "Products whose number contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "accountingNumber",
            "in" : "query",
            "description" : "Products whose accounting account contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdBy",
            "in" : "query",
            "description" : "Products created by this person (user_<uuid>) or this organization key's robot (robot_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "createdByName",
            "in" : "query",
            "description" : "Products whose author's name (first name and last name) contains this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "hasBarcode",
            "in" : "query",
            "description" : "true: products carrying at least one barcode; false: products carrying none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, accountingNumber, createdAt or updatedAt; with a leading - for descending (-name). Ties are broken by the product's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "accountingNumber",
                "-accountingNumber",
                "createdAt",
                "-createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of products of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of products",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/tags" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "List the companies' tags",
        "description" : "Returns the tags the companies the caller can see carry (its tag scope applies), sorted.",
        "operationId" : "listCompanyTags",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The tags, in one page",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/neighbors" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Get a company's neighbors in a list",
        "description" : "Returns the companies just before and just after this one in the list read with the same filters and sort (GET …/companies): what a « previous / next » navigation needs. A company the filters leave out has none.",
        "operationId" : "getCompanyNeighbors",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name (accents and case ignored), the number and the SIREN",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Companies carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Companies changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, createdAt, headquartersCity (the city of its headquarters, the companies without one last) or updatedAt; with a leading - for descending (-name; -headquartersCity puts the companies without a city first). Ties are broken by the company's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "createdAt",
                "-createdAt",
                "headquartersCity",
                "-headquartersCity",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a company carrying one of the tags; ALL, a company carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the companies carrying every one of these tags (repeat it for several): one tag leaves out the companies carrying it; with several, a company carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "nameOrIdentifier",
            "in" : "query",
            "description" : "Companies whose name (accents and case ignored), number, SIREN or VAT number contains these words, in this order",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "address",
            "in" : "query",
            "description" : "Companies with an address (headquarters, billing or delivery) whose label, street, postal code and city, put end to end, contain this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "contact",
            "in" : "query",
            "description" : "Companies with an e-mail address or a phone number containing this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "invoicingPeriod",
            "in" : "query",
            "description" : "Companies invoiced at this period: MONTHLY, TEN_DAYS, DAILY or DISABLED",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "MONTHLY",
                "TEN_DAYS",
                "DAILY",
                "DISABLED"
              ]
            }
          },
          {
            "name" : "createdAtFrom",
            "in" : "query",
            "description" : "Companies created on or after this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "createdAtTo",
            "in" : "query",
            "description" : "Companies created on or before this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "hasUnpaidInvoices",
            "in" : "query",
            "description" : "true: companies with an invoice still to be paid (outstanding, partly paid or lost); false: those with none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "hasShopAccess",
            "in" : "query",
            "description" : "true: companies with an active Boutique access; false: those without. Ignored when the caller cannot see the Boutique accesses (hasShopAccess is null then)",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Its neighbors",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyNeighborsResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/email-addresses" : {
      "post" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Add an e-mail address to a company",
        "description" : "Adds an e-mail address to a customer, with the documents to send it automatically. An address the company already has is a conflict (409). Moves the company's version. Send an Idempotency-Key to retry safely.",
        "operationId" : "createCompanyEmailAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EmailAddressInput"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The e-mail address",
            "headers" : {
              "Location" : {
                "description" : "The new e-mail address's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The company's version after the change, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyEmailAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The request conflicts with an existing resource.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "core.conflict" : "#/components/schemas/Error.core.conflict"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/email-addresses/{companyEmailAddressId}" : {
      "delete" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Remove an e-mail address from a company",
        "description" : "Removes an e-mail address from a customer. Moves the company's version. With If-Match (the company's ETag), refused (412) if the company changed since it was read.",
        "operationId" : "deleteCompanyEmailAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyEmailAddressId",
            "in" : "path",
            "description" : "The companyEmailAddress's id (companyEmailAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The company's ETag as read (GET …/companies/{companyId}, or the ETag of the last change); absent or *: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The e-mail address is removed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Change an e-mail address of a company",
        "description" : "Changes the label or the purposes of an e-mail address of a customer (a JSON merge patch). Moves the company's version. With If-Match (the company's ETag), refused (412) if the company changed since it was read.",
        "operationId" : "updateCompanyEmailAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyEmailAddressId",
            "in" : "path",
            "description" : "The companyEmailAddress's id (companyEmailAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The company's ETag as read (GET …/companies/{companyId}, or the ETag of the last change); absent or *: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateCompanyEmailAddress"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateCompanyEmailAddress"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The e-mail address, changed",
            "headers" : {
              "ETag" : {
                "description" : "The company's version after the change, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyEmailAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/email-addresses/{companyEmailAddressId}/resubscribe" : {
      "post" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Subscribe an e-mail address of a company again",
        "description" : "Subscribes again to the campaigns and grouped mailings an address that unsubscribed: it overrides its owner's choice, so it is audited. Moves the company's version.",
        "operationId" : "resubscribeCompanyEmailAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyEmailAddressId",
            "in" : "path",
            "description" : "The companyEmailAddress's id (companyEmailAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The e-mail address, subscribed",
            "headers" : {
              "ETag" : {
                "description" : "The company's version after the change, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyEmailAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_RESUBSCRIBE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_RESUBSCRIBE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_RESUBSCRIBE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/postal-addresses" : {
      "post" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Add a postal address to a company",
        "description" : "Adds a delivery address to a customer, geocoded for the routes. Moves the company's version. Send an Idempotency-Key to retry safely.",
        "operationId" : "createCompanyPostalAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddressInput"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The postal address",
            "headers" : {
              "Location" : {
                "description" : "The new postal address's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The company's version after the change, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PostalAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: The establishment SIRET of an address is not 14 digits.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "crm.company.invalid-siret" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/postal-addresses/{postalAddressId}" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Get a postal address of a company",
        "description" : "Returns a postal address of a customer — its headquarters, billing or delivery address —, as the company embeds it, with the company's ETag (an address has no version of its own).",
        "operationId" : "getCompanyPostalAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "postalAddressId",
            "in" : "path",
            "description" : "The postalAddress's id (postalAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The postal address",
            "headers" : {
              "ETag" : {
                "description" : "The company's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PostalAddressResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Remove a postal address from a company",
        "description" : "Removes a postal address from a customer. Refused (409) while it is the company's headquarters or billing address, or an order in progress is delivered there. Moves the company's version. With If-Match (the company's ETag), refused (412) if the company changed since it was read.",
        "operationId" : "deleteCompanyPostalAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "postalAddressId",
            "in" : "path",
            "description" : "The postalAddress's id (postalAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The company's ETag as read (GET …/companies/{companyId}, or the ETag of the last change); absent or *: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The postal address is removed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "409" : {
            "description" : "A delivery address the request removes is still in use: nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.crm.postal-address.referenced"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Change a postal address of a company",
        "description" : "Changes a postal address of a customer — its headquarters, billing or delivery address — (a JSON merge patch). A new street, postal code or city locates it again for the routes, and the customer's documents in progress follow it; a label, a SIRET, hours or instructions alone keep its location. Moves the company's version. With If-Match (the company's ETag), refused (412) if the company changed since it was read.",
        "operationId" : "updateCompanyPostalAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "postalAddressId",
            "in" : "path",
            "description" : "The postalAddress's id (postalAddress_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The company's ETag as read (GET …/companies/{companyId}, or the ETag of the last change); absent or *: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdatePostalAddress"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdatePostalAddress"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The postal address, changed",
            "headers" : {
              "ETag" : {
                "description" : "The company's version after the change, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PostalAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: The establishment SIRET of an address is not 14 digits.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "crm.company.invalid-siret" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "List the companies",
        "description" : "Returns the organization's customers the caller can see (its tag scope applies), filtered and sorted, one page at a time. For a synchronization: updatedAfter with the largest updatedAt already seen, sort updatedAt.",
        "operationId" : "listCompanies",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name (accents and case ignored), the number and the SIREN",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Companies carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Companies changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, createdAt, headquartersCity (the city of its headquarters, the companies without one last) or updatedAt; with a leading - for descending (-name; -headquartersCity puts the companies without a city first). Ties are broken by the company's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "createdAt",
                "-createdAt",
                "headquartersCity",
                "-headquartersCity",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a company carrying one of the tags; ALL, a company carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the companies carrying every one of these tags (repeat it for several): one tag leaves out the companies carrying it; with several, a company carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "nameOrIdentifier",
            "in" : "query",
            "description" : "Companies whose name (accents and case ignored), number, SIREN or VAT number contains these words, in this order",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "address",
            "in" : "query",
            "description" : "Companies with an address (headquarters, billing or delivery) whose label, street, postal code and city, put end to end, contain this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "contact",
            "in" : "query",
            "description" : "Companies with an e-mail address or a phone number containing this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "invoicingPeriod",
            "in" : "query",
            "description" : "Companies invoiced at this period: MONTHLY, TEN_DAYS, DAILY or DISABLED",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "MONTHLY",
                "TEN_DAYS",
                "DAILY",
                "DISABLED"
              ]
            }
          },
          {
            "name" : "createdAtFrom",
            "in" : "query",
            "description" : "Companies created on or after this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "createdAtTo",
            "in" : "query",
            "description" : "Companies created on or before this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "hasUnpaidInvoices",
            "in" : "query",
            "description" : "true: companies with an invoice still to be paid (outstanding, partly paid or lost); false: those with none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "hasShopAccess",
            "in" : "query",
            "description" : "true: companies with an active Boutique access; false: those without. Ignored when the caller cannot see the Boutique accesses (hasShopAccess is null then)",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of companies of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of companies",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Create a company",
        "description" : "Creates a customer, with its addresses and e-mail addresses. A French business (BUSINESS_FR) needs a SIREN, a SIRET or a VAT number. Its number and its accounting number must not be another company's (409). Counts in the plan's number of companies (402 once reached). Send an Idempotency-Key to retry safely.",
        "operationId" : "createCompany",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateCompany"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new company",
            "headers" : {
              "Location" : {
                "description" : "The new company's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The company's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The request conflicts with an existing resource. Or: Another company of the organization has this accounting number.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.accounting-number-taken"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "core.conflict" : "#/components/schemas/Error.core.conflict",
                      "crm.company.accounting-number-taken" : "#/components/schemas/Error.crm.company.accounting-number-taken"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A French business (type BUSINESS_FR) needs a SIREN, a SIRET or a VAT number; send one, or choose the CONSUMER or FOREIGN type. Or: The SIREN (9 digits, or a 14-digit SIRET) or the French VAT number (FR, a 2-digit key, the SIREN) cannot be read. Or: The establishment SIRET of an address is not 14 digits.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.identifier-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-identifier"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "crm.company.identifier-required" : "#/components/schemas/Error.crm.company.identifier-required",
                      "crm.company.invalid-identifier" : "#/components/schemas/Error.crm.company.invalid-identifier",
                      "crm.company.invalid-siret" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_CREATE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Get a company",
        "description" : "Returns a customer the caller can see; one outside its tag scope, deleted or unknown is a 404.",
        "operationId" : "getCompany",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The company",
            "headers" : {
              "ETag" : {
                "description" : "The company's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Delete a company",
        "description" : "Deletes a customer: it leaves the lists, its documents keep it. With If-Match, refused (412) if the company changed since it was read.",
        "operationId" : "deleteCompany",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the company has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The company is deleted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_DELETE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Change a company",
        "description" : "Changes the members sent (a JSON merge patch); the others stay as they are. The identifier rules apply to the company as changed. With If-Match, refused (412) if the company changed since it was read. autoDebit (the SEPA auto-debit of its validated invoices) needs STRIPE_MANDATES_MANAGE, every other member COMPANIES_PATCH; turning it on follows the money operations' rule: the collection open, a plan with SEPA debits, a session's passkey step-up stripe.setAutoDebit (an API key holding the right needs none).",
        "operationId" : "updateCompany",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the company has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateCompany"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateCompany"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The company, changed",
            "headers" : {
              "ETag" : {
                "description" : "The company's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan does not carry Stripe collection (SEPA debits, mandates, auto-debit, online payment of invoices); the trial does not either. It comes with a paid plan.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "payments.plan.collection-required" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The request conflicts with an existing resource. Or: Another company of the organization has this accounting number. Or: A delivery address the request removes is still in use: nothing was written. Or: A demo organization never reaches Stripe: nothing was done. Or: The organization turned its Stripe collection off (in its payment settings): nothing is debited, no mandate is offered, no auto-debit is turned on until it turns it back on. Or: The organization's Stripe collection is paused because it no longer pays for Myle: it resumes with its subscription.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.conflict"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.accounting-number-taken"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.postal-address.referenced"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.demo"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.disabled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.paused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.conflict" : "#/components/schemas/Error.core.conflict",
                      "crm.company.accounting-number-taken" : "#/components/schemas/Error.crm.company.accounting-number-taken",
                      "crm.postal-address.referenced" : "#/components/schemas/Error.crm.postal-address.referenced",
                      "payments.account.demo" : "#/components/schemas/Error.payments.account.demo",
                      "payments.collection.disabled" : "#/components/schemas/Error.payments.collection.disabled",
                      "payments.collection.paused" : "#/components/schemas/Error.payments.collection.paused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: A French business (type BUSINESS_FR) needs a SIREN, a SIRET or a VAT number; send one, or choose the CONSUMER or FOREIGN type. Or: The SIREN (9 digits, or a 14-digit SIRET) or the French VAT number (FR, a 2-digit key, the SIREN) cannot be read. Or: The establishment SIRET of an address is not 14 digits.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.identifier-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-identifier"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "crm.company.identifier-required" : "#/components/schemas/Error.crm.company.identifier-required",
                      "crm.company.invalid-identifier" : "#/components/schemas/Error.crm.company.invalid-identifier",
                      "crm.company.invalid-siret" : "#/components/schemas/Error.crm.company.invalid-siret"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "session" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          }
        ]
      }
    },
    "/companies" : {
      "get" : {
        "tags" : [
          "Companies"
        ],
        "summary" : "Search the companies across organizations",
        "description" : "Returns the customers of every organization the caller may read them in — a member with COMPANIES_LIST (a user key: among the organizations it reaches, its rights narrowed; an organization key: its own), whose plan carries the « Companies » module —, each inside the caller's tag scope there. The same filters, sort and pages as an organization's list, plus organizationId; each company says its organizationId.",
        "operationId" : "searchCompanies",
        "parameters" : [
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "Only the organizations among these (organization_<uuid>, repeat it for several); one the caller cannot read adds nothing",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the name (accents and case ignored), the number and the SIREN",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Companies carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Companies changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "name (the default), number, createdAt, headquartersCity (the city of its headquarters, the companies without one last) or updatedAt; with a leading - for descending (-name; -headquartersCity puts the companies without a city first). Ties are broken by the company's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "name",
                "-name",
                "number",
                "-number",
                "createdAt",
                "-createdAt",
                "headquartersCity",
                "-headquartersCity",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a company carrying one of the tags; ALL, a company carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the companies carrying every one of these tags (repeat it for several): one tag leaves out the companies carrying it; with several, a company carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "nameOrIdentifier",
            "in" : "query",
            "description" : "Companies whose name (accents and case ignored), number, SIREN or VAT number contains these words, in this order",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "address",
            "in" : "query",
            "description" : "Companies with an address (headquarters, billing or delivery) whose label, street, postal code and city, put end to end, contain this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "contact",
            "in" : "query",
            "description" : "Companies with an e-mail address or a phone number containing this text, case ignored",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "invoicingPeriod",
            "in" : "query",
            "description" : "Companies invoiced at this period: MONTHLY, TEN_DAYS, DAILY or DISABLED",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "MONTHLY",
                "TEN_DAYS",
                "DAILY",
                "DISABLED"
              ]
            }
          },
          {
            "name" : "createdAtFrom",
            "in" : "query",
            "description" : "Companies created on or after this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "createdAtTo",
            "in" : "query",
            "description" : "Companies created on or before this day (YYYY-MM-DD, UTC)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "hasUnpaidInvoices",
            "in" : "query",
            "description" : "true: companies with an invoice still to be paid (outstanding, partly paid or lost); false: those with none",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "hasShopAccess",
            "in" : "query",
            "description" : "true: companies with an active Boutique access; false: those without. Ignored when the caller cannot see the Boutique accesses (hasShopAccess is null then)",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of companies of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of companies",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "List the invoices",
        "description" : "Returns the organization's invoices the caller can see (its tag scope applies), drafts included, deleted ones never, filtered and sorted, one page at a time. For a synchronization: updatedAfter with the largest updatedAt already seen, sort updatedAt.",
        "operationId" : "listInvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Invoices of one of these statuses (repeat it for several): DRAFT, VALIDATED, UNPAID, PAID…",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "UNPAID",
                  "PAID",
                  "PARTIALLY_PAID",
                  "PARTIALLY_PAID_OVERDUE",
                  "DRAFT",
                  "VALIDATED",
                  "SHARED",
                  "LOST",
                  "SEPA_PENDING",
                  "SEPA_FAILED",
                  "SEPA_DISPUTED",
                  "EINVOICE_SUBMITTED",
                  "EINVOICE_REJECTED",
                  "EINVOICE_DISPUTED",
                  "EINVOICE_REFUSED",
                  "PAYMENT_ANNOUNCED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Invoices of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Invoices issued on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Invoices issued on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateFrom",
            "in" : "query",
            "description" : "Invoices due on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateTo",
            "in" : "query",
            "description" : "Invoices due on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Invoices changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Invoices carrying one of these tags (repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-createdAt (the default), createdAt, updatedAt or -updatedAt",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of invoices",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Create a draft invoice",
        "description" : "Creates a DRAFT invoice: no number yet, nothing sent; POST …/validate gives it its legal number. Without INVOICES_CUSTOMIZE_PRICE, catalog products' lines take their catalog price and no discount. A line naming a stock-tracked product does not move a stock (only /v1's lines naming a stock do). Counts in the plan's number of invoices per month (402 once reached). Send an Idempotency-Key to retry safely.",
        "operationId" : "createInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateInvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new invoice",
            "headers" : {
              "Location" : {
                "description" : "The new invoice's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was created. Or: The invoice references a customer or products outside the caller's tag scope: nothing was created.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "billing.invoice.foreign-product" : "#/components/schemas/Error.billing.invoice.foreign-product",
                      "billing.invoice.out-of-scope-reference" : "#/components/schemas/Error.billing.invoice.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/tags" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "List the invoices' tags",
        "description" : "Returns the tags the organization's invoices carry, sorted: the values a tag filter of the invoice list can take. For a tag-scoped caller, only the tags of the invoices in its scope. All of them at once: nextCursor is never present.",
        "operationId" : "listInvoiceTags",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The tags, sorted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceTagList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/eligibility" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Count what each batch would act on",
        "description" : "Among the invoices the filters give (the list's filters: the caller's invoices, inside its tag scope, drafts included, deleted ones never), how many each batch would act on: the counts the web app shows on its batch buttons before a batch (« Valider · 52 »), and the public bodies among the drafts' customers, whom validating mails the original (Chorus Pro).",
        "operationId" : "getInvoiceEligibility",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Invoices of one of these statuses (repeat it for several): DRAFT, VALIDATED, UNPAID, PAID…",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "UNPAID",
                  "PAID",
                  "PARTIALLY_PAID",
                  "PARTIALLY_PAID_OVERDUE",
                  "DRAFT",
                  "VALIDATED",
                  "SHARED",
                  "LOST",
                  "SEPA_PENDING",
                  "SEPA_FAILED",
                  "SEPA_DISPUTED",
                  "EINVOICE_SUBMITTED",
                  "EINVOICE_REJECTED",
                  "EINVOICE_DISPUTED",
                  "EINVOICE_REFUSED",
                  "PAYMENT_ANNOUNCED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Invoices of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Invoices issued on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Invoices issued on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateFrom",
            "in" : "query",
            "description" : "Invoices due on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateTo",
            "in" : "query",
            "description" : "Invoices due on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Invoices changed strictly after this instant (RFC 3339)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Invoices carrying one of these tags (repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The counts",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceEligibility"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Get an invoice",
        "description" : "Returns an invoice the caller can see; one outside its tag scope, deleted or unknown is a 404. As JSON by default; with Accept: application/pdf, its PDF (the document Myle sends, drafts included), or with ?format=facturx its Factur-X (validated invoices only, 409 for a draft). An invoice of Myle's own subscriptions imported from Stripe answers Stripe's PDF.",
        "operationId" : "getInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "format",
            "in" : "query",
            "description" : "With Accept: application/pdf: pdf (the default) or facturx; ignored for JSON",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "pdf",
                "facturx"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice",
            "headers" : {
              "ETag" : {
                "description" : "With the JSON: the invoice's version, to send back in If-Match",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "Content-Disposition" : {
                "description" : "With the PDF: inline for the PDF, attachment for the Factur-X, with its file name",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              },
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A draft has no Factur-X: the Factur-X carries the legal number the validation gives.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.billing.invoice.facturx-unavailable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Delete a draft invoice",
        "description" : "Deletes a DRAFT: the stock movements it made are undone, the documents it was linked to released. A validated invoice is never deleted (409): it is cancelled by a credit note. With If-Match, refused (412) if the invoice changed since it was read.",
        "operationId" : "deleteInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The invoice is deleted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "409" : {
            "description" : "The invoice is no longer a draft: a validated invoice is never changed, deleted or validated again; it is cancelled or corrected by a credit note. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-a-draft"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "billing.invoice.not-a-draft" : "#/components/schemas/Error.billing.invoice.not-a-draft",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_DELETE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Change a draft invoice",
        "description" : "Changes the members sent of a DRAFT (a JSON merge patch): its tags. A validated invoice is never changed (409): it is corrected by a credit note. With If-Match, refused (412) if the invoice changed since it was read; a change of its tags moves its ETag.",
        "operationId" : "updateInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateInvoice"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateInvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The invoice, changed",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The invoice is no longer a draft: a validated invoice is never changed, deleted or validated again; it is cancelled or corrected by a credit note. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-a-draft"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "billing.invoice.not-a-draft" : "#/components/schemas/Error.billing.invoice.not-a-draft",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/neighbors" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Get an invoice's neighbors in the list",
        "description" : "Returns the invoices right before and right after this one in the invoice list read with the same filters and sort (the list's query parameters, without limit and cursor): next is the first invoice of the page that follows a page ending on this one, previous the one before it in that order. Each is null at an end of the list, and both are null when the filters leave the invoice out of it. The invoice must be one the caller can see (404 otherwise); its tag scope applies to the neighbors too.",
        "operationId" : "getInvoiceNeighbors",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Invoices of one of these statuses (repeat it for several): DRAFT, VALIDATED, UNPAID, PAID…",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "UNPAID",
                  "PAID",
                  "PARTIALLY_PAID",
                  "PARTIALLY_PAID_OVERDUE",
                  "DRAFT",
                  "VALIDATED",
                  "SHARED",
                  "LOST",
                  "SEPA_PENDING",
                  "SEPA_FAILED",
                  "SEPA_DISPUTED",
                  "EINVOICE_SUBMITTED",
                  "EINVOICE_REJECTED",
                  "EINVOICE_DISPUTED",
                  "EINVOICE_REFUSED",
                  "PAYMENT_ANNOUNCED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Invoices of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Invoices issued on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Invoices issued on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateFrom",
            "in" : "query",
            "description" : "Invoices due on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateTo",
            "in" : "query",
            "description" : "Invoices due on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Invoices changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Invoices carrying one of these tags (repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-createdAt (the default), createdAt, updatedAt or -updatedAt",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice's neighbors",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceNeighbors"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/validate" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Validate an invoice",
        "description" : "Validates a DRAFT: it gets its legal number (the organization's sequence, without gaps), its issue date (today, Paris) and its due date, and can no longer be changed or deleted. Then, as from the web app, the invoice is sent the way the customer's settings say (an e-invoice through the network, or the PDF to its addresses marked « Invoice »), booked in the sales journal, and debited if the customer chose SEPA debits. Validating again an invoice the same caller validated answers it as it is. With If-Match, refused (412) if the invoice changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "validateInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice, validated",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice is no longer a draft: a validated invoice is never changed, deleted or validated again; it is cancelled or corrected by a credit note. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: This credit note cancels a delivery-note invoice that deducts a deposit: it must take it back whole. For a price error or a partial return, delete this draft and issue a credit note that corrects the invoice.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-a-draft"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.partial-credit-note"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.not-a-draft" : "#/components/schemas/Error.billing.invoice.not-a-draft",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.partial-credit-note" : "#/components/schemas/Error.billing.invoice.partial-credit-note"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/batch-validate" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Validate several invoices",
        "description" : "Validates several DRAFTs at once, each as POST …/validate does: its legal number (in the order of the ids, without gaps), its dates, then its dispatch, booking and SEPA debit; one notification for the whole batch. At most 1000 ids. The answer is one result per id, in the order sent: SUCCEEDED (validated now, or validated already by the same caller), or FAILED with its error — core.not-found (unknown, deleted, outside the caller's tag scope), billing.invoice.not-a-draft, billing.invoice.stripe-imported, billing.invoice.partial-credit-note —, the others validated all the same. Send an Idempotency-Key to retry safely; without it, a retry answers SUCCEEDED for what this caller validated.",
        "operationId" : "batchValidateInvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per invoice",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/batch-share" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Mark several invoices as handed to their customers",
        "description" : "Declares several invoices handed to their customers, each as POST …/share does: a VALIDATED, UNPAID or LOST invoice becomes SHARED, SHARED already is answered as it is; nothing is sent, no notification. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED, or FAILED with its error — core.not-found (unknown, deleted, outside the caller's tag scope), billing.invoice.transition-refused, billing.invoice.credit-note-linked, billing.invoice.einvoice-required (the e-invoicing network is its channel; force true: handed over outside it), billing.invoice.stripe-imported —, the others shared all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchShareInvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BatchShareInvoices"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per invoice",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/batch-payments" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Record payments on several invoices",
        "description" : "Records one payment per allocation — a transfer that settles several invoices —, each as POST …/payments does (its status, its ledger entry and lettering, the e-invoicing network told), all with the same method, date and reference; one notification for the batch. At most 1000 allocations, each invoice once (422 otherwise: two payments on one invoice are two batches). The answer is one result per allocation, in the order sent: SUCCEEDED with the payment's id (createdId), or FAILED with its error — core.not-found, billing.invoice.not-payable, billing.invoice.already-paid, billing.invoice.credit-note-linked, billing.invoice.stripe-imported —, the others recorded all the same. Send an Idempotency-Key to retry safely: without it, a retry records the payments again.",
        "operationId" : "batchCreateInvoicePayments",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateBatchPayments"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per allocation",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResultsWithCreatedId"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/batch-credit-notes" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Cancel several invoices with credit notes",
        "description" : "Issues the credit note of several LOST (or EINVOICE_REFUSED) invoices, each as POST …/credit-notes does: a DRAFT credit note mirroring the invoice, linked both ways; the caller's own credit note answered again; one notification for the batch. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED with the credit note's id (createdId), or FAILED with its error — core.not-found, billing.invoice.not-creditable, billing.invoice.already-credited, billing.invoice.deposit-deducted, billing.invoice.stripe-imported —, the others cancelled all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchCreateInvoiceCreditNotes",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per invoice",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResultsWithCreatedId"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/batch-duplicate" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Duplicate several invoices as drafts",
        "description" : "Copies each invoice as a new DRAFT, as « Dupliquer » in the web app: the customer (its address and legal details as on file today), the description, the invoice's tags and its lines (product, label, number and account, quantity, price, VAT, origin, dates, note, barcode) at the source's prices; never its number, dates, status, payments, e-invoicing state, links, line discounts (the customer's applies), stock or delivery notes. Each copy counts in the plan's invoices of the month: 402 at the limit, before anything; under it, the batch copies what fits, in the order sent. One notification for the batch. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED with the draft's id (createdId), or FAILED with its error — core.not-found, billing.invoice.not-duplicable (a credit note, a customer or product outside the caller's tag scope, a customer no longer on file), billing.invoice.stripe-imported, core.plan-limit-reached (the month's room ran out on the way) —, the others copied all the same. Send an Idempotency-Key to retry safely: without it, a retry copies again.",
        "operationId" : "batchDuplicateInvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per invoice",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResultsWithCreatedId"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/send" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Send an invoice by e-mail",
        "description" : "Sends an invoice to some of its customer's e-mail addresses, by their ids, as from the web app: the PDF attached (a draft goes as a pro forma; an invoice the e-invoicing network delivered, as its duplicate), with the organization's letter, logged and counted in its monthly e-mail quota. Synchronous: the answer is the result per recipient, in the order sent (SUCCEEDED, or FAILED with its error: billing.invoice.recipient-unsubscribed for an address that unsubscribed, core.plan-limit-reached when the quota ran out on the way, core.internal-error when the mail could not go). Refused as a whole, sending nothing: an id that is not one of the customer's addresses (422), a quota short of the recipients (402 core.plan-limit-reached, limit emailsPerMonth), an invoice whose channel is the e-invoicing network (409). Send an Idempotency-Key to retry safely: without it, a retry sends again.",
        "operationId" : "sendInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendInvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per recipient",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The customer receives its invoices through the e-invoicing network and this one has not been submitted there yet: its legal channel is the network, not an e-mail nor a hand-over. Nothing was sent or marked. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.einvoice-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.einvoice-required" : "#/components/schemas/Error.billing.invoice.einvoice-required",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_SEND_EMAIL"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_SEND_EMAIL"
            ]
          },
          {
            "userKey" : [
              "INVOICES_SEND_EMAIL"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/credit-notes" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Cancel an invoice with a credit note",
        "description" : "Issues the credit note that cancels a LOST invoice, or one the customer refused on the e-invoicing network (EINVOICE_REFUSED), whole: a DRAFT invoice mirroring its lines with negated quantities, which the invoice lists in creditNoteIds and which names it in correctsInvoiceId; the invoice keeps its status. Validate the credit note (POST …/validate) to give it its number. The same caller asking again gets the same credit note; one issued by someone else is refused (409). A deposit invoice another invoice has deducted cannot be cancelled (409). Send an Idempotency-Key to retry safely.",
        "operationId" : "createInvoiceCreditNote",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The credit note, an invoice",
            "headers" : {
              "Location" : {
                "description" : "The credit note's path (an invoice)",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The credit note's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: Only a LOST invoice, or one the customer refused on the e-invoicing network (EINVOICE_REFUSED), is cancelled by a credit note issued here: mark it lost first. Nothing was created. Or: Another member or key issued the credit note that cancels this invoice already (the caller's own is answered again, never refused). Nothing was created. Or: A deposit invoice that another invoice has deducted (the order's final invoice, delivery-note invoices, or the credit note that settled the order) can no longer be cancelled: the balance would be wrong. Cancel those invoices first, or settle the order. Nothing was created. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-creditable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.already-credited"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.deposit-deducted"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.not-creditable" : "#/components/schemas/Error.billing.invoice.not-creditable",
                      "billing.invoice.already-credited" : "#/components/schemas/Error.billing.invoice.already-credited",
                      "billing.invoice.deposit-deducted" : "#/components/schemas/Error.billing.invoice.deposit-deducted",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/edit" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Change a draft's lines, customer or description",
        "description" : "Changes what a DRAFT bills, as « Modifier » in the web app: its lines (the whole list: add, change, remove and reorder them in one write), its customer, its description; an absent member is unchanged. Only while the draft has not left the organization — not mailed, shared by a link, read online, sent to the e-invoicing network, paid (GET …/editability says; 409 billing.invoice.not-editable otherwise). The write replays the creation: the price customization guard (a line kept as it was keeps its price), the tenant and tag scope guards, the totals recomputed, and a new customer's recipient, legal details and discount. A validated invoice is never changed (409): it is corrected by a credit note. A draft whose lines take from a stock (chosen with a stock lot in the web app) keeps its lines and customer there (409, reason STOCK_TRACKED); one made from delivery forms keeps its lines, linked to them, and its customer, whose forms they bill (409, reason DELIVERY_FORMS); its description still changes. A body that changes nothing writes nothing. Its tags: PATCH …/{invoiceId}. With If-Match, refused (412) if the invoice changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "editInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EditInvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The invoice, changed",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice is no longer a draft: a validated invoice is never changed, deleted or validated again; it is cancelled or corrected by a credit note. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: The draft has been seen outside the organization, or settled, and is no longer changed: correct it by a credit note once validated, or delete it and create another. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-a-draft"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-editable"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.not-a-draft" : "#/components/schemas/Error.billing.invoice.not-a-draft",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.not-editable" : "#/components/schemas/Error.billing.invoice.not-editable"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was created. Or: The invoice references a customer or products outside the caller's tag scope: nothing was created.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "billing.invoice.foreign-product" : "#/components/schemas/Error.billing.invoice.foreign-product",
                      "billing.invoice.out-of-scope-reference" : "#/components/schemas/Error.billing.invoice.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/editability" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Tell whether a draft can still be changed",
        "description" : "Answers whether POST …/edit can still change the lines, the customer and the description of this draft: editable while it has not left the organization; otherwise the reason (no draft, mailed, shared by a link, read online, sent to the e-invoicing network, paid, a credit note issued to cancel an invoice, from the Boutique, imported from Stripe). The rule POST …/edit replays under the invoice's lock.",
        "operationId" : "getInvoiceEditability",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Whether the draft can be changed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceEditability"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/share" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Mark an invoice as handed to its customer",
        "description" : "Declares that the customer has the invoice — handed over in person, sent by your own e-mail or shop, by any channel —, as « Partager » in the web app: a VALIDATED, UNPAID or LOST invoice becomes SHARED, the first status that takes a payment (POST …/payments). Nothing is sent. An invoice SHARED already (the e-mail Myle sent was delivered) is answered as it is. While the e-invoicing network is the invoice's required channel (its customer receives e-invoices), refused (409 billing.invoice.einvoice-required) unless force=true: the invoice was really handed over outside the network. The organization is notified, the change audited. With If-Match, refused (412) if the invoice changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "shareInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "force",
            "in" : "query",
            "description" : "true: handed over outside the e-invoicing network, though it is the invoice's channel",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice, shared",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: The invoice's status cannot move to the one asked: a draft is validated first, an invoice is shared before it is written off, a paid one is taken back to unpaid rather than shared… Nothing was written. Or: A credit note cancels the invoice: its status no longer moves, and it takes no payment. Nothing was recorded. Or: The customer receives its invoices through the e-invoicing network and this one has not been submitted there yet: its legal channel is the network, not an e-mail nor a hand-over. Nothing was sent or marked.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.transition-refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.credit-note-linked"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.einvoice-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.transition-refused" : "#/components/schemas/Error.billing.invoice.transition-refused",
                      "billing.invoice.credit-note-linked" : "#/components/schemas/Error.billing.invoice.credit-note-linked",
                      "billing.invoice.einvoice-required" : "#/components/schemas/Error.billing.invoice.einvoice-required"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/mark-lost" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Write an invoice off as lost",
        "description" : "Writes off an unpaid sale, as « Perdue » in the web app: a SHARED, UNPAID or partially paid invoice becomes LOST (its payments stay); POST …/credit-notes then cancels it. An invoice LOST already is answered as it is; a credit note issued to cancel an invoice is never written off itself (409). The organization is notified, the change audited with the amount. With If-Match, refused (412) if the invoice changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "markInvoiceLost",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice, lost",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: The invoice's status cannot move to the one asked: a draft is validated first, an invoice is shared before it is written off, a paid one is taken back to unpaid rather than shared… Nothing was written. Or: This credit note was issued to cancel a lost invoice: it is never written off itself. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.transition-refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.generated-credit-note"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.transition-refused" : "#/components/schemas/Error.billing.invoice.transition-refused",
                      "billing.invoice.generated-credit-note" : "#/components/schemas/Error.billing.invoice.generated-credit-note"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/unpay" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Take an invoice back to unpaid",
        "description" : "Takes an invoice back to UNPAID, as « Impayée » in the web app: from SHARED or LOST, or from PAID and partially paid, whose payments are then REMOVED with their ledger entries and bank matches — which needs INVOICES_REVERT_PAID (403 otherwise). A payment collected through Stripe is refunded in Stripe, never removed here (409); an invoice a credit note cancels does not move (409). UNPAID without payments is answered as it is. The organization is notified, the change audited with the number of payments removed. With If-Match, refused (412) if the invoice changed since it was read. Send an Idempotency-Key to retry safely. To remove one payment only: DELETE …/payments/{paymentId}.",
        "operationId" : "unpayInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice, unpaid",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: The invoice's status cannot move to the one asked: a draft is validated first, an invoice is shared before it is written off, a paid one is taken back to unpaid rather than shared… Nothing was written. Or: A credit note cancels the invoice: its status no longer moves, and it takes no payment. Nothing was recorded. Or: The payment was collected through Stripe: it is refunded in Stripe, never removed in Myle. Nothing was removed.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.transition-refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.credit-note-linked"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.payment.stripe-collected"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.transition-refused" : "#/components/schemas/Error.billing.invoice.transition-refused",
                      "billing.invoice.credit-note-linked" : "#/components/schemas/Error.billing.invoice.credit-note-linked",
                      "billing.payment.stripe-collected" : "#/components/schemas/Error.billing.payment.stripe-collected"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/reinvoice" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Re-bill a credit note as a new draft",
        "description" : "Re-bills the sale a credit note cancelled, as « Refacturer » in the web app: from a validated credit note issued by POST …/credit-notes, a new DRAFT invoice with its lines positive again, for the customer as it is today; the two are linked (the credit note keeps its status). Validate the draft to number it. The same caller asking again gets the same draft; one created by someone else is refused (409). Not counted in the plan's invoices per month: correcting an invoice is a legal duty. Send an Idempotency-Key to retry safely.",
        "operationId" : "reinvoiceInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The new draft invoice",
            "headers" : {
              "Location" : {
                "description" : "The new invoice's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The new invoice's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: Only a credit note issued here to cancel an invoice (POST …/credit-notes), once validated, is re-billed: this invoice is no such credit note, or it is still a draft. Nothing was created. Or: Another member or key re-billed this credit note already (the caller's own draft is answered again, never refused). Nothing was created.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-reinvoiceable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.already-reinvoiced"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.not-reinvoiceable" : "#/components/schemas/Error.billing.invoice.not-reinvoiceable",
                      "billing.invoice.already-reinvoiced" : "#/components/schemas/Error.billing.invoice.already-reinvoiced"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/correctable-invoices" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "List the invoices a credit note can correct",
        "description" : "Returns the invoices a credit note keyed in by hand (an invoice whose total is negative) can name as the one it corrects (POST …/set-corrected-invoice): its customer's issued invoices, not cancelled already, dated no later than it (today for a draft), in the caller's tag scope, newest first, 50 at most; q filters on their number. All at once: nextCursor is never present.",
        "operationId" : "listInvoiceCorrectableInvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Invoices whose number contains this text",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoices it can correct",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CorrectableInvoiceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/set-corrected-invoice" : {
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Name the invoice a credit note corrects",
        "description" : "Names the invoice a credit note keyed in by hand corrects (its correctsInvoiceId; the invoice lists it in creditNoteIds), as « Facture d'origine » in the web app: its Factur-X and e-invoice then cite it (BT-25). A reference, not a cancellation: the invoice keeps its status and payments. Naming another replaces the first, until the credit note was handed to its customer with it (409 billing.invoice.correction-fixed, DELIVERED); never once it is on the e-invoicing network (EINVOICED), nor for a credit note issued to cancel an invoice (GENERATED). Naming the same again changes nothing. With If-Match (the credit note's ETag), refused (412) if it changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "setInvoiceCorrectedInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SetCorrectedInvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The credit note",
            "headers" : {
              "ETag" : {
                "description" : "The credit note's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: This invoice is no credit note (its total is not negative): it corrects no invoice. Nothing was written. Or: The invoice this credit note corrects can no longer be changed. Nothing was written. Or: This credit note cannot correct that invoice: it corrects an issued invoice of the same customer, dated no later than the credit note, not cancelled already, and one the caller can see (GET …/correctable-invoices lists them). Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-a-credit-note"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.correction-fixed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-correctable"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "billing.invoice.not-a-credit-note" : "#/components/schemas/Error.billing.invoice.not-a-credit-note",
                      "billing.invoice.correction-fixed" : "#/components/schemas/Error.billing.invoice.correction-fixed",
                      "billing.invoice.not-correctable" : "#/components/schemas/Error.billing.invoice.not-correctable"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/status-history" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "List an invoice's status history",
        "description" : "Returns every status an invoice went through, newest first, with when and by whom — a person, an organization key's robot, or null when Myle set it (the delivered e-mail, the e-invoicing network, the due date passing, a SEPA debit). All at once: nextCursor is never present.",
        "operationId" : "listInvoiceStatusHistory",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice's statuses, newest first",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceStatusChangeList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/payments" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "List an invoice's payments",
        "description" : "Returns the payments recorded on an invoice the caller can see, newest first, all at once (nextCursor is never present). What remains due is the invoice's amountDue.",
        "operationId" : "listInvoicePayments",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice's payments",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentResourceList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Record a payment on an invoice",
        "description" : "Records a payment on an invoice, as from the web app: the invoice moves to PARTIALLY_PAID, or PAID once nothing remains due, the payment is booked in the ledger and lettered, and an invoice that went through the e-invoicing network is reported paid there. An invoice takes payments once sent (SHARED, UNPAID, partially paid, LOST, the e-invoicing statuses…): a draft, a validated invoice not sent yet or a SEPA debit in progress is refused (409), as is a paid one or one a credit note cancels. Send an Idempotency-Key to retry safely: without it, a retry records a second payment.",
        "operationId" : "createInvoicePayment",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreatePayment"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The payment recorded",
            "headers" : {
              "Location" : {
                "description" : "The new payment's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice's status takes no payment: a draft, a validated invoice not sent yet (SHARED is the first status that does), a SEPA debit in progress or failed. Nothing was recorded. Or: The invoice is paid already: someone (Stripe, the customer's e-invoicing platform, a member) booked the money first. Read the invoice again before recording anything. Nothing was recorded. Or: A credit note cancels the invoice: its status no longer moves, and it takes no payment. Nothing was recorded. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.not-payable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.already-paid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.credit-note-linked"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.not-payable" : "#/components/schemas/Error.billing.invoice.not-payable",
                      "billing.invoice.already-paid" : "#/components/schemas/Error.billing.invoice.already-paid",
                      "billing.invoice.credit-note-linked" : "#/components/schemas/Error.billing.invoice.credit-note-linked",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/payments/{paymentId}" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Get a payment of an invoice",
        "description" : "Returns one payment of an invoice the caller can see; a payment of another invoice is a 404. Its ETag is the invoice's: a payment recorded or removed moves it.",
        "operationId" : "getInvoicePayment",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "paymentId",
            "in" : "path",
            "description" : "The payment's id (payment_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The payment",
            "headers" : {
              "ETag" : {
                "description" : "The invoice's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Remove a payment of an invoice",
        "description" : "Removes a payment keyed in by mistake: the invoice walks back (PAID → PARTIALLY_PAID → UNPAID) and the payment's ledger entry is reversed. Only a PAID or partially paid invoice's payments can go (409 otherwise); a payment collected through Stripe is refunded in Stripe (409). With If-Match (the invoice's ETag), refused (412) if the invoice changed since it was read.",
        "operationId" : "deleteInvoicePayment",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "paymentId",
            "in" : "path",
            "description" : "The payment's id (payment_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the invoice has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The payment is removed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "409" : {
            "description" : "The invoice's status no longer lets its payments be removed: only a PAID or partially paid invoice's can. Nothing was removed. Or: The payment was collected through Stripe: it is refunded in Stripe, never removed in Myle. Nothing was removed. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.billing.payment.not-removable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.payment.stripe-collected"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "billing.payment.not-removable" : "#/components/schemas/Error.billing.payment.not-removable",
                      "billing.payment.stripe-collected" : "#/components/schemas/Error.billing.payment.stripe-collected",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_REVERT_PAID"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_REVERT_PAID"
            ]
          },
          {
            "userKey" : [
              "INVOICES_REVERT_PAID"
            ]
          }
        ]
      }
    },
    "/invoices" : {
      "get" : {
        "tags" : [
          "Invoices"
        ],
        "summary" : "Search the invoices across organizations",
        "description" : "Returns the invoices of every organization the caller may read them in — a member with INVOICES_LIST (a user key: among the organizations it reaches, its rights narrowed; an organization key: its own), whose plan carries the « Invoices » module —, each inside the caller's tag scope there, drafts included, deleted ones never. The same filters, sort and pages as an organization's list, plus organizationId; each invoice says its organizationId.",
        "operationId" : "searchInvoices",
        "parameters" : [
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "Only the organizations among these (organization_<uuid>, repeat it for several); one the caller cannot read adds nothing",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Invoices of one of these statuses (repeat it for several): DRAFT, VALIDATED, UNPAID, PAID…",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "UNPAID",
                  "PAID",
                  "PARTIALLY_PAID",
                  "PARTIALLY_PAID_OVERDUE",
                  "DRAFT",
                  "VALIDATED",
                  "SHARED",
                  "LOST",
                  "SEPA_PENDING",
                  "SEPA_FAILED",
                  "SEPA_DISPUTED",
                  "EINVOICE_SUBMITTED",
                  "EINVOICE_REJECTED",
                  "EINVOICE_DISPUTED",
                  "EINVOICE_REFUSED",
                  "PAYMENT_ANNOUNCED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Invoices of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Invoices issued on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Invoices issued on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateFrom",
            "in" : "query",
            "description" : "Invoices due on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "dueDateTo",
            "in" : "query",
            "description" : "Invoices due on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Invoices changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Invoices carrying one of these tags (repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-createdAt (the default), createdAt, updatedAt or -updatedAt",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of invoices",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "List the quotations",
        "description" : "Returns the organization's quotations the caller can see (its tag scope applies), deleted ones never, filtered and sorted, one page at a time. For a synchronization: updatedAfter with the largest updatedAt already seen, sort updatedAt. Open to QUOTATION_LIST, and to INVOICES_CREATE (who bills a quotation reads it).",
        "operationId" : "listQuotations",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Quotations of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, CANCELED, EXPIRED, ORDERED, INVOICED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "EXPIRED",
                  "VALIDATED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Quotations of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Quotations dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Quotations dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateFrom",
            "in" : "query",
            "description" : "Quotations valid until this day or later (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateTo",
            "in" : "query",
            "description" : "Quotations valid until this day at the latest (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Quotations changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Quotations carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a quotation carrying one of the tags; ALL, a quotation carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the quotations carrying every one of these tags (repeat it for several): one tag leaves out the quotations carrying it; with several, a quotation carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the quotation's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of quotations of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of quotations",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Create a quotation",
        "description" : "Creates a quotation, as from the web app: born VALIDATED with its number (a quotation has no draft), valid until expiryDate. Without DELIVERYFORMS_CUSTOMIZE_PRICE, lines take their catalog price and no discount. The organization is notified, and the quotation is mailed at once to the customer's addresses marked « Devis » (the company's emailAddresses with QUOTATION among their purposes), as the web app does. Send an Idempotency-Key to retry safely.",
        "operationId" : "createQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateQuotation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new quotation",
            "headers" : {
              "Location" : {
                "description" : "The new quotation's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was written. Or: The quotation references a customer or products outside the caller's tag scope: nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "quotations.quotation.foreign-product" : "#/components/schemas/Error.quotations.quotation.foreign-product",
                      "quotations.quotation.out-of-scope-reference" : "#/components/schemas/Error.quotations.quotation.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/tags" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "List the quotations' tags",
        "description" : "Returns the tags the organization's quotations carry, sorted: the values a tag filter of the quotation list can take. For a tag-scoped caller, only the tags of the quotations in its scope. All of them at once: nextCursor is never present.",
        "operationId" : "listQuotationTags",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The tags, sorted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationTagList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/eligibility" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Count what each batch would act on",
        "description" : "Among the quotations the filters give (the list's filters: the caller's quotations, inside its tag scope, deleted ones never), how many each batch would act on: the counts the web app shows on its batch buttons before a batch.",
        "operationId" : "getQuotationEligibility",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Quotations of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, CANCELED, EXPIRED, ORDERED, INVOICED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "EXPIRED",
                  "VALIDATED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Quotations of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Quotations dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Quotations dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateFrom",
            "in" : "query",
            "description" : "Quotations valid until this day or later (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateTo",
            "in" : "query",
            "description" : "Quotations valid until this day at the latest (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Quotations changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Quotations carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a quotation carrying one of the tags; ALL, a quotation carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the quotations carrying every one of these tags (repeat it for several): one tag leaves out the quotations carrying it; with several, a quotation carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The counts",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationEligibility"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Get a quotation",
        "description" : "Returns a quotation the caller can see; one outside its tag scope, deleted or unknown is a 404. As JSON by default; with Accept: application/pdf, its PDF (the document Myle sends, with « accepted online » when its customer signed it on its public page).",
        "operationId" : "getQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation",
            "headers" : {
              "ETag" : {
                "description" : "With the JSON: the quotation's version, to send back in If-Match",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "Content-Disposition" : {
                "description" : "With the PDF: inline, with its file name",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              },
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Delete a quotation",
        "description" : "Deletes a quotation, whatever its status, as the web app does — but one converted (ORDERED, INVOICED) whose order or invoice still exists (409: delete that one first; a converted quotation whose document is gone is taken back to APPROVED, then deleted). With If-Match, refused (412) if the quotation changed since it was read.",
        "operationId" : "deleteQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The quotation is deleted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "409" : {
            "description" : "The quotation was converted and the order or the invoice it made still lives: delete that one first (its deletion takes the quotation back to APPROVED). Nothing was deleted.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.quotations.quotation.converted"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_DELETE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Change a quotation",
        "description" : "Changes the members sent (a JSON merge patch): its dates, its description, its tags, whatever its status (as the web app does). The expiry date ends on or after the issue date, the work on or after its start (422). To give an EXPIRED quotation back its status, POST …/extend; its lines and customer, POST …/edit. A patch that changes nothing writes nothing. With If-Match, refused (412) if the quotation changed since it was read.",
        "operationId" : "updateQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateQuotation"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateQuotation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The quotation, changed",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/neighbors" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Get a quotation's neighbors in the list",
        "description" : "Returns the quotations right before and right after this one in the quotation list read with the same filters and sort (the list's query parameters, without limit, cursor and includeTotal): next is the first quotation of the page that follows a page ending on this one, previous the one before it in that order. Each is null at an end of the list, and both are null when the filters leave the quotation out of it. The quotation must be one the caller can see (404 otherwise); its tag scope applies to the neighbors too.",
        "operationId" : "getQuotationNeighbors",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Quotations of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, CANCELED, EXPIRED, ORDERED, INVOICED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "EXPIRED",
                  "VALIDATED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Quotations of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Quotations dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Quotations dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateFrom",
            "in" : "query",
            "description" : "Quotations valid until this day or later (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateTo",
            "in" : "query",
            "description" : "Quotations valid until this day at the latest (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Quotations changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Quotations carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a quotation carrying one of the tags; ALL, a quotation carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the quotations carrying every one of these tags (repeat it for several): one tag leaves out the quotations carrying it; with several, a quotation carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the quotation's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation's neighbors",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationNeighbors"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/edit" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Change a quotation's lines, customer or description",
        "description" : "Changes what a quotation offers, as « Modifier » in the web app: its lines (the whole list: add, change, remove and reorder them in one write), its customer, its description; an absent member is unchanged. Only while it is VALIDATED and has not left the organization — not mailed (the creation mails it when the customer has an address marked « Devis »), shared by a link, read online, marked shared, converted (GET …/editability says; 409 quotations.quotation.not-editable otherwise). The write replays the creation: the price customization guard (a line kept as it was keeps its price), the tenant and tag scope guards, and a new customer's recipient and legal details. Without lines, the stored lines are kept as they are (their barcodes too), except, for a new customer, the price of a line at the previous customer's tariff: it takes the new customer's, as a creation for it would (a line at another price keeps it). A body that changes nothing writes nothing. With If-Match, refused (412) if the quotation changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "editQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EditQuotation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The quotation, changed",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation has left the organization (mailed, shared by a link, read online, marked shared) or is no longer VALIDATED: its lines, customer and description are kept as the customer saw them; issue a new quotation. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.not-editable"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.not-editable" : "#/components/schemas/Error.quotations.quotation.not-editable"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was written. Or: The quotation references a customer or products outside the caller's tag scope: nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "quotations.quotation.foreign-product" : "#/components/schemas/Error.quotations.quotation.foreign-product",
                      "quotations.quotation.out-of-scope-reference" : "#/components/schemas/Error.quotations.quotation.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/editability" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Tell whether a quotation can still be changed",
        "description" : "Answers whether POST …/edit can still change the lines, the customer and the description of this quotation: editable while it is VALIDATED and has not left the organization; otherwise the reason (no longer VALIDATED, mailed, shared by a link, read online, marked shared, converted). The rule POST …/edit replays under the quotation's lock.",
        "operationId" : "getQuotationEditability",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Whether the quotation can be changed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationEditability"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/share" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Mark a quotation as handed to its customer",
        "description" : "Declares that the customer has the quotation — handed over, sent by your own e-mail or shop, by any channel —, as « Partager » in the web app: a VALIDATED quotation becomes SHARED. Nothing is sent (POST …/send mails it). A quotation SHARED already is answered as it is. The change is audited. With If-Match, refused (412) if the quotation changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "shareQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation, shared",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.transition-refused" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/approve" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Record that the customer accepted a quotation",
        "description" : "Records the customer's yes, as « Accepté » in the web app: a SHARED quotation becomes APPROVED, the one status POST …/invoice bills. An APPROVED one is answered as it is. The organization is notified (« Devis accepté »), the change audited. With If-Match, refused (412) if the quotation changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "approveQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation, approved",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.transition-refused" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/batch-share" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Mark several quotations as handed to their customers",
        "description" : "Declares several quotations handed to their customers, each as POST …/share does: a VALIDATED quotation becomes SHARED, SHARED already is answered as it is; nothing is sent. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED, or FAILED with its error — core.not-found (unknown, deleted, outside the caller's tag scope), quotations.quotation.transition-refused —, the others shared all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchShareQuotations",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/QuotationBatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per quotation",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/batch-approve" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Record that customers accepted several quotations",
        "description" : "Records the customers' yes on several quotations, each as POST …/approve does: a SHARED quotation becomes APPROVED, APPROVED already is answered as it is; one notification for the batch (« N devis acceptés »). At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED, or FAILED with its error — core.not-found, quotations.quotation.transition-refused —, the others approved all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchApproveQuotations",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/QuotationBatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per quotation",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/batch-order" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Turn several accepted quotations into orders",
        "description" : "Turns several quotations into orders, each as POST …/order does: an APPROVED quotation becomes ORDERED and makes its order. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED with createdId, the order it made, or FAILED with its error — core.not-found (unknown, deleted, outside the caller's tag scope), quotations.quotation.transition-refused —, the others ordered all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchOrderQuotations",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/QuotationBatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per quotation, with the order it made",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResultsWithCreatedId"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/cancel" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Cancel a quotation (refused or withdrawn)",
        "description" : "Records the customer's no, or withdraws the offer, as « Refusé » in the web app: the quotation becomes CANCELED, from any status but ORDERED and INVOICED (a converted quotation: cancel or delete what it made first). A CANCELED one is answered as it is. The organization is notified (« Devis refusé »), the change audited. With If-Match, refused (412) if the quotation changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "cancelQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation, cancelled",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.transition-refused" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/extend" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Extend a quotation's validity",
        "description" : "Gives a quotation a new « valid until » date, as « Prolonger » in the web app: one still waiting for its customer (VALIDATED, SHARED) only moves its date; an EXPIRED one also gets back the status it had before expiring. Not in the past (422); an approved, cancelled or converted quotation is refused (409). Send {} for today plus the organization's validity. The change is audited. With If-Match, refused (412) if the quotation changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "extendQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the quotation has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ExtendQuotation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The quotation, extended",
            "headers" : {
              "ETag" : {
                "description" : "The quotation's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: Only a quotation still waiting for its customer's answer (VALIDATED, SHARED) or EXPIRED gets a new validity date: an approved, cancelled or converted one has had its answer. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.not-extendable"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.not-extendable" : "#/components/schemas/Error.quotations.quotation.not-extendable"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/order" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Turn an accepted quotation into an order",
        "description" : "Turns an APPROVED quotation into an order, as « Commander » in the web app: an order born VALIDATED with its number, the quotation's lines, customer, description and tags, linked both ways (the quotation lists it in orderIds, the order the quotation in quotationIds); the quotation becomes ORDERED. The quotation's deposit invoices follow the order: its final invoice deducts them. Another status: 409 (an ORDERED quotation included: asking again makes no second order). Send an Idempotency-Key to retry safely.",
        "operationId" : "orderQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The order it made",
            "headers" : {
              "Location" : {
                "description" : "The new order's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The new order's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.transition-refused" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_TRANSFORM_TO_ORDER"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/invoice" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Bill an accepted quotation",
        "description" : "Turns an APPROVED quotation into an invoice, as « Facturer » in the web app: a VALIDATED invoice at once, with its legal number (the organization's sequence, without gaps) and today's date, its lines and tags taken from the quotation (and the customer's discount), linked both ways (the quotation lists it in invoiceIds); the quotation becomes INVOICED. Then, as from the web app, the invoice is sent the way the customer's settings say (an e-invoice through the network, or the PDF to its addresses marked « Invoice ») and booked. The same caller asking again gets the same invoice (409 when that invoice was deleted since); billed by someone else, 409. A quotation with deposit invoices is settled by its final invoice (409). Counts in the plan's invoices per month (402 once reached). Send an Idempotency-Key to retry safely.",
        "operationId" : "invoiceQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "201" : {
            "description" : "The invoice it made",
            "headers" : {
              "Location" : {
                "description" : "The new invoice's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The new invoice's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written. Or: Another member, key or the nightly billing billed this quotation already (the caller's own billing is answered again), or the caller's own billing made an invoice deleted since. Nothing was created. Or: The quotation is billed in several times: deposit invoices were issued on it, and its final invoice, which deducts them, settles it; a whole invoice would bill them twice. Nothing was created.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.transition-refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.already-invoiced"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.quotations.quotation.has-deposits"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "quotations.quotation.transition-refused" : "#/components/schemas/Error.quotations.quotation.transition-refused",
                      "quotations.quotation.already-invoiced" : "#/components/schemas/Error.quotations.quotation.already-invoiced",
                      "quotations.quotation.has-deposits" : "#/components/schemas/Error.quotations.quotation.has-deposits"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_TRANSFORM_TO_INVOICE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_TRANSFORM_TO_INVOICE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_TRANSFORM_TO_INVOICE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/send" : {
      "post" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Send a quotation by e-mail",
        "description" : "Sends a quotation to some of its customer's e-mail addresses, by their ids, as from the web app: the PDF attached, with the organization's letter (its link to accept the quotation online), logged and counted in its monthly e-mail quota. Nothing changes its status (POST …/share does). Synchronous: the answer is the result per recipient, in the order sent (SUCCEEDED, or FAILED with its error: quotations.quotation.recipient-unsubscribed for an address that unsubscribed, core.plan-limit-reached when the quota ran out on the way, core.internal-error when the mail could not go). Refused as a whole, sending nothing: an id that is not one of the customer's addresses (422), a quota short of the recipients (402 core.plan-limit-reached, limit emailsPerMonth). Send an Idempotency-Key to retry safely: without it, a retry sends again.",
        "operationId" : "sendQuotation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendQuotation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per recipient",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_SEND_EMAIL"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_SEND_EMAIL"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_SEND_EMAIL"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/quotations/{quotationId}/status-history" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "List a quotation's status history",
        "description" : "Returns every status a quotation went through, newest first, with when and by whom — a person, an organization key's robot, or null when Myle set it (its creation, the customer's answer on the public page, the validity passing). All at once: nextCursor is never present.",
        "operationId" : "listQuotationStatusHistory",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "quotationId",
            "in" : "path",
            "description" : "The quotation's id (quotation_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quotation's statuses, newest first",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationStatusChangeList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          }
        ]
      }
    },
    "/quotations" : {
      "get" : {
        "tags" : [
          "Quotations"
        ],
        "summary" : "Search the quotations across organizations",
        "description" : "Returns the quotations of every organization the caller may read them in — a member with QUOTATION_LIST or INVOICES_CREATE (a user key: among the organizations it reaches, its rights narrowed; an organization key: its own), whose plan carries the « Quotations » module —, each inside the caller's tag scope there, deleted ones never. The same filters, sort and pages as an organization's list, plus organizationId; each quotation says its organizationId.",
        "operationId" : "searchQuotations",
        "parameters" : [
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "Only the organizations among these (organization_<uuid>, repeat it for several); one the caller cannot read adds nothing",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Quotations of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, CANCELED, EXPIRED, ORDERED, INVOICED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "EXPIRED",
                  "VALIDATED"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Quotations of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Quotations dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Quotations dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateFrom",
            "in" : "query",
            "description" : "Quotations valid until this day or later (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "expiryDateTo",
            "in" : "query",
            "description" : "Quotations valid until this day at the latest (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Quotations changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Quotations carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), a quotation carrying one of the tags; ALL, a quotation carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the quotations carrying every one of these tags (repeat it for several): one tag leaves out the quotations carrying it; with several, a quotation carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the quotation's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of quotations of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of quotations",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/QuotationResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "List the orders",
        "description" : "Returns the organization's orders the caller can see (its tag scope applies), deleted ones never, filtered and sorted, one page at a time. For a synchronization: updatedAfter with the largest updatedAt already seen, sort updatedAt. Open to ORDER_LIST, QUOTATION_LIST and INVOICES_CREATE, as the web app. A member without ORDER_LIST_ALL reads the orders they created, prepare or deliver (an organization key's robot likewise), as in the web app.",
        "operationId" : "listOrders",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Orders of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, WAITING_FOR_DELIVERY, DELIVERED, INVOICED, CANCELED, ORDERED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "DELIVERED",
                  "VALIDATED",
                  "WAITING_FOR_DELIVERY"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Orders of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Orders dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Orders dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateFrom",
            "in" : "query",
            "description" : "Orders to deliver on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateTo",
            "in" : "query",
            "description" : "Orders to deliver on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "preparerId",
            "in" : "query",
            "description" : "Orders one of these members prepares (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "delivererId",
            "in" : "query",
            "description" : "Orders one of these members delivers (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Orders changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Orders carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), an order carrying one of the tags; ALL, an order carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the orders carrying every one of these tags (repeat it for several): one tag leaves out the orders carrying it; with several, an order carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the order's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of orders of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of orders",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      },
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Create an order",
        "description" : "Takes an order, as from the web app: born VALIDATED with its number (an order has no draft). Without DELIVERYFORMS_CUSTOMIZE_PRICE, lines take their catalog price and no discount. The organization is notified, and the order is mailed at once to the customer's addresses marked « Commande » (the company's emailAddresses with ORDER among their purposes), as the web app does. Send an Idempotency-Key to retry safely.",
        "operationId" : "createOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The new order",
            "headers" : {
              "Location" : {
                "description" : "The new order's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was written. Or: The order references a customer or products outside the caller's tag scope: nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "orders.order.foreign-product" : "#/components/schemas/Error.orders.order.foreign-product",
                      "orders.order.out-of-scope-reference" : "#/components/schemas/Error.orders.order.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_CREATE"
            ]
          },
          {
            "session" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_CREATE"
            ]
          },
          {
            "userKey" : [
              "ORDER_CREATE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/tags" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "List the orders' tags",
        "description" : "Returns the tags the organization's orders carry, sorted: the values a tag filter of the order list can take. For a tag-scoped caller, only the tags of the orders in its scope. All of them at once: nextCursor is never present.",
        "operationId" : "listOrderTags",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The tags, sorted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderTagList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/eligibility" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Count what each batch would act on",
        "description" : "Among the orders the filters give (the list's filters: the caller's orders, inside its tag scope, deleted ones never), how many each batch would act on: the counts the web app shows on its batch buttons before a batch.",
        "operationId" : "getOrderEligibility",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Orders of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, WAITING_FOR_DELIVERY, DELIVERED, INVOICED, CANCELED, ORDERED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "DELIVERED",
                  "VALIDATED",
                  "WAITING_FOR_DELIVERY"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Orders of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Orders dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Orders dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateFrom",
            "in" : "query",
            "description" : "Orders to deliver on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateTo",
            "in" : "query",
            "description" : "Orders to deliver on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "preparerId",
            "in" : "query",
            "description" : "Orders one of these members prepares (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "delivererId",
            "in" : "query",
            "description" : "Orders one of these members delivers (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Orders changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Orders carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), an order carrying one of the tags; ALL, an order carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the orders carrying every one of these tags (repeat it for several): one tag leaves out the orders carrying it; with several, an order carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The counts",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderEligibility"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Get an order",
        "description" : "Returns an order the caller can see; one outside its tag scope, deleted or unknown is a 404. As JSON by default; with Accept: application/pdf, its PDF (the order form Myle sends).",
        "operationId" : "getOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order",
            "headers" : {
              "ETag" : {
                "description" : "With the JSON: the order's version, to send back in If-Match",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "Content-Disposition" : {
                "description" : "With the PDF: inline, with its file name",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              },
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "session" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_CREATE"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_CREATE"
            ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Delete an order",
        "description" : "Deletes an order, as the web app does: not a DELIVERED one (delete its delivery note first, which takes it back to WAITING_FOR_DELIVERY) nor an INVOICED one (credit its invoice): 409. The quotation it was made from goes back to APPROVED. The organization is notified (« Commande supprimée »). With If-Match, refused (412) if the order changed since it was read.",
        "operationId" : "deleteOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "204" : {
            "description" : "The order is deleted",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "409" : {
            "description" : "A delivered order is deleted once its delivery note is (which takes it back to WAITING_FOR_DELIVERY); a billed one never is: credit its invoice instead. Nothing was deleted.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.orders.order.not-deletable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_DELETE"
            ]
          },
          {
            "session" : [
              "QUOTATION_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_DELETE"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_DELETE"
            ]
          },
          {
            "userKey" : [
              "ORDER_DELETE"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_DELETE"
            ]
          }
        ]
      },
      "patch" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Change an order",
        "description" : "Changes the members sent (a JSON merge patch): its date, its delivery date, who prepares and delivers it (members of the organization: 422 otherwise), its description, its tags, whatever its status (as the web app does). Its lines, customer and delivery address: POST …/edit. A patch that changes nothing writes nothing. With If-Match, refused (412) if the order changed since it was read.",
        "operationId" : "updateOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/merge-patch+json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateOrder"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The order, changed",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/neighbors" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Get an order's neighbors in the list",
        "description" : "Returns the orders right before and right after this one in the order list read with the same filters and sort (the list's query parameters, without limit, cursor and includeTotal): next is the first order of the page that follows a page ending on this one, previous the one before it in that order. Each is null at an end of the list, and both are null when the filters leave the order out of it. The order must be one the caller can see (404 otherwise); its tag scope and the list's assignment rule apply to the neighbors too.",
        "operationId" : "getOrderNeighbors",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Orders of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, WAITING_FOR_DELIVERY, DELIVERED, INVOICED, CANCELED, ORDERED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "DELIVERED",
                  "VALIDATED",
                  "WAITING_FOR_DELIVERY"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Orders of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Orders dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Orders dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateFrom",
            "in" : "query",
            "description" : "Orders to deliver on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateTo",
            "in" : "query",
            "description" : "Orders to deliver on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "preparerId",
            "in" : "query",
            "description" : "Orders one of these members prepares (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "delivererId",
            "in" : "query",
            "description" : "Orders one of these members delivers (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Orders changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Orders carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), an order carrying one of the tags; ALL, an order carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the orders carrying every one of these tags (repeat it for several): one tag leaves out the orders carrying it; with several, an order carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the order's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order's neighbors",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderNeighbors"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/edit" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Change an order's lines, customer, delivery address or description",
        "description" : "Changes what an order holds, as « Modifier » in the web app: its lines (the whole list: add, change, remove and reorder them in one write), its customer, its delivery address, its description; an absent member is unchanged. Only while it is VALIDATED and has not left the organization — not mailed (the creation mails it when the customer has an address marked « Commande »), shared by a link, marked shared, converted, nor a Boutique order (GET …/editability says; 409 orders.order.not-editable otherwise). An order made from a quotation keeps its customer (reason FROM_QUOTATION). The write replays the creation: the price customization guard (a line kept as it was keeps its price), the tenant and tag scope guards, a new customer's recipient and legal details, a delivery address of the customer's. Without lines, the stored lines are kept as they are. For a new customer, with lines or without, a line kept as it was at the previous customer's tariff takes the new customer's (a line at another price keeps it). A body that changes nothing writes nothing. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "editOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EditOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The order, changed",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order has left the organization (mailed, shared by a link, marked shared), was converted, comes from the Boutique or is no longer VALIDATED: its lines, customer and description are kept as the customer saw them. Or its customer cannot change: it was made from a quotation that customer accepted. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.not-editable"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.not-editable" : "#/components/schemas/Error.orders.order.not-editable"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body. Or: A line names a product of another organization: nothing was written. Or: The order references a customer or products outside the caller's tag scope: nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.foreign-product"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.out-of-scope-reference"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused",
                      "orders.order.foreign-product" : "#/components/schemas/Error.orders.order.foreign-product",
                      "orders.order.out-of-scope-reference" : "#/components/schemas/Error.orders.order.out-of-scope-reference"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/editability" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Tell whether an order can still be changed",
        "description" : "Answers whether POST …/edit can still change the lines, the customer and the description of this order: editable while it is VALIDATED and has not left the organization; otherwise the reason. The rule POST …/edit replays under the order's lock.",
        "operationId" : "getOrderEditability",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Whether the order can be changed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderEditability"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/share" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Mark an order as handed to its customer",
        "description" : "Declares that the customer has the order form — handed over, sent by your own e-mail or shop, by any channel —, as « Partager » in the web app: a VALIDATED order becomes SHARED. Nothing is sent (POST …/send mails it). An order SHARED already is answered as it is. The change is audited. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "shareOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order, shared",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/approve" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Record that the customer confirmed an order",
        "description" : "Records the customer's yes, as « Accepter » in the web app: a VALIDATED or SHARED order becomes APPROVED, ready to be prepared. An APPROVED one is answered as it is. The change is audited. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "approveOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order, approved",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/mark-waiting-for-delivery" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Mark an order as prepared, waiting for its delivery",
        "description" : "Records that the order is prepared, as « Attente de livraison » in the web app: an APPROVED order becomes WAITING_FOR_DELIVERY, the status POST …/deliver and POST …/invoice take. One WAITING_FOR_DELIVERY already is answered as it is. The change is audited. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "markOrderWaitingForDelivery",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order, waiting for its delivery",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/cancel" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Cancel an order",
        "description" : "Cancels an order, as « Annuler » in the web app: it becomes CANCELED from any status until it is delivered or billed. A CANCELED one is answered as it is. A Boutique order not charged yet releases its card authorization and its stock reservation, and its buyer is told. The change is audited. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "cancelOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order, cancelled",
            "headers" : {
              "ETag" : {
                "description" : "The order's version, to send back in If-Match",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/batch-share" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Mark several orders as handed to their customers",
        "description" : "Declares several orders handed to their customers, each as POST …/share does: a VALIDATED order becomes SHARED, SHARED already is answered as it is; nothing is sent. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED, or FAILED with its error — core.not-found (unknown, deleted, outside the caller's tag scope), orders.order.transition-refused —, the others shared all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchShareOrders",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrderBatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per order",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/batch-approve" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Record that customers confirmed several orders",
        "description" : "Records the customers' yes on several orders, each as POST …/approve does: a VALIDATED or SHARED order becomes APPROVED, APPROVED already is answered as it is. At most 1000 ids, each answered once. The answer is one result per id, in the order sent: SUCCEEDED, or FAILED with its error — core.not-found, orders.order.transition-refused —, the others approved all the same. Send an Idempotency-Key to retry safely.",
        "operationId" : "batchApproveOrders",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrderBatchIds"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per order",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_PATCH"
            ]
          },
          {
            "session" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORDER_PATCH"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/stock-availability" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "List the stocks an order's goods can leave from",
        "description" : "For each line of an APPROVED or WAITING_FOR_DELIVERY order, the stocks of its product and, per stock, the lots that can still give goods (after reconciliation: a lot whose goods left without a number is no longer offered) and what it holds without a lot: what to choose the lots of POST …/deliver and POST …/invoice from. Another status: 409. All at once: nextCursor is never present.",
        "operationId" : "getOrderStockAvailability",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order's lines and their stocks",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LineStockAvailabilityList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "DELIVERYFORMS_CREATE"
            ]
          },
          {
            "organizationKey" : [
              "DELIVERYFORMS_CREATE"
            ]
          },
          {
            "userKey" : [
              "DELIVERYFORMS_CREATE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/deliver" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Deliver an order: make its delivery note",
        "description" : "Turns a WAITING_FOR_DELIVERY order into a delivery note, as « Livrer » in the web app: the order becomes DELIVERED, its delivery date the note's day; the note takes its lines (at the order's prices; with lots, the customer's discount taken off them, as the web app does), its tags and its delivery address, linked both ways (the order lists it in deliveryNoteIds). lots: the stock lots the goods leave from, each naming its order line (lineIndex), its stock and lot number, and its quantity; several per line make one line each on the document, a line without lots is taken as ordered, and the stock movements are written. A lot's stock is one of its line's product (another: 422 on its stockId). Without lots, no stock moves. The lots of a line add up to at most what it ordered (422). An order with deposit invoices makes a note « billed with the order ». A Boutique order ends its stock reservation and, if the shop wants it, charges the card at the real amount. The organization is notified. Asking again once delivered: 409. With If-Match, refused (412) if the order changed since it was read. Send an Idempotency-Key to retry safely.",
        "operationId" : "deliverOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "If-Match",
            "in" : "header",
            "description" : "The ETag read: the write is refused (412) if the order has changed since; * or absent: no check",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ConvertOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The delivery note it made",
            "headers" : {
              "Location" : {
                "description" : "The new delivery note's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The new delivery note's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused"
                    }
                  }
                }
              }
            }
          },
          "412" : {
            "description" : "The If-Match sent is stale: the resource has changed since.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.precondition-failed"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_TRANSFORM_TO_DELIVERYFORM"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_TRANSFORM_TO_DELIVERYFORM"
            ]
          },
          {
            "userKey" : [
              "ORDER_TRANSFORM_TO_DELIVERYFORM"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/invoice" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Bill an order",
        "description" : "Turns a WAITING_FOR_DELIVERY order into an invoice, as « Facturer » in the web app: a VALIDATED invoice at once, with its legal number (the organization's sequence, without gaps) and today's date, its lines and tags taken from the order (and the customer's discount), linked both ways (the order lists it in invoiceIds); the order becomes INVOICED. lots: the stock lots the goods leave from, each naming its order line (lineIndex), its stock and lot number, and its quantity; several per line make one line each on the document, a line without lots is taken as ordered, and the stock movements are written. A lot's stock is one of its line's product (another: 422 on its stockId). Without lots, no stock moves. On an invoice, a line is billed whole: its lots, one or several, add up to exactly what it ordered (422 on their quantity). Then, as from the web app, the invoice is sent the way the customer's settings say and booked. The same caller asking again gets the same invoice (409 when that invoice was deleted since); billed by someone else, 409. An order with deposit invoices is settled by its final invoice (409); a Boutique order paid by card is billed at its capture (409). Counts in the plan's invoices per month (402 once reached). Send an Idempotency-Key to retry safely.",
        "operationId" : "invoiceOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ConvertOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "The invoice it made",
            "headers" : {
              "Location" : {
                "description" : "The new invoice's path",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "ETag" : {
                "description" : "The new invoice's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written. Or: Another member or key billed this order already (the caller's own billing is answered again), or the caller's own billing made an invoice deleted since. Nothing was created. Or: The order is billed in several times: deposit invoices were issued on it (or on the quotation it was made from), and its final invoice, which deducts them, settles it; a whole invoice would bill them twice. Nothing was created. Or: The order was placed and paid by card on the organization's Boutique: its invoice is issued when the card is charged, at the amount really charged; converting it here would bill it twice. Nothing was created.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.transition-refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.already-invoiced"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.has-deposits"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.orders.order.shop-billed"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "orders.order.transition-refused" : "#/components/schemas/Error.orders.order.transition-refused",
                      "orders.order.already-invoiced" : "#/components/schemas/Error.orders.order.already-invoiced",
                      "orders.order.has-deposits" : "#/components/schemas/Error.orders.order.has-deposits",
                      "orders.order.shop-billed" : "#/components/schemas/Error.orders.order.shop-billed"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_TRANSFORM_TO_INVOICE"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_TRANSFORM_TO_INVOICE"
            ]
          },
          {
            "userKey" : [
              "ORDER_TRANSFORM_TO_INVOICE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/send" : {
      "post" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Send an order by e-mail",
        "description" : "Sends an order form to some of its customer's e-mail addresses, by their ids, as from the web app: the PDF attached, with the organization's letter, logged and counted in its monthly e-mail quota. Nothing changes its status (POST …/share does). Synchronous: the answer is the result per recipient, in the order sent (SUCCEEDED, or FAILED with its error: orders.order.recipient-unsubscribed for an address that unsubscribed, core.plan-limit-reached when the quota ran out on the way, core.internal-error when the mail could not go). Refused as a whole, sending nothing: an id that is not one of the customer's addresses (422), a quota short of the recipients (402 core.plan-limit-reached, limit emailsPerMonth). Send an Idempotency-Key to retry safely: without it, a retry sends again.",
        "operationId" : "sendOrder",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SendOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The result per recipient",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItemResults"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_SEND_EMAIL"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_SEND_EMAIL"
            ]
          },
          {
            "userKey" : [
              "ORDER_SEND_EMAIL"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/orders/{orderId}/status-history" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "List an order's status history",
        "description" : "Returns every status an order went through, newest first, with when and by whom — a person, an organization key's robot, or null when Myle set it (its creation). All at once: nextCursor is never present.",
        "operationId" : "listOrderStatusHistory",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "orderId",
            "in" : "path",
            "description" : "The order's id (order_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The order's statuses, newest first",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderStatusChangeList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORDER_LIST"
            ]
          },
          {
            "session" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "organizationKey" : [
              "QUOTATION_LIST"
            ]
          },
          {
            "userKey" : [
              "ORDER_LIST"
            ]
          },
          {
            "userKey" : [
              "QUOTATION_LIST"
            ]
          }
        ]
      }
    },
    "/orders" : {
      "get" : {
        "tags" : [
          "Orders"
        ],
        "summary" : "Search the orders across organizations",
        "description" : "Returns the orders of every organization the caller may read them in — a member with ORDER_LIST, QUOTATION_LIST or INVOICES_CREATE (a user key: among the organizations it reaches, its rights narrowed; an organization key: its own), whose plan carries the « Orders » module —, each inside the caller's tag scope there and, where it lacks ORDER_LIST_ALL, among the orders it created, prepares or delivers; deleted ones never. The same filters, sort and pages as an organization's list, plus organizationId; each order says its organizationId.",
        "operationId" : "searchOrders",
        "parameters" : [
          {
            "name" : "organizationId",
            "in" : "query",
            "description" : "Only the organizations among these (organization_<uuid>, repeat it for several); one the caller cannot read adds nothing",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "Orders of one of these statuses (repeat it for several): VALIDATED, SHARED, APPROVED, WAITING_FOR_DELIVERY, DELIVERED, INVOICED, CANCELED, ORDERED",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "APPROVED",
                  "CANCELED",
                  "INVOICED",
                  "SHARED",
                  "ORDERED",
                  "DELIVERED",
                  "VALIDATED",
                  "WAITING_FOR_DELIVERY"
                ]
              }
            }
          },
          {
            "name" : "companyId",
            "in" : "query",
            "description" : "Orders of one of these customers (company_<uuid>)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "issueDateFrom",
            "in" : "query",
            "description" : "Orders dated on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "issueDateTo",
            "in" : "query",
            "description" : "Orders dated on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateFrom",
            "in" : "query",
            "description" : "Orders to deliver on or after this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "deliveryDateTo",
            "in" : "query",
            "description" : "Orders to deliver on or before this day (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "preparerId",
            "in" : "query",
            "description" : "Orders one of these members prepares (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "delivererId",
            "in" : "query",
            "description" : "Orders one of these members delivers (user_<uuid>, robot_<uuid>; repeat it for several)",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "q",
            "in" : "query",
            "description" : "Text searched in the number and in the customer's name (accents and case ignored)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "updatedAfter",
            "in" : "query",
            "description" : "Orders changed strictly after this instant (RFC 3339): the delta of a synchronization",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date-time"
            }
          },
          {
            "name" : "tag",
            "in" : "query",
            "description" : "Orders carrying one of these tags (repeat it for several); with tagMode=ALL, every one of them",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "tagMode",
            "in" : "query",
            "description" : "How the tag filter matches: ANY (the default), an order carrying one of the tags; ALL, an order carrying every one of them",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "ANY",
                "ALL"
              ]
            }
          },
          {
            "name" : "excludeTag",
            "in" : "query",
            "description" : "Leaves out the orders carrying every one of these tags (repeat it for several): one tag leaves out the orders carrying it; with several, an order carrying only some of them stays",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          },
          {
            "name" : "sort",
            "in" : "query",
            "description" : "-number (the default, the newest first), number, createdAt, updatedAt or issueDate; with a leading - for descending. Ties are broken by the order's id",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "enum" : [
                "-number",
                "number",
                "-createdAt",
                "createdAt",
                "updatedAt",
                "-updatedAt",
                "-issueDate",
                "issueDate"
              ]
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "includeTotal",
            "in" : "query",
            "description" : "true: the answer gives totalCount, the number of orders of the whole list with these filters (one more count on the server); absent or false: it does not",
            "required" : false,
            "schema" : {
              "type" : [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of orders",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused"
                    }
                  }
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
            ]
          },
          {
            "organizationKey" : [
            ]
          },
          {
            "userKey" : [
            ]
          }
        ]
      }
    },
    "/organizations/{id}/delivery-notes/{deliveryNoteId}" : {
      "get" : {
        "tags" : [
          "Delivery notes"
        ],
        "summary" : "Get a delivery note",
        "description" : "Returns a delivery note the caller can see — one an order's delivery made (POST …/orders/{orderId}/deliver), or any other —; one outside its tag scope, deleted or unknown is a 404. The rest of the delivery notes comes with their own lot.",
        "operationId" : "getDeliveryNote",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "deliveryNoteId",
            "in" : "path",
            "description" : "The deliveryNote's id (deliveryNote_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The delivery note",
            "headers" : {
              "ETag" : {
                "description" : "The delivery note's version",
                "required" : true,
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeliveryNoteResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "DELIVERYFORMS_LIST"
            ]
          },
          {
            "organizationKey" : [
              "DELIVERYFORMS_LIST"
            ]
          },
          {
            "userKey" : [
              "DELIVERYFORMS_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoicing" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Get the organization's e-invoicing",
        "description" : "Returns the organization's e-invoicing: whether it can issue e-invoices, its electronic address, and, for a caller holding ORGANISATION_PATCH, its connection to SuperPDP and the verification statuses (null otherwise). Reads the database only: POST …/einvoicing/sync reads the statuses from SuperPDP.",
        "operationId" : "getEinvoicing",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The organization's e-invoicing",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoicing/connect" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Start connecting the organization to SuperPDP",
        "description" : "Answers SuperPDP's authorize URL: open it in the user's browser. SuperPDP checks the company and the person on its own pages (Myle never sees identity documents), then returns to the Myle web app, which finishes the connection. Reserved to organizations on a paid plan (402), asked before the step-up. A signed-in session only, with a passkey step-up for einvoicing.connect. An organization outside the reform (an individual, a foreign company) is refused (409); a warning comes when INSEE suggests SuperPDP will refuse it.",
        "operationId" : "connectEinvoicing",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Where to send the user",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingAuthorizationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: E-invoicing comes with a paid plan: an organization on a trial or without a paid subscription cannot connect to the e-invoicing platform, nor submit invoices unless it connected before. Nothing was done.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.organization.paid-plan-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "einvoicing.organization.paid-plan-required" : "#/components/schemas/Error.einvoicing.organization.paid-plan-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The organization is declared an individual or a foreign company: it is outside the mandatory e-invoicing reform, and has nothing to connect.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.organization.not-subject"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.organization.not-subject" : "#/components/schemas/Error.einvoicing.organization.not-subject"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoicing/disconnect" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Disconnect the organization from SuperPDP",
        "description" : "Revokes the organization's SuperPDP tokens and removes its connection: invoices go back to e-mail. A signed-in session only, with a passkey step-up for einvoicing.disconnect. Allowed to an organization without subscription (leaving is never refused). Answers the e-invoicing as it is now.",
        "operationId" : "disconnectEinvoicing",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The organization's e-invoicing, disconnected",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoicing/sync" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Read the verification statuses from SuperPDP",
        "description" : "Reads the company's and the person's verification statuses from SuperPDP and stores a change: useful while a freshly connected organization is under review. Allowed to an organization without subscription.",
        "operationId" : "syncEinvoicing",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The organization's e-invoicing",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The organization is not connected to the e-invoicing platform: connect it first (POST …/einvoicing/connect, with a signed-in session).",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.connection.not-connected"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.connection.not-connected" : "#/components/schemas/Error.einvoicing.connection.not-connected"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORGANISATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoicing/address" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Get the organization's electronic address",
        "description" : "Returns the electronic addresses the directory publishes for the organization's SIREN, each with its state on the network, and the one its invoices carry (BT-34). Asks the directory: 502 when it does not answer.",
        "operationId" : "getEinvoicingAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The addresses",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingAddressResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_GET"
            ]
          },
          {
            "organizationKey" : [
              "ORGANISATION_GET"
            ]
          },
          {
            "userKey" : [
              "ORGANISATION_GET"
            ]
          }
        ]
      },
      "put" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Choose the organization's electronic address",
        "description" : "Retains one of the addresses the directory publishes (a person's choice, never overwritten by the automatic resolution), or, with null, returns to the automatic resolution. Audited.",
        "operationId" : "replaceEinvoicingAddress",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReplaceRoutingAddress"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The addresses, the choice retained",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoicingAddressResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: The directory does not publish this electronic address for the SIREN: choose one of the candidates read with GET. Nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.routing-address.not-published"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "einvoicing.routing-address.not-published" : "#/components/schemas/Error.einvoicing.routing-address.not-published"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "ORGANISATION_PATCH"
            ]
          },
          {
            "userKey" : [
              "ORGANISATION_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/einvoicing-routing" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Get a customer's e-invoicing routing",
        "description" : "Returns the electronic addresses the directory publishes for the customer's SIREN, the one its invoices carry (BT-49) and where it comes from (DIRECTORY or MANUAL), and whether its invoices go through the network. Asks the directory: 502 when it does not answer. The customer must be one the caller can see.",
        "operationId" : "getCompanyEinvoicingRouting",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The customer's routing",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyEinvoicingRoutingResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_LIST"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_LIST"
            ]
          }
        ]
      },
      "put" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Choose a customer's electronic address",
        "description" : "Retains one of the addresses the directory publishes for the customer (MANUAL: never overwritten by the automatic resolution), or, with null, returns to the automatic resolution. Audited on the customer.",
        "operationId" : "replaceCompanyEinvoicingRouting",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReplaceRoutingAddress"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The customer's routing, the choice retained",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CompanyEinvoicingRoutingResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: The directory does not publish this electronic address for the SIREN: choose one of the candidates read with GET. Nothing was written.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.routing-address.not-published"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "einvoicing.routing-address.not-published" : "#/components/schemas/Error.einvoicing.routing-address.not-published"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "COMPANIES_PATCH"
            ]
          },
          {
            "userKey" : [
              "COMPANIES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/einvoice" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Get an invoice's e-invoice",
        "description" : "Returns the invoice's e-invoice on the network: its technical status and history (null and empty when it was never submitted), the last failure read, and whether it can go through the network now (its eligibility).",
        "operationId" : "getInvoiceEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The e-invoice",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoiceResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/submit-einvoice" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Submit an invoice through the e-invoicing network",
        "description" : "Submits the validated invoice to SuperPDP (its e-invoice read at GET …/einvoice), or submits it again after a failure. An organization on a trial or without a paid plan that never connected is refused (402). Refused, nothing submitted: not eligible, a failure submitting again cannot fix, a credit note naming no invoice (409). SuperPDP refusing it or not answering is a 502, recorded in the invoice's history. Send an Idempotency-Key to retry safely.",
        "operationId" : "submitInvoiceEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The e-invoice, submitted",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EinvoiceResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: E-invoicing comes with a paid plan: an organization on a trial or without a paid subscription cannot connect to the e-invoicing platform, nor submit invoices unless it connected before. Nothing was done.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.organization.paid-plan-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "einvoicing.organization.paid-plan-required" : "#/components/schemas/Error.einvoicing.organization.paid-plan-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice cannot go through the e-invoicing network now (the organization not connected or verified, the customer not reachable, the invoice not validated…): nothing was submitted. Read GET …/einvoice for the eligibility. Or: The last submission failed in a way submitting again cannot fix until something changes (the customer's address, the invoice's content): nothing was submitted. Or: A credit note goes through the network with the invoice it corrects: name it on the credit note first. Nothing was submitted.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.einvoice.not-eligible"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.einvoice.not-retryable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.einvoice.credit-note-reference-missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.einvoice.not-eligible" : "#/components/schemas/Error.einvoicing.einvoice.not-eligible",
                      "einvoicing.einvoice.not-retryable" : "#/components/schemas/Error.einvoicing.einvoice.not-retryable",
                      "einvoicing.einvoice.credit-note-reference-missing" : "#/components/schemas/Error.einvoicing.einvoice.credit-note-reference-missing"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_PATCH"
            ]
          },
          {
            "userKey" : [
              "INVOICES_PATCH"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/einvoices/outgoing-failures" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "List the failed submissions",
        "description" : "Returns the submissions that failed and wait for an action, in the caller's tag scope, each failure read with the address the directory publishes today. A refusal of routing to a customer no longer reachable waits for nothing (its invoice goes by e-mail) and is left out. All at once: nextCursor is never present.",
        "operationId" : "listOutgoingEinvoiceFailures",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The failed submissions",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OutgoingEinvoiceFailureResourceList"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "List the incoming e-invoices",
        "description" : "Returns the e-invoices suppliers sent the organization through the network, the newest first, filtered, one page at a time.",
        "operationId" : "listIncomingEinvoices",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "status",
            "in" : "query",
            "description" : "E-invoices of one of these statuses (repeat it for several): RECEIVED, APPROVED, REFUSED…",
            "required" : false,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "enum" : [
                  "PENDING_SUBMISSION",
                  "SUBMISSION_FAILED",
                  "SUBMITTED",
                  "ISSUED",
                  "RECEIVED",
                  "MADE_AVAILABLE",
                  "IN_HAND",
                  "APPROVED",
                  "PARTIALLY_APPROVED",
                  "DISPUTED",
                  "SUSPENDED",
                  "COMPLETED",
                  "REFUSED",
                  "PAYMENT_SENT",
                  "PAYMENT_RECEIVED",
                  "REJECTED"
                ]
              }
            }
          },
          {
            "name" : "invoiceDateFrom",
            "in" : "query",
            "description" : "Invoices dated on or after this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "invoiceDateTo",
            "in" : "query",
            "description" : "Invoices dated on or before this date (YYYY-MM-DD)",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ],
              "format" : "date"
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of incoming e-invoices",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}" : {
      "get" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Get an incoming e-invoice",
        "description" : "Returns an e-invoice a supplier sent the organization: as JSON by default, with its lines and history; with Accept: application/pdf, the PDF its sender attached or SuperPDP's rendering (503 while SuperPDP cannot render it); with Accept: application/xml, its CII, the legal original. A representation it does not have is a 406 naming the ones it has.",
        "operationId" : "getIncomingEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice",
            "headers" : {
              "Content-Disposition" : {
                "description" : "With the XML: attachment, with its file name",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "Content-Security-Policy" : {
                "description" : "With the XML: sandbox (a supplier's document is never rendered on Myle's origin)",
                "required" : false,
                "schema" : {
                  "type" : [
                    "string",
                    "null"
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              },
              "application/pdf" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              },
              "application/xml" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "503" : {
            "description" : "Myle or one of its services is temporarily unavailable; retry later.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unavailable"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_LIST"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/accept" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Accept an incoming e-invoice",
        "description" : "Tells the supplier, through the platform, that the organization accepts the invoice (fr:205), then books the purchase (unless an approved expense books it already). SuperPDP refusing the decision changes nothing (502). Send an Idempotency-Key to retry safely.",
        "operationId" : "acceptIncomingEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice, accepted",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done. Or: The incoming e-invoice has no id on the e-invoicing platform: no decision can be sent for it. Nothing was done.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.incoming-einvoice.already-settled" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled",
                      "einvoicing.incoming-einvoice.not-on-platform" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/refuse" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Refuse an incoming e-invoice",
        "description" : "Tells the supplier, through the platform, that the organization refuses the invoice (fr:210), with an AFNOR reason code (422 without one, or with one outside the list); the note stays in Myle. Send an Idempotency-Key to retry safely.",
        "operationId" : "refuseIncomingEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RefuseIncomingEinvoice"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice, refused",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done. Or: The incoming e-invoice has no id on the e-invoicing platform: no decision can be sent for it. Nothing was done.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.incoming-einvoice.already-settled" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled",
                      "einvoicing.incoming-einvoice.not-on-platform" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/dispute" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Dispute an incoming e-invoice",
        "description" : "Tells the supplier, through the platform, that the organization disputes the invoice (fr:207): a reason is required (422), kept in Myle. Not final: the supplier answers. Send an Idempotency-Key to retry safely.",
        "operationId" : "disputeIncomingEinvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/IncomingEinvoiceReason"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice, disputed",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done. Or: The incoming e-invoice has no id on the e-invoicing platform: no decision can be sent for it. Nothing was done.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.incoming-einvoice.already-settled" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled",
                      "einvoicing.incoming-einvoice.not-on-platform" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/accept-partially" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Accept an incoming e-invoice in part",
        "description" : "Tells the supplier, through the platform, that the organization accepts the invoice in part (fr:206), with an optional reason kept in Myle; the purchase is booked in full, the correction comes as the supplier's credit note. Send an Idempotency-Key to retry safely.",
        "operationId" : "acceptIncomingEinvoicePartially",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/IncomingEinvoiceReason"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice, accepted in part",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done. Or: The incoming e-invoice has no id on the e-invoicing platform: no decision can be sent for it. Nothing was done.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.incoming-einvoice.already-settled" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled",
                      "einvoicing.incoming-einvoice.not-on-platform" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-on-platform"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/incoming-einvoices/{incomingEinvoiceId}/mark-paid" : {
      "post" : {
        "tags" : [
          "E-invoicing"
        ],
        "summary" : "Mark an incoming e-invoice paid",
        "description" : "Records the payment of an accepted incoming e-invoice: the settlement booked and lettered, the status PAYMENT_SENT, the supplier told through the platform (best effort). Once only (409 the second time). Send an Idempotency-Key to retry safely.",
        "operationId" : "markIncomingEinvoicePaid",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "incomingEinvoiceId",
            "in" : "path",
            "description" : "The incomingEinvoice's id (incomingEinvoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/MarkIncomingEinvoicePaid"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The incoming e-invoice, paid",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncomingEinvoiceDetailResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done. Or: Only an accepted (or partially accepted) incoming e-invoice is marked paid: accept it first. Nothing was recorded.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-accepted"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "einvoicing.incoming-einvoice.already-settled" : "#/components/schemas/Error.einvoicing.incoming-einvoice.already-settled",
                      "einvoicing.incoming-einvoice.not-accepted" : "#/components/schemas/Error.einvoicing.incoming-einvoice.not-accepted"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          },
          {
            "userKey" : [
              "INVOICES_RECEIVE_DECIDE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Get the organization's Stripe account",
        "description" : "Returns the organization's Stripe Connect account: whether one is connected, what Stripe lets it do (take payments, pay out), whether its onboarding is complete, and the state of its collection (turned off by the organization, or paused because it no longer pays for Myle). Stripe is read each time.",
        "operationId" : "getPaymentsAccount",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The account",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentsAccountResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account/onboarding" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Start or resume the Stripe onboarding",
        "description" : "Answers the link of Stripe's onboarding, which the user opens in a browser: Stripe checks the organization's identity and bank details on its own pages (Myle never sees an identity document), then sends the user to returnUrl. Without an account, one is created first (never for a demo organization). The link expires within minutes and works once: ask a new one at refreshUrl. A signed-in session only, with a passkey step-up (paymentsAccount.onboarding): an API key gets 403.",
        "operationId" : "startPaymentsAccountOnboarding",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/StartOnboarding"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Stripe's onboarding page",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/HostedLinkResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.subscription-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: A demo organization never reaches Stripe: nothing was done.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.demo"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "payments.account.demo" : "#/components/schemas/Error.payments.account.demo"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account/dashboard-link" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Open the Stripe dashboard",
        "description" : "Answers a link to the account's Stripe Express dashboard (payouts, disputes, bank details), signed in, which the user opens in a browser; it expires within minutes and works once. A signed-in session only, with a passkey step-up (paymentsAccount.dashboardLink): an API key gets 403. Open to a read-only organization.",
        "operationId" : "createPaymentsAccountDashboardLink",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Stripe's dashboard",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/HostedLinkResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…). Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.session.required" : "#/components/schemas/Error.auth.session.required",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding).",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.not-connected"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "payments.account.not-connected" : "#/components/schemas/Error.payments.account.not-connected"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account/online-payment" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Get the online payment of invoices",
        "description" : "Returns whether the organization's invoices can be paid online (a « Pay » button on their public page, through Stripe), and what that needs: the setting, a connected account taking payments, a plan carrying Stripe collection, the collection neither off nor paused.",
        "operationId" : "getOnlinePaymentSetting",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The setting",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OnlinePaymentSettingResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          }
        ]
      },
      "put" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Turn the online payment of invoices on or off",
        "description" : "Turns the online payment of the organization's invoices on or off, recorded in its history. Turning it on with a connected account whose plan does not carry Stripe collection is refused (402).",
        "operationId" : "replaceOnlinePaymentSetting",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReplaceOnlinePaymentSetting"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The setting, changed",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OnlinePaymentSettingResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan does not carry Stripe collection (SEPA debits, mandates, auto-debit, online payment of invoices); the trial does not either. It comes with a paid plan.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "payments.plan.collection-required" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.validation-failed"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_CONNECT_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account/sepa-fees" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "List the SEPA debits' fees",
        "description" : "Returns the fee of each SEPA debit the organization started (and Stripe's dispute fees), newest first, one page at a time: what was debited, what Stripe and Myle withheld, whether Myle invoiced its commission.",
        "operationId" : "listSepaFees",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "limit",
            "in" : "query",
            "description" : "The page size, 50 by default, 200 at most",
            "required" : false,
            "schema" : {
              "type" : [
                "integer",
                "null"
              ],
              "format" : "int32",
              "minimum" : 1,
              "maximum" : 200
            }
          },
          {
            "name" : "cursor",
            "in" : "query",
            "description" : "The nextCursor of the previous page",
            "required" : false,
            "schema" : {
              "type" : [
                "string",
                "null"
              ]
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "A page of fees",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SepaFeeResourceList"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "userKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/payments-account/sepa-quota" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Get the SEPA quota",
        "description" : "Returns the organization's SEPA quota over the rolling window (per customer and for the whole organization) and what it used, the bounds of one debit, what a debit costs, and what blocks every debit if anything does: read it before offering « Debit ».",
        "operationId" : "getSepaQuota",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The quota",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SepaQuotaResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "userKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/sepa-mandate" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Get a customer's SEPA mandate",
        "description" : "Returns the SEPA mandate of a customer the caller can see, as Stripe holds it: ACTIVE with its reference, its page and the bank account it debits, or NONE; and whether the customer's invoices are debited automatically. Stripe is read each time.",
        "operationId" : "getCompanySepaMandate",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The mandate",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SepaMandateResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.payments.account.not-connected"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/sepa-mandate/invitation" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Invite a customer to sign a SEPA mandate",
        "description" : "Invites a customer to sign a SEPA mandate on a page of Myle's (their bank details go to Stripe, never through the caller): sendEmail: true mails it (counted in the plan's monthly e-mail quota, logged on the customer), else the answer carries the link to share yourself. The link works once and lasts 7 days. Refused when the collection is off or paused, or the plan does not carry SEPA debits. A session passes the passkey step-up stripe.sendMandateInvitation; an API key holding the right needs none. Send an Idempotency-Key to retry safely: without it, a retry mails again.",
        "operationId" : "createSepaMandateInvitation",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateSepaMandateInvitation"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The invitation",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SepaMandateInvitationResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan does not carry Stripe collection (SEPA debits, mandates, auto-debit, online payment of invoices); the trial does not either. It comes with a paid plan. Or: The organization's plan allows no more of what this operation creates.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.plan.collection-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "payments.plan.collection-required" : "#/components/schemas/Error.payments.plan.collection-required",
                      "core.plan-limit-reached" : "#/components/schemas/Error.core.plan-limit-reached"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The organization turned its Stripe collection off (in its payment settings): nothing is debited, no mandate is offered, no auto-debit is turned on until it turns it back on. Or: The organization's Stripe collection is paused because it no longer pays for Myle: it resumes with its subscription.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.disabled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.paused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "payments.collection.disabled" : "#/components/schemas/Error.payments.collection.disabled",
                      "payments.collection.paused" : "#/components/schemas/Error.payments.collection.paused"
                    }
                  }
                }
              }
            }
          },
          "413" : {
            "description" : "The request body is larger than this operation accepts.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.payload-too-large"
                }
              }
            }
          },
          "415" : {
            "description" : "The request body's Content-Type is not one this operation reads.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.unsupported-media-type"
                }
              }
            }
          },
          "422" : {
            "description" : "Fields of the request are invalid. Or: This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.validation-failed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.validation-failed" : "#/components/schemas/Error.core.validation-failed",
                      "core.idempotency-key-reused" : "#/components/schemas/Error.core.idempotency-key-reused"
                    }
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay. Or: Too many mandate invitations in a row, by this caller or to this customer: retry in an hour.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.rate-limited"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.mandate.invitations-throttled"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.rate-limited" : "#/components/schemas/Error.core.rate-limited",
                      "payments.mandate.invitations-throttled" : "#/components/schemas/Error.payments.mandate.invitations-throttled"
                    }
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/companies/{companyId}/sepa-mandate/revoke" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Revoke a customer's SEPA mandate",
        "description" : "Revokes a customer's SEPA mandates at Stripe (every SEPA bank account detached) and turns their auto-debit off: nothing can be debited until they sign a new one. Open even when the collection is off or paused. A session passes the passkey step-up stripe.revokeMandate; an API key holding the right needs none. Send an Idempotency-Key to retry safely.",
        "operationId" : "revokeSepaMandate",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "companyId",
            "in" : "path",
            "description" : "The company's id (company_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The mandate, revoked (NONE)",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SepaMandateResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding).",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.not-connected"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "payments.account.not-connected" : "#/components/schemas/Error.payments.account.not-connected"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          },
          {
            "userKey" : [
              "STRIPE_MANDATES_MANAGE"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/debit" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Debit an invoice by SEPA",
        "description" : "Starts the SEPA debit of what remains due on an invoice the caller can see, through its customer's mandate, as from the web app: the invoice moves to SEPA_PENDING (a VALIDATED one is shared first), the customer is told, and the payment appears in the invoice's payments once Stripe settled the debit (a few business days; SEPA_FAILED if the bank rejects it). Refused before anything moves: a demo organization, the collection off or paused, a plan without SEPA debits, no account, an account Stripe suspended, a status that takes no debit (a debit in progress included), no mandate, an amount outside the bounds, a quota reached. A session passes the passkey step-up stripe.collect (bound to the invoice); an API key holding the right needs none. Send an Idempotency-Key to retry safely: a retry never debits twice (the second meets SEPA_PENDING).",
        "operationId" : "debitInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice's payment status, the debit started",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentStatusResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write. Or: The organization's plan does not carry Stripe collection (SEPA debits, mandates, auto-debit, online payment of invoices); the trial does not either. It comes with a paid plan.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required",
                      "payments.plan.collection-required" : "#/components/schemas/Error.payments.plan.collection-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: A demo organization never reaches Stripe: nothing was done. Or: The organization turned its Stripe collection off (in its payment settings): nothing is debited, no mandate is offered, no auto-debit is turned on until it turns it back on. Or: The organization's Stripe collection is paused because it no longer pays for Myle: it resumes with its subscription. Or: No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding). Or: Stripe suspended the organization's account: debits are blocked until it is settled in the Stripe dashboard. Or: The invoice's status takes no debit: a draft, a paid one, a debit already in progress (SEPA_PENDING), a dispute or a refusal on the e-invoicing network. Nothing was debited. Or: The customer has no usable SEPA mandate: send them a mandate invitation (POST …/sepa-mandate/invitation). Or: The customer's mandate is on a bank account outside France: only French IBANs are debited. Or: Nothing remains due on the invoice: nothing was debited. Or: What remains due is below the smallest SEPA debit: nothing was debited. Or: What remains due is above the largest SEPA debit: nothing was debited. Or: The organization's SEPA quota over the rolling window is reached, for this customer or for the whole organization: nothing was debited (GET …/payments-account/sepa-quota tells what remains).",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.demo"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.disabled"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.collection.paused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.not-connected"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.suspended"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.debit.not-debitable"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.mandate.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.mandate.foreign-iban"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.debit.nothing-due"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.debit.below-minimum"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.debit.above-maximum"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.debit.quota-reached"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "payments.account.demo" : "#/components/schemas/Error.payments.account.demo",
                      "payments.collection.disabled" : "#/components/schemas/Error.payments.collection.disabled",
                      "payments.collection.paused" : "#/components/schemas/Error.payments.collection.paused",
                      "payments.account.not-connected" : "#/components/schemas/Error.payments.account.not-connected",
                      "payments.account.suspended" : "#/components/schemas/Error.payments.account.suspended",
                      "payments.debit.not-debitable" : "#/components/schemas/Error.payments.debit.not-debitable",
                      "payments.mandate.missing" : "#/components/schemas/Error.payments.mandate.missing",
                      "payments.mandate.foreign-iban" : "#/components/schemas/Error.payments.mandate.foreign-iban",
                      "payments.debit.nothing-due" : "#/components/schemas/Error.payments.debit.nothing-due",
                      "payments.debit.below-minimum" : "#/components/schemas/Error.payments.debit.below-minimum",
                      "payments.debit.above-maximum" : "#/components/schemas/Error.payments.debit.above-maximum",
                      "payments.debit.quota-reached" : "#/components/schemas/Error.payments.debit.quota-reached"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "userKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/refund" : {
      "post" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Refund an invoice's Stripe payments",
        "description" : "Asks Stripe to refund, in full, every payment of the invoice it collected (a SEPA debit, an online payment). The invoice's status moves once Stripe confirms the refund: the answer is its payment status as it is. A session passes the passkey step-up stripe.refund (bound to the invoice); an API key holding the right needs none. Send an Idempotency-Key to retry safely: without it, a retry asks Stripe again.",
        "operationId" : "refundInvoice",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Idempotency-Key",
            "in" : "header",
            "description" : "A unique string chosen by the client (a UUID), kept 24 hours: the same key with the same body replays the first response instead of performing the operation again; with another body, 422 core.idempotency-key-reused",
            "required" : false,
            "schema" : {
              "type" : "string",
              "maxLength" : 255,
              "minLength" : 1
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The invoice's payment status",
            "headers" : {
              "Myle-Idempotent-Replayed" : {
                "description" : "true when this response is the replay of an earlier request with the same Idempotency-Key",
                "schema" : {
                  "type" : "string",
                  "enum" : [
                    true
                  ]
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentStatusResource"
                }
              }
            }
          },
          "400" : {
            "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-request"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to. Or: The organization has no active paid subscription: it is read-only, it can read and export but not write.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.module-required"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.core.subscription-required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.module-required" : "#/components/schemas/Error.core.module-required",
                      "core.subscription-required" : "#/components/schemas/Error.core.subscription-required"
                    }
                  }
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization. Or: This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing",
                      "auth.step-up.required" : "#/components/schemas/Error.auth.step-up.required"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "409" : {
            "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay. Or: The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle. Or: A demo organization never reaches Stripe: nothing was done. Or: No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding). Or: No payment of the invoice was collected through Stripe: there is nothing to refund there.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.core.idempotency-key-in-use"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.billing.invoice.stripe-imported"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.demo"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.account.not-connected"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.payments.refund.nothing-to-refund"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "core.idempotency-key-in-use" : "#/components/schemas/Error.core.idempotency-key-in-use",
                      "billing.invoice.stripe-imported" : "#/components/schemas/Error.billing.invoice.stripe-imported",
                      "payments.account.demo" : "#/components/schemas/Error.payments.account.demo",
                      "payments.account.not-connected" : "#/components/schemas/Error.payments.account.not-connected",
                      "payments.refund.nothing-to-refund" : "#/components/schemas/Error.payments.refund.nothing-to-refund"
                    }
                  }
                }
              }
            }
          },
          "422" : {
            "description" : "This Idempotency-Key was already used for a request with another body.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.idempotency-key-reused"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "502" : {
            "description" : "A service Myle depends on refused the operation.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.bad-gateway"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "organizationKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          },
          {
            "userKey" : [
              "STRIPE_PAYMENTS_COLLECT"
            ]
          }
        ]
      }
    },
    "/organizations/{id}/invoices/{invoiceId}/payment-status" : {
      "get" : {
        "tags" : [
          "Payments"
        ],
        "summary" : "Get an invoice's payment status",
        "description" : "Returns the payment status of an invoice the caller can see: its status (SEPA_PENDING while a debit is on its way), what was paid, what remains due, its payments and its last SEPA debit — what the public payment page shows its customer, without a token.",
        "operationId" : "getInvoicePaymentStatus",
        "parameters" : [
          {
            "name" : "id",
            "in" : "path",
            "description" : "The organization's id (organization_<uuid>; the organisation_<uuid> spelling is accepted too)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "invoiceId",
            "in" : "path",
            "description" : "The invoice's id (invoice_<uuid>)",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "Myle-API-Version",
            "in" : "header",
            "description" : "The contract date the client was built against (YYYY-MM-DD); the latest when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "format" : "date"
            }
          },
          {
            "name" : "Accept-Language",
            "in" : "header",
            "description" : "The language of error messages; English when absent",
            "required" : false,
            "schema" : {
              "type" : "string",
              "enum" : [
                "fr",
                "en"
              ]
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "The payment status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentStatusResource"
                }
              }
            }
          },
          "401" : {
            "description" : "No credential was sent: send Authorization: Bearer <token>. Or: The credential sent is not valid. Or: The credential sent has expired. Or: The credential sent was revoked (password change, logout everywhere).",
            "headers" : {
              "WWW-Authenticate" : {
                "description" : "Bearer realm=\"myle\", with error=\"invalid_token\" when a token was sent",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.missing"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.invalid"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.expired"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.credential.missing" : "#/components/schemas/Error.auth.credential.missing",
                      "auth.credential.invalid" : "#/components/schemas/Error.auth.credential.invalid",
                      "auth.credential.expired" : "#/components/schemas/Error.auth.credential.expired",
                      "auth.credential.revoked" : "#/components/schemas/Error.auth.credential.revoked"
                    }
                  }
                }
              }
            }
          },
          "402" : {
            "description" : "The organization's plan or settings lack the module this operation belongs to.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.module-required"
                }
              }
            }
          },
          "403" : {
            "description" : "The account's e-mail address is not confirmed yet. Or: This session may not perform this operation (an application's session outside its grant, a read-only session). Or: The user API key sent is narrowed to other organizations than this one. Or: The caller lacks the right this operation requires in this organization.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [
                    {
                      "$ref" : "#/components/schemas/Error.auth.email.unconfirmed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.session.refused"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.api-key.organization-not-allowed"
                    },
                    {
                      "$ref" : "#/components/schemas/Error.auth.right.missing"
                    }
                  ],
                  "discriminator" : {
                    "propertyName" : "code",
                    "mapping" : {
                      "auth.email.unconfirmed" : "#/components/schemas/Error.auth.email.unconfirmed",
                      "auth.session.refused" : "#/components/schemas/Error.auth.session.refused",
                      "auth.api-key.organization-not-allowed" : "#/components/schemas/Error.auth.api-key.organization-not-allowed",
                      "auth.right.missing" : "#/components/schemas/Error.auth.right.missing"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-found"
                }
              }
            }
          },
          "405" : {
            "description" : "This path does not accept this method; see the Allow header.",
            "headers" : {
              "Allow" : {
                "description" : "The methods this path accepts",
                "schema" : {
                  "type" : "string"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.method-not-allowed"
                }
              }
            }
          },
          "406" : {
            "description" : "No representation of the resource matches the Accept header.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.not-acceptable"
                }
              }
            }
          },
          "429" : {
            "description" : "Too many requests for this policy; retry after the Retry-After delay.",
            "headers" : {
              "Retry-After" : {
                "description" : "Seconds to wait before retrying",
                "schema" : {
                  "type" : "integer"
                }
              },
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.rate-limited"
                }
              }
            }
          },
          "500" : {
            "description" : "An unexpected error; give the request_id to support.",
            "headers" : {
              "Content-Language" : {
                "description" : "The language of error: fr or en",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error.core.internal-error"
                }
              }
            }
          },
          "default" : {
            "description" : "Any other error; a client falls back on the HTTP status",
            "headers" : {
              "RateLimit-Policy" : {
                "description" : "With an API key: the policy counted and its quota, \"read\";q=600;w=60",
                "schema" : {
                  "type" : "string"
                }
              },
              "RateLimit" : {
                "description" : "With an API key: what remains of the policy and when it is whole again, \"read\";r=597;t=41",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [
          {
            "session" : [
              "INVOICES_LIST"
            ]
          },
          {
            "organizationKey" : [
              "INVOICES_LIST"
            ]
          },
          {
            "userKey" : [
              "INVOICES_LIST"
            ]
          }
        ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "AddressInput" : {
        "title" : "AddressInput",
        "description" : "A postal address to give a company",
        "type" : "object",
        "required" : [
          "line1"
        ],
        "properties" : {
          "label" : {
            "description" : "Its internal name, never printed; absent for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "recipientLine" : {
            "description" : "The line printed above the street when the recipient is not simply the company",
            "type" : [
              "string",
              "null"
            ]
          },
          "line1" : {
            "description" : "The street",
            "type" : "string"
          },
          "postalCode" : {
            "description" : "The postal code",
            "type" : [
              "string",
              "null"
            ]
          },
          "city" : {
            "description" : "The city",
            "type" : [
              "string",
              "null"
            ]
          },
          "siret" : {
            "description" : "The SIRET of the establishment at this address (14 digits)",
            "type" : [
              "string",
              "null"
            ]
          },
          "deliveryInstructions" : {
            "description" : "What whoever delivers there needs to know (a door code, where to leave the goods)",
            "type" : [
              "string",
              "null"
            ]
          },
          "openingHours" : {
            "description" : "Its own opening hours: the whole week, each day once, its ranges HH:mm to a later HH:mm; [] for none; absent or null: none of its own, the company's apply",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          }
        }
      },
      "ApiKeyResource" : {
        "title" : "ApiKeyResource",
        "description" : "An API key: a credential for a program. A user key (USER) acts as its owner, with the owner's live rights; an organization key (ORGANIZATION) acts as its own robot account (ROBOT), with the rights configured on it. actor is who it acts as; createdBy who created it (for a rotated key, who rotated it: always a USER), or null.",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "kind",
          "name",
          "displayToken",
          "organizationIds",
          "roleId",
          "rights",
          "tagScope",
          "effectiveRights",
          "actor",
          "createdBy",
          "expiresAt",
          "lastUsedAt",
          "revokedAt",
          "revokedReason",
          "replacedById",
          "createdAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The key's id (apiKey_<ulid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"apiKey\"",
            "type" : "string"
          },
          "kind" : {
            "description" : "USER or ORGANIZATION",
            "type" : "string"
          },
          "name" : {
            "description" : "The key's name",
            "type" : "string"
          },
          "displayToken" : {
            "description" : "What can be shown of the token after its creation: its kind, the start of its id, its end",
            "type" : "string"
          },
          "organizationIds" : {
            "description" : "The organizations the key acts in: an organization key's own; for a user key, the ones it is narrowed to, or null for every organization of its owner",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "roleId" : {
            "description" : "An organization key's role (the role's rights apply, live), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "rights" : {
            "description" : "An organization key's direct rights; for a user key, the list its owner's rights are narrowed to, or null for every right of its owner",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "tagScope" : {
            "description" : "An organization key's tag scope ({category: [tags]}), or null (its role's, else none)",
            "anyOf" : [
              {
                
              },
              {
                "type" : "null"
              }
            ]
          },
          "effectiveRights" : {
            "description" : "What the key may do: an organization key's role ∪ direct rights; a user key's, in the organization of ?organizationId= only, else null",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "actor" : {
            "$ref" : "#/components/schemas/Author"
          },
          "createdBy" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Author"
              },
              {
                "type" : "null"
              }
            ]
          },
          "expiresAt" : {
            "description" : "When the key stops working (RFC 3339, UTC), or null if it never expires",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "lastUsedAt" : {
            "description" : "When the key was last used, to the minute (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "revokedAt" : {
            "description" : "When the key was revoked (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "revokedReason" : {
            "description" : "Why: USER_REVOKED, ADMIN_REVOKED, OWNER_LEFT, OWNER_DEACTIVATED, EXPIRED, LEAKED; or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "replacedById" : {
            "description" : "The key that replaced this one by a rotation, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "createdAt" : {
            "description" : "When the key was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "token" : {
            "description" : "The full token, to send as Authorization: Bearer <token>. Only in the 201 answer of a creation or a rotation: Myle never shows it again",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ApiKeyResourceList" : {
        "title" : "ApiKeyResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ApiKeyResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "Author" : {
        "title" : "Author",
        "description" : "Who did something: a person (USER) or the robot account of an organization API key (ROBOT), which acts in the key's name",
        "type" : "object",
        "required" : [
          "id",
          "name",
          "type",
          "apiKeyId"
        ],
        "properties" : {
          "id" : {
            "description" : "user_<uuid> for a person, robot_<uuid> for the robot account of an organization key",
            "type" : "string"
          },
          "name" : {
            "description" : "The person's name; for a robot account, its key's name (« Export comptable Sage »)",
            "type" : "string"
          },
          "type" : {
            "description" : "USER or ROBOT; clients must tolerate new values",
            "type" : "string"
          },
          "apiKeyId" : {
            "description" : "For a ROBOT, the organization key it acts for (apiKey_<ulid>) when known; null for a USER",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "BarcodeResource" : {
        "title" : "BarcodeResource",
        "description" : "A barcode of a product (EAN-13, GTIN…)",
        "type" : "object",
        "required" : [
          "id",
          "value",
          "format",
          "isPrimary"
        ],
        "properties" : {
          "id" : {
            "description" : "The barcode's id (barcode_<uuid>)",
            "type" : "string"
          },
          "value" : {
            "description" : "The barcode, as printed",
            "type" : "string"
          },
          "format" : {
            "description" : "Its symbology: EAN_13, EAN_8, CODE_128 or QR_CODE. An open enum: tolerate a value you do not know",
            "type" : "string",
            "enum" : [
              "EAN_13",
              "EAN_8",
              "CODE_128",
              "QR_CODE"
            ]
          },
          "isPrimary" : {
            "description" : "Whether it is the product's main barcode (at most one is)",
            "type" : "boolean"
          }
        }
      },
      "BatchIds" : {
        "title" : "BatchIds",
        "description" : "The invoices a batch acts on",
        "type" : "object",
        "required" : [
          "ids"
        ],
        "properties" : {
          "ids" : {
            "description" : "Their ids (invoice_<uuid>), at least one; each invoice is answered once, at its first place in the order sent",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "BatchPaymentAllocation" : {
        "title" : "BatchPaymentAllocation",
        "description" : "A payment of a batch: the invoice it pays, and what was paid on it",
        "type" : "object",
        "required" : [
          "invoiceId",
          "amount"
        ],
        "properties" : {
          "invoiceId" : {
            "description" : "The invoice it pays (invoice_<uuid>); each invoice once in a batch",
            "type" : "string"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          }
        }
      },
      "BatchShareInvoices" : {
        "title" : "BatchShareInvoices",
        "description" : "The invoices a batch share acts on",
        "type" : "object",
        "required" : [
          "ids"
        ],
        "properties" : {
          "ids" : {
            "description" : "Their ids (invoice_<uuid>), at least one; each invoice is answered once, at its first place in the order sent",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "force" : {
            "description" : "true: handed over outside the e-invoicing network, though it is their channel (POST …/share's force=true)",
            "type" : [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CompanyEinvoicingRoutingResource" : {
        "title" : "CompanyEinvoicingRoutingResource",
        "description" : "A customer's e-invoicing routing: the addresses the directory publishes, the one retained (establishmentWarning, or null), the verdict",
        "type" : "object",
        "required" : [
          "object",
          "companyId",
          "selected",
          "source",
          "candidates",
          "establishmentWarning",
          "isRouted",
          "reasons",
          "isDirectoryUnavailable"
        ],
        "properties" : {
          "object" : {
            "description" : "companyEinvoicingRouting",
            "type" : "string"
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "selected" : {
            "description" : "The address its invoices carry (BT-49), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "source" : {
            "description" : "DIRECTORY or MANUAL, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "candidates" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RoutingCandidateResource"
            }
          },
          "establishmentWarning" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EstablishmentWarningResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "isRouted" : {
            "description" : "The customer's invoices go through the network",
            "type" : "boolean"
          },
          "reasons" : {
            "description" : "Why not, as codes (ORG_NOT_CONNECTED, CLIENT_NOT_INVOICABLE…); empty when routed",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "isDirectoryUnavailable" : {
            "description" : "The directory did not answer: the verdict is unknown, not « unreachable »",
            "type" : "boolean"
          }
        }
      },
      "CompanyEmailAddressResource" : {
        "title" : "CompanyEmailAddressResource",
        "description" : "An e-mail address of a company",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "address",
          "label",
          "purposes",
          "isUnsubscribed",
          "unsubscribedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The address's id (companyEmailAddress_<uuid>), unique among the company's addresses",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"companyEmailAddress\"",
            "type" : "string"
          },
          "address" : {
            "description" : "The e-mail address, lower-cased",
            "type" : "string"
          },
          "label" : {
            "description" : "Its label (« Comptabilité »), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "purposes" : {
            "description" : "The documents sent to it automatically: INVOICE, DELIVERY_NOTE, ORDER, QUOTATION. An open enum: tolerate a value you do not know",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "isUnsubscribed" : {
            "description" : "Whether it unsubscribed from the campaigns and grouped mailings (documents still reach it); POST …/resubscribe subscribes it again",
            "type" : "boolean"
          },
          "unsubscribedAt" : {
            "description" : "When it unsubscribed (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "CompanyNeighborsResource" : {
        "title" : "CompanyNeighborsResource",
        "description" : "The companies before and after one in a list read with the same filters and sort; null at either end",
        "type" : "object",
        "required" : [
          "previous",
          "next"
        ],
        "properties" : {
          "previous" : {
            "description" : "The company listed just before (company_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "next" : {
            "description" : "The company listed just after (company_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyResource" : {
        "title" : "CompanyResource",
        "description" : "A customer of the organization: a French business, a consumer or a foreign client. headquartersAddress: its registered office, or null when none was entered; billingAddress: where its invoices are sent when not to its headquarters, or null; discountPercentage: the discount granted on its documents, in percent, a decimal string, or null.",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "name",
          "type",
          "siren",
          "vatNumber",
          "accountingNumber",
          "phone",
          "emailAddresses",
          "headquartersAddress",
          "billingAddress",
          "deliveryAddresses",
          "discountPercentage",
          "discountReason",
          "invoicingPeriod",
          "tags",
          "autoDebit",
          "description",
          "showPricesOnDeliveryNotes",
          "openingHours",
          "places",
          "isSupplier",
          "lastDeliveryNoteDate",
          "directorySyncedAt",
          "isEInvoiceReachable",
          "legalForm",
          "isPublicBody",
          "hasShopAccess",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The company's id (company_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"company\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "Its reference, unique among the organization's companies (C0042)",
            "type" : "string"
          },
          "name" : {
            "description" : "Its name",
            "type" : "string"
          },
          "type" : {
            "description" : "BUSINESS_FR (a French business, with a SIREN), CONSUMER, FOREIGN (a client outside France). An open enum: tolerate a value you do not know",
            "type" : "string",
            "enum" : [
              "BUSINESS_FR",
              "CONSUMER",
              "FOREIGN"
            ]
          },
          "siren" : {
            "description" : "Its SIREN (9 digits), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "The accounting account its sales are booked to (411…), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "phone" : {
            "description" : "Its phone number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "emailAddresses" : {
            "description" : "Its e-mail addresses",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CompanyEmailAddressResource"
            }
          },
          "headquartersAddress" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/PostalAddressResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "billingAddress" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/PostalAddressResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "deliveryAddresses" : {
            "description" : "Its delivery addresses",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PostalAddressResource"
            }
          },
          "discountPercentage" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "discountReason" : {
            "description" : "Why it gets a discount, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "invoicingPeriod" : {
            "description" : "How often its delivery notes are invoiced automatically: MONTHLY, TEN_DAYS, DAILY, DISABLED. An open enum: tolerate a value you do not know",
            "type" : "string",
            "enum" : [
              "MONTHLY",
              "TEN_DAYS",
              "DAILY",
              "DISABLED"
            ]
          },
          "tags" : {
            "description" : "Its tags, sorted, managed ones included (E-FACT…)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "autoDebit" : {
            "description" : "Its validated invoices are debited by SEPA automatically, through its mandate (the SEPA:AUTO-PRÉLÈVEMENT tag)",
            "type" : "boolean"
          },
          "description" : {
            "description" : "A free description, or null; read only",
            "type" : [
              "string",
              "null"
            ]
          },
          "showPricesOnDeliveryNotes" : {
            "description" : "Whether its delivery notes show the prices",
            "type" : "boolean"
          },
          "openingHours" : {
            "description" : "Its opening hours: the days it has hours for, Monday first (a day absent is not filled in, not closed)",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          },
          "places" : {
            "description" : "Its places (fields, sites) proposed on its documents' lines",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "isSupplier" : {
            "description" : "Whether it is also one of the organization's suppliers; read only",
            "type" : "boolean"
          },
          "lastDeliveryNoteDate" : {
            "description" : "The date of its last delivery note that is not deleted (YYYY-MM-DD), or null; read only",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "directorySyncedAt" : {
            "description" : "When its name and headquarters were last synchronized from the French e-invoicing directory (RFC 3339, UTC), or null when they are not; read only",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "isEInvoiceReachable" : {
            "description" : "Whether the e-invoicing directory says it receives e-invoices, or null when not known; read only",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "legalForm" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/LegalFormResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "isPublicBody" : {
            "description" : "Whether it is a public body (its invoices go through Chorus Pro), from its legal form; null when not known; read only",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "hasShopAccess" : {
            "description" : "Whether it has an active Boutique access; null when the caller cannot see the Boutique accesses (the Boutique module off, or SHOP_ACCESS_VIEW missing) and in a search across organizations; read only",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "createdAt" : {
            "description" : "When it was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When it, its addresses or its e-mail addresses last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "CompanyResourceList" : {
        "title" : "CompanyResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page; totalCount when includeTotal=true was sent",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CompanyResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "totalCount" : {
            "description" : "The number of companies of the whole list, every page, with the same filters (cursor and limit aside); only when includeTotal=true was sent",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int64"
          }
        }
      },
      "ConvertOrder" : {
        "title" : "ConvertOrder",
        "description" : "The stock lots the goods leave from: for each order line, none (no stock moves for it), one, or several — one line of the document made per lot",
        "type" : "object",
        "properties" : {
          "lots" : {
            "description" : "The lots, absent or empty for none: the document takes the order's lines as they are, no stock moved",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OrderLotInput"
            }
          }
        }
      },
      "CorrectableInvoice" : {
        "title" : "CorrectableInvoice",
        "description" : "An invoice a credit note can correct: an issued invoice of the same customer. total: its total",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "number",
          "issueDate",
          "total",
          "status"
        ],
        "properties" : {
          "id" : {
            "description" : "The invoice's id (invoice_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"invoice\"",
            "type" : "string"
          },
          "number" : {
            "description" : "Its legal number",
            "type" : "string"
          },
          "issueDate" : {
            "description" : "Its issue date (YYYY-MM-DD)",
            "type" : "string",
            "format" : "date"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "status" : {
            "description" : "Its status (see the invoice's)",
            "type" : "string"
          }
        }
      },
      "CorrectableInvoiceList" : {
        "title" : "CorrectableInvoiceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CorrectableInvoice"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateBarcode" : {
        "title" : "CreateBarcode",
        "description" : "A new barcode of a product",
        "type" : "object",
        "required" : [
          "value",
          "format"
        ],
        "properties" : {
          "value" : {
            "description" : "The barcode, as printed: an EAN-13 or an EAN-8 with its check digit, up to 80 characters for a Code 128, up to 2048 for a QR code",
            "type" : "string"
          },
          "format" : {
            "description" : "Its symbology: EAN_13, EAN_8, CODE_128 or QR_CODE",
            "type" : "string",
            "enum" : [
              "EAN_13",
              "EAN_8",
              "CODE_128",
              "QR_CODE"
            ]
          },
          "isPrimary" : {
            "description" : "Whether it becomes the product's main barcode (the previous one stops being); absent: false",
            "type" : [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CreateBatchPayments" : {
        "title" : "CreateBatchPayments",
        "description" : "Payments to record, one per allocation, sharing one method, label, date and reference (a transfer that settles several invoices). Each allocation's amount: what was paid on that invoice, in EUR, more than 0, two decimals at most.",
        "type" : "object",
        "required" : [
          "allocations"
        ],
        "properties" : {
          "allocations" : {
            "description" : "The payments, at least one, at most 1000; each invoice once",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BatchPaymentAllocation"
            }
          },
          "method" : {
            "description" : "How it was paid: CASH, CHECK, TRANSFER, CARD, SEPA_DIRECT_DEBIT, PAYPAL, OTHER (the default)",
            "type" : [
              "string",
              "null"
            ]
          },
          "methodLabel" : {
            "description" : "The organization's own name for the method (« Lydia »), 60 characters at most",
            "type" : [
              "string",
              "null"
            ]
          },
          "paidAt" : {
            "description" : "When it was paid (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "reference" : {
            "description" : "Its reference (a transfer's label), the same on every payment of the batch",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateCompany" : {
        "title" : "CreateCompany",
        "description" : "A new company. type: BUSINESS_FR (the default; a SIREN, a SIRET or a VAT number is then required), CONSUMER, FOREIGN. headquartersAddress: its registered office; billingAddress: where its invoices are sent, when not to its headquarters. discountPercentage: a decimal string from 0 to 100.",
        "type" : "object",
        "required" : [
          "number",
          "name"
        ],
        "properties" : {
          "number" : {
            "description" : "Its reference, unique among the organization's companies",
            "type" : "string"
          },
          "name" : {
            "description" : "Its name",
            "type" : "string"
          },
          "type" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "Its SIREN, or a SIRET (its SIREN is kept); BUSINESS_FR only",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number: French (FR + key + SIREN) for BUSINESS_FR, any for FOREIGN",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "The accounting account its sales are booked to, unique among the organization's companies",
            "type" : [
              "string",
              "null"
            ]
          },
          "phone" : {
            "description" : "Its phone number",
            "type" : [
              "string",
              "null"
            ]
          },
          "emailAddresses" : {
            "description" : "Its e-mail addresses",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/EmailAddressInput"
            }
          },
          "headquartersAddress" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/AddressInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "billingAddress" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/AddressInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "deliveryAddresses" : {
            "description" : "Its delivery addresses",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/AddressInput"
            }
          },
          "discountPercentage" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "discountReason" : {
            "description" : "Why it gets a discount",
            "type" : [
              "string",
              "null"
            ]
          },
          "invoicingPeriod" : {
            "description" : "How often its delivery notes are invoiced: MONTHLY, TEN_DAYS, DAILY, DISABLED (the default)",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its tags",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "showPricesOnDeliveryNotes" : {
            "description" : "Whether its delivery notes show the prices; false by default",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "openingHours" : {
            "description" : "Its opening hours, one entry per day; none by default",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          }
        }
      },
      "CreateInvoice" : {
        "title" : "CreateInvoice",
        "description" : "A new draft invoice. companyId: the customer, one of the organization's companies. Each line's unitPrice is in EUR, excluding VAT; without INVOICES_CUSTOMIZE_PRICE, a catalog product's line takes its catalog price (the customer's own price if it has one) and no discount, whatever is sent.",
        "type" : "object",
        "required" : [
          "companyId",
          "lines"
        ],
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "description" : {
            "description" : "A description printed on the invoice",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, at least one, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceLineInput"
            }
          },
          "tags" : {
            "description" : "Its own tags",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateOrder" : {
        "title" : "CreateOrder",
        "description" : "A new order. companyId: the customer, one of the organization's companies. Without DELIVERYFORMS_CUSTOMIZE_PRICE, a line takes its product's catalog price (the customer's own price if it has one) and no discount, whatever is sent.",
        "type" : "object",
        "required" : [
          "companyId",
          "lines"
        ],
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD); today (Paris) when absent",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "delivery" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/OrderDeliveryInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "description" : {
            "description" : "A description printed on the order",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, at least one, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderLineInput"
            }
          },
          "tags" : {
            "description" : "Its own tags",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateOrganizationApiKey" : {
        "title" : "CreateOrganizationApiKey",
        "description" : "A new organization key, configured like a member: a role and/or direct rights, a tag scope",
        "type" : "object",
        "required" : [
          "name"
        ],
        "properties" : {
          "name" : {
            "description" : "The key's name (« Export comptable Sage »), 1 to 200 characters; also its robot account's name",
            "type" : "string"
          },
          "expiresIn" : {
            "description" : "ONE_HOUR, THIRTY_DAYS, NINETY_DAYS, ONE_YEAR (the default) or NEVER",
            "type" : [
              "string",
              "null"
            ]
          },
          "roleId" : {
            "description" : "One of the organization's roles, whose rights you hold all; or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "rights" : {
            "description" : "Direct rights (RightType names), added to the role's; each one you hold yourself",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "tagScope" : {
            "description" : "A tag scope ({category: [tags]}), over the role's; or null",
            "anyOf" : [
              {
                
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "CreatePayment" : {
        "title" : "CreatePayment",
        "description" : "A payment to record. amount: what was paid, in EUR, more than 0, two decimals at most; on a credit note, what was refunded.",
        "type" : "object",
        "required" : [
          "amount"
        ],
        "properties" : {
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          },
          "method" : {
            "description" : "How it was paid: CASH, CHECK, TRANSFER, CARD, SEPA_DIRECT_DEBIT, PAYPAL, OTHER (the default)",
            "type" : [
              "string",
              "null"
            ]
          },
          "methodLabel" : {
            "description" : "The organization's own name for the method (« Lydia »), 60 characters at most",
            "type" : [
              "string",
              "null"
            ]
          },
          "paidAt" : {
            "description" : "When it was paid (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "reference" : {
            "description" : "Its reference (a cheque number, a transfer's label)",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateProduct" : {
        "title" : "CreateProduct",
        "description" : "A new product. unitPrice: its unit price excluding VAT, in EUR, up to 4 decimals; absent or null for none. initialStock: the stock to create with it (Stocks module); absent or null for none. shelfLife: the dates its goods carry; absent or null: none enabled, no delay.",
        "type" : "object",
        "required" : [
          "number",
          "name",
          "vatRate"
        ],
        "properties" : {
          "number" : {
            "description" : "Its reference in the catalog, unique among the organization's products",
            "type" : "string"
          },
          "name" : {
            "description" : "Its name",
            "type" : "string"
          },
          "unitPrice" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "vatRate" : {
            "description" : "Its VAT rate in percent, a decimal string from 0 to 100: \"20\", \"5.5\"",
            "type" : "string"
          },
          "accountingNumber" : {
            "description" : "The accounting account its sales are booked to; absent or null for the default one",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its tags; absent for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "initialStock" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/InitialStock"
              },
              {
                "type" : "null"
              }
            ]
          },
          "origins" : {
            "description" : "Where it comes from, as its labels say (« France », « Bretagne »); absent or null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "shelfLife" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ShelfLifeInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "weightGrams" : {
            "description" : "The weight of one unit, in grams, an integer from 0; absent or null when not known",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "volumeMilliliters" : {
            "description" : "The volume of one unit, in milliliters, an integer from 0; absent or null when not known",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "CreateQuotation" : {
        "title" : "CreateQuotation",
        "description" : "A new quotation. companyId: the customer, one of the organization's companies. Without DELIVERYFORMS_CUSTOMIZE_PRICE, a line takes its product's catalog price (the customer's own price if it has one) and no discount, whatever is sent.",
        "type" : "object",
        "required" : [
          "companyId",
          "lines"
        ],
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD); today (Paris) when absent",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "expiryDate" : {
            "description" : "The last day it is valid (YYYY-MM-DD), on or after issueDate; absent, issueDate plus the organization's validity (30 days unless set)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "workStartDate" : {
            "description" : "When the work it offers starts (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "workEndDate" : {
            "description" : "When the work it offers ends (YYYY-MM-DD), on or after workStartDate",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "description" : {
            "description" : "A description printed on the quotation",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, at least one, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/QuotationLineInput"
            }
          },
          "tags" : {
            "description" : "Its own tags",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateSepaMandateInvitation" : {
        "title" : "CreateSepaMandateInvitation",
        "description" : "An invitation to sign a SEPA mandate: mailed to the customer (sendEmail: true), or as a link to share",
        "type" : "object",
        "properties" : {
          "sendEmail" : {
            "description" : "Mail the invitation to the customer (true), or only answer its link (false, the default)",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "email" : {
            "description" : "The customer's address, which Stripe puts on the mandate; by default the customer's first e-mail address",
            "type" : [
              "string",
              "null"
            ]
          },
          "message" : {
            "description" : "A word of yours, in the mail (sendEmail: true), 2000 characters at most",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateUserApiKey" : {
        "title" : "CreateUserApiKey",
        "description" : "A new user key",
        "type" : "object",
        "required" : [
          "name"
        ],
        "properties" : {
          "name" : {
            "description" : "The key's name (« Mon script d'export »), 1 to 200 characters",
            "type" : "string"
          },
          "expiresIn" : {
            "description" : "ONE_HOUR, THIRTY_DAYS, NINETY_DAYS, ONE_YEAR (the default) or NEVER",
            "type" : [
              "string",
              "null"
            ]
          },
          "organizationIds" : {
            "description" : "The organizations it may act in (organization_<uuid>), among yours; absent or null for all of them",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "rights" : {
            "description" : "The rights it is narrowed to (RightType names, see GET /rights); absent or null for all of yours",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "DebitFeeResource" : {
        "title" : "DebitFeeResource",
        "description" : "The last SEPA debit of an invoice, in EUR: amount debited, fee withheld (stripeFee, Stripe's, plus myleFee, Myle's commission incl. VAT).",
        "type" : "object",
        "required" : [
          "amount",
          "fee",
          "stripeFee",
          "myleFee"
        ],
        "properties" : {
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          },
          "fee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "stripeFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "myleFee" : {
            "$ref" : "#/components/schemas/Money"
          }
        }
      },
      "DeliveryAddressInput" : {
        "title" : "DeliveryAddressInput",
        "description" : "A delivery address of a company, in a change of the company: with the id of one it has, it is that one",
        "type" : "object",
        "required" : [
          "line1"
        ],
        "properties" : {
          "id" : {
            "description" : "The id of one of the company's delivery addresses (postalAddress_<uuid>); absent for a new one",
            "type" : [
              "string",
              "null"
            ]
          },
          "label" : {
            "description" : "Its internal name, never printed",
            "type" : [
              "string",
              "null"
            ]
          },
          "recipientLine" : {
            "description" : "The line printed above the street; absent or null: the stored one is kept",
            "type" : [
              "string",
              "null"
            ]
          },
          "line1" : {
            "description" : "The street",
            "type" : "string"
          },
          "postalCode" : {
            "description" : "The postal code",
            "type" : [
              "string",
              "null"
            ]
          },
          "city" : {
            "description" : "The city",
            "type" : [
              "string",
              "null"
            ]
          },
          "siret" : {
            "description" : "The SIRET of the establishment at this address (14 digits)",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "DeliveryNoteLineResource" : {
        "title" : "DeliveryNoteLineResource",
        "description" : "A delivery note line. unitPrice: excluding VAT, as the note prints it (the customer's discount applied)",
        "type" : "object",
        "required" : [
          "index",
          "productId",
          "number",
          "name",
          "quantity",
          "unitPrice",
          "vatRate",
          "discountRate",
          "stockId",
          "lotNumber",
          "origin",
          "useByDays",
          "consumeBeforeDays",
          "bestBeforeDays"
        ],
        "properties" : {
          "index" : {
            "description" : "The line's position in the delivery note, from 0",
            "type" : "integer",
            "format" : "int32"
          },
          "productId" : {
            "description" : "The catalog product it delivers (product_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "number" : {
            "description" : "The product's reference as printed, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "quantity" : {
            "description" : "The quantity delivered, a decimal string",
            "type" : "string"
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "The line's discount in percent, a decimal string, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "stockId" : {
            "description" : "The stock the goods left (stock_<uuid>), or null when none moved",
            "type" : [
              "string",
              "null"
            ]
          },
          "lotNumber" : {
            "description" : "The lot's number (traceability code) the goods left, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "origin" : {
            "description" : "Where the goods come from, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "useByDays" : {
            "description" : "The days until the « date limite de consommation » (DLC) printed, or null",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "consumeBeforeDays" : {
            "description" : "The days until the « date de consommation recommandée » (DCR) printed, or null",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "bestBeforeDays" : {
            "description" : "The days until the « date de durabilité minimale » (DDM) printed, or null",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "DeliveryNoteResource" : {
        "title" : "DeliveryNoteResource",
        "description" : "A delivery note (« bon de livraison »): the goods handed to a customer, with the stock lots they left from. Read alone for now: the rest of the delivery notes (list, create, send, bill) comes with their own lot",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "status",
          "companyId",
          "companyName",
          "address",
          "deliveryDate",
          "description",
          "lines",
          "orderIds",
          "invoiceIds",
          "tags",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The delivery note's id (deliveryNote_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"deliveryNote\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number in the organization's sequence, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "status" : {
            "description" : "WAITING_FOR_INVOICING (to bill), INVOICED (billed), BILLED_WITH_ORDER (its order is billed on its deposits). An open enum. A deleted delivery note is never returned (404)",
            "type" : "string"
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "companyName" : {
            "description" : "The customer's name as the note froze it",
            "type" : "string"
          },
          "address" : {
            "description" : "Where the goods were delivered, as printed",
            "type" : "string"
          },
          "deliveryDate" : {
            "description" : "Its date (YYYY-MM-DD)",
            "type" : "string",
            "format" : "date"
          },
          "description" : {
            "description" : "A description printed on it, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DeliveryNoteLineResource"
            }
          },
          "orderIds" : {
            "description" : "The orders it was made from (order_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "invoiceIds" : {
            "description" : "The invoices that billed it (invoice_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "tags" : {
            "description" : "Its own tags, sorted",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "description" : "When it was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When it, its lines or its status last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "EditInvoice" : {
        "title" : "EditInvoice",
        "description" : "A draft's new content: an absent member is unchanged. Lines are added, changed, removed and reordered by sending the whole list.",
        "type" : "object",
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>): the invoice takes the recipient, legal details and discount the creation would give it for this customer; its lines are kept as they are, but for the customer discount: a line that carried the previous customer's (or none) takes the new one's, a line's own discount stays",
            "type" : [
              "string",
              "null"
            ]
          },
          "description" : {
            "description" : "A description printed on the invoice; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, all of them, at least one, in order (as at the creation). Without INVOICES_CUSTOMIZE_PRICE, a new catalog product's line takes its catalog price and no discount; a line kept as it was keeps its price",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/InvoiceLineInput"
            }
          }
        }
      },
      "EditOrder" : {
        "title" : "EditOrder",
        "description" : "An order's new content: an absent member is unchanged. Lines are added, changed, removed and reordered by sending the whole list.",
        "type" : "object",
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>): the order takes the recipient and legal details a creation would give it for this customer, and loses its delivery address (the previous customer's) unless deliveryAddressId is sent. Refused for an order made from a quotation (409, reason FROM_QUOTATION)",
            "type" : [
              "string",
              "null"
            ]
          },
          "deliveryAddressId" : {
            "description" : "The customer's postal address to deliver to (postalAddress_<uuid>); null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "description" : {
            "description" : "A description printed on the order; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, all of them, at least one, in order (as at the creation). Without DELIVERYFORMS_CUSTOMIZE_PRICE, a new line takes its product's catalog price and no discount; a line kept as it was keeps its price",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OrderLineInput"
            }
          }
        }
      },
      "EditQuotation" : {
        "title" : "EditQuotation",
        "description" : "A quotation's new content: an absent member is unchanged. Lines are added, changed, removed and reordered by sending the whole list.",
        "type" : "object",
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>): the quotation takes the recipient and legal details a creation would give it for this customer; its lines are kept as they are (a quotation carries no customer discount)",
            "type" : [
              "string",
              "null"
            ]
          },
          "description" : {
            "description" : "A description printed on the quotation; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, all of them, at least one, in order (as at the creation). Without DELIVERYFORMS_CUSTOMIZE_PRICE, a new line takes its product's catalog price and no discount; a line kept as it was keeps its price",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/QuotationLineInput"
            }
          }
        }
      },
      "EinvoiceEligibilityResource" : {
        "title" : "EinvoiceEligibilityResource",
        "description" : "Can the invoice go through the e-invoicing network",
        "type" : "object",
        "required" : [
          "isEligible",
          "reasons",
          "isEmissionEnabled",
          "isOrganizationConnected",
          "isOrganizationVerified",
          "customerSiren",
          "isCustomerReachable",
          "customerAddress",
          "isNetworkRequired",
          "isCreditNoteReferenceMissing",
          "isMailAllowedAfterFailure",
          "isAutoRetryPending"
        ],
        "properties" : {
          "isEligible" : {
            "description" : "It can be submitted now",
            "type" : "boolean"
          },
          "reasons" : {
            "description" : "Why not, as codes (ORG_NOT_CONNECTED, CLIENT_NOT_INVOICABLE, NOT_VALIDATED…); empty when eligible",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "isEmissionEnabled" : {
            "type" : "boolean"
          },
          "isOrganizationConnected" : {
            "type" : "boolean"
          },
          "isOrganizationVerified" : {
            "type" : "boolean"
          },
          "customerSiren" : {
            "description" : "The customer's SIREN, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "isCustomerReachable" : {
            "description" : "The customer is reachable on the network, or null when the directory did not say",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "customerAddress" : {
            "description" : "The address the e-invoice carries (BT-49), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "isNetworkRequired" : {
            "description" : "Its legal channel is the network: it is not sent by e-mail",
            "type" : "boolean"
          },
          "isCreditNoteReferenceMissing" : {
            "description" : "A credit note that names no invoice yet: name it before submitting",
            "type" : "boolean"
          },
          "isMailAllowedAfterFailure" : {
            "description" : "A failed submission reopened the e-mail (the PDF goes as on a customer off the network)",
            "type" : "boolean"
          },
          "isAutoRetryPending" : {
            "description" : "An automatic retry is about to submit it again",
            "type" : "boolean"
          }
        }
      },
      "EinvoiceEventResource" : {
        "title" : "EinvoiceEventResource",
        "description" : "A step of an e-invoice's life on the network",
        "type" : "object",
        "required" : [
          "status",
          "at"
        ],
        "properties" : {
          "status" : {
            "description" : "The status reached (SUBMITTED, ISSUED, RECEIVED, APPROVED, REFUSED, SUBMISSION_FAILED…)",
            "type" : "string"
          },
          "at" : {
            "description" : "An instant, RFC 3339 in UTC",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "EinvoiceFailureResource" : {
        "title" : "EinvoiceFailureResource",
        "description" : "Why the last submission failed, read",
        "type" : "object",
        "required" : [
          "code",
          "message",
          "isRetryable",
          "isRetryableNow",
          "areRetriesExhausted"
        ],
        "properties" : {
          "code" : {
            "description" : "The classified failure: ROUTING_ADDRESS_UNKNOWN, INVALID_DOCUMENT, PLATFORM_REJECTED…",
            "type" : "string"
          },
          "message" : {
            "description" : "A sentence in French, as the Myle screens show it",
            "type" : "string"
          },
          "isRetryable" : {
            "description" : "Submitting again may succeed",
            "type" : "boolean"
          },
          "isRetryableNow" : {
            "description" : "Submitting again may succeed now",
            "type" : "boolean"
          },
          "areRetriesExhausted" : {
            "description" : "The automatic retries are spent",
            "type" : "boolean"
          }
        }
      },
      "EinvoiceResource" : {
        "title" : "EinvoiceResource",
        "description" : "An invoice's e-invoice on the network: its technical status, its history, the last failure read (or null), its eligibility",
        "type" : "object",
        "required" : [
          "object",
          "invoiceId",
          "status",
          "submittedAt",
          "lastStatusAt",
          "failure",
          "history",
          "eligibility"
        ],
        "properties" : {
          "object" : {
            "description" : "einvoice",
            "type" : "string"
          },
          "invoiceId" : {
            "description" : "The invoice (invoice_<uuid>)",
            "type" : "string"
          },
          "status" : {
            "description" : "The technical status (PENDING_SUBMISSION, SUBMITTED, ISSUED, RECEIVED, APPROVED, REFUSED, SUBMISSION_FAILED, REJECTED…), or null when never submitted",
            "type" : [
              "string",
              "null"
            ]
          },
          "submittedAt" : {
            "description" : "When it was submitted, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "lastStatusAt" : {
            "description" : "When its status last moved, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "failure" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EinvoiceFailureResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "history" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EinvoiceEventResource"
            }
          },
          "eligibility" : {
            "$ref" : "#/components/schemas/EinvoiceEligibilityResource"
          }
        }
      },
      "EinvoicingAddressResource" : {
        "title" : "EinvoicingAddressResource",
        "description" : "The organization's electronic address: what the directory publishes for its SIREN and the one retained; establishmentWarning, or null",
        "type" : "object",
        "required" : [
          "object",
          "organizationId",
          "selected",
          "source",
          "candidates",
          "establishmentWarning"
        ],
        "properties" : {
          "object" : {
            "description" : "einvoicingAddress",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization (organization_<uuid>)",
            "type" : "string"
          },
          "selected" : {
            "description" : "The address retained, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "source" : {
            "description" : "Where it comes from: DIRECTORY (resolved automatically) or MANUAL (a person's choice), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "candidates" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RoutingCandidateResource"
            }
          },
          "establishmentWarning" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EstablishmentWarningResource"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "EinvoicingAuthorizationResource" : {
        "title" : "EinvoicingAuthorizationResource",
        "description" : "Where to send the user to connect the organization to SuperPDP, and a warning to show before leaving (or null)",
        "type" : "object",
        "required" : [
          "object",
          "authorizeUrl",
          "warning"
        ],
        "properties" : {
          "object" : {
            "description" : "einvoicingAuthorization",
            "type" : "string"
          },
          "authorizeUrl" : {
            "description" : "SuperPDP's authorize URL: open it in the user's browser; SuperPDP returns to the Myle web app",
            "type" : "string"
          },
          "warning" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EinvoicingScopeWarning"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "EinvoicingConnectionResource" : {
        "title" : "EinvoicingConnectionResource",
        "description" : "The organization's connection to the e-invoicing platform (SuperPDP)",
        "type" : "object",
        "required" : [
          "status",
          "companyVerificationStatus",
          "userIdentityVerificationStatus",
          "lastCheckedAt",
          "connectedAt"
        ],
        "properties" : {
          "status" : {
            "description" : "NOT_CONNECTED, CONNECTED, or SIMULATED (a demo organization, connected and verified by simulation)",
            "type" : "string"
          },
          "companyVerificationStatus" : {
            "description" : "SuperPDP's verification of the company (KYB): VERIFIED, NEEDS_REVIEW, FAILED, or null when unknown",
            "type" : [
              "string",
              "null"
            ]
          },
          "userIdentityVerificationStatus" : {
            "description" : "SuperPDP's verification of the person who connected: VERIFIED, NEEDS_REVIEW, NOT_VERIFIED, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "lastCheckedAt" : {
            "description" : "When the statuses were last read from SuperPDP (POST …/einvoicing/sync), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "connectedAt" : {
            "description" : "When the organization connected, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "EinvoicingEmissionResource" : {
        "title" : "EinvoicingEmissionResource",
        "description" : "Whether the organization can issue e-invoices",
        "type" : "object",
        "required" : [
          "isEnabled",
          "isOrganizationConnected",
          "isOrganizationVerified",
          "canEmit"
        ],
        "properties" : {
          "isEnabled" : {
            "description" : "Emission is open to the organization (the platform's switches, the pilot list)",
            "type" : "boolean"
          },
          "isOrganizationConnected" : {
            "description" : "The organization is connected to SuperPDP",
            "type" : "boolean"
          },
          "isOrganizationVerified" : {
            "description" : "SuperPDP verified the company",
            "type" : "boolean"
          },
          "canEmit" : {
            "description" : "All three: invoices to reachable customers go through the network",
            "type" : "boolean"
          }
        }
      },
      "EinvoicingResource" : {
        "title" : "EinvoicingResource",
        "description" : "The organization's e-invoicing: its connection (null for a caller without ORGANISATION_PATCH), whether it can emit, its electronic address",
        "type" : "object",
        "required" : [
          "object",
          "organizationId",
          "connection",
          "emission",
          "address"
        ],
        "properties" : {
          "object" : {
            "description" : "einvoicing",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization (organization_<uuid>)",
            "type" : "string"
          },
          "connection" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EinvoicingConnectionResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "emission" : {
            "$ref" : "#/components/schemas/EinvoicingEmissionResource"
          },
          "address" : {
            "description" : "The electronic address the organization's invoices carry (BT-34, 0225:<SIREN>…), or null when none is retained yet",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "EinvoicingScopeWarning" : {
        "title" : "EinvoicingScopeWarning",
        "description" : "INSEE's profile of the organization when it suggests SuperPDP will refuse it: a warning, not a refusal",
        "type" : "object",
        "required" : [
          "reason",
          "siren",
          "legalFormCode",
          "legalFormLabel",
          "apeCode",
          "apeLabel"
        ],
        "properties" : {
          "reason" : {
            "description" : "Why the organization looks outside the reform (a code)",
            "type" : "string"
          },
          "siren" : {
            "description" : "The organization's SIREN",
            "type" : "string"
          },
          "legalFormCode" : {
            "description" : "INSEE's legal form code, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "legalFormLabel" : {
            "description" : "INSEE's legal form label, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "apeCode" : {
            "description" : "The activity code (APE), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "apeLabel" : {
            "description" : "The activity label, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "EmailAddressInput" : {
        "title" : "EmailAddressInput",
        "description" : "An e-mail address to give a company",
        "type" : "object",
        "required" : [
          "address"
        ],
        "properties" : {
          "address" : {
            "description" : "The e-mail address",
            "type" : "string"
          },
          "label" : {
            "description" : "Its label",
            "type" : [
              "string",
              "null"
            ]
          },
          "purposes" : {
            "description" : "The documents to send to it automatically: INVOICE, DELIVERY_NOTE, ORDER, QUOTATION; absent for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "EstablishmentAlternativeResource" : {
        "title" : "EstablishmentAlternativeResource",
        "description" : "Another address of the SIREN the company's base address may not be the right one against",
        "type" : "object",
        "required" : [
          "identifier",
          "siret",
          "serviceCode",
          "name",
          "city",
          "label"
        ],
        "properties" : {
          "identifier" : {
            "type" : "string"
          },
          "siret" : {
            "description" : "Its SIRET, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "serviceCode" : {
            "description" : "Its service code, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The establishment's name, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "city" : {
            "description" : "The establishment's city, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "label" : {
            "description" : "A readable label, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "EstablishmentWarningResource" : {
        "title" : "EstablishmentWarningResource",
        "description" : "The base address is retained while the directory also publishes establishment addresses (alternatives: the first of them): check it",
        "type" : "object",
        "required" : [
          "baseIdentifier",
          "count",
          "alternatives"
        ],
        "properties" : {
          "baseIdentifier" : {
            "description" : "The base address retained",
            "type" : "string"
          },
          "count" : {
            "description" : "How many other active addresses the directory publishes",
            "type" : "integer",
            "format" : "int32"
          },
          "alternatives" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EstablishmentAlternativeResource"
            }
          }
        }
      },
      "ExtendQuotation" : {
        "title" : "ExtendQuotation",
        "description" : "A quotation's new validity",
        "type" : "object",
        "properties" : {
          "expiryDate" : {
            "description" : "The last day it is valid (YYYY-MM-DD), today (Paris) at the earliest; absent, today plus the organization's validity (30 days unless set)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          }
        }
      },
      "HostedLinkResource" : {
        "title" : "HostedLinkResource",
        "description" : "A page hosted by Stripe, to open in a browser: it expires within minutes and works once",
        "type" : "object",
        "required" : [
          "object",
          "url"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"hostedLink\"",
            "type" : "string"
          },
          "url" : {
            "description" : "The page's address, at Stripe",
            "type" : "string"
          }
        }
      },
      "IncomingEinvoiceDetailResource" : {
        "title" : "IncomingEinvoiceDetailResource",
        "description" : "An e-invoice a supplier sent the organization, with its lines and its history. subtotal: excluding VAT; total: including VAT; amountDue: what remains to pay (the net payable, or the total); prepaidAmount: paid before the invoice; each null when the document gives none",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "status",
          "number",
          "issueDate",
          "dueDate",
          "sender",
          "subtotal",
          "total",
          "amountDue",
          "prepaidAmount",
          "hasXml",
          "hasPdf",
          "receivedAt",
          "lastStatusAt",
          "lines",
          "history"
        ],
        "properties" : {
          "id" : {
            "description" : "incomingEinvoice_<uuid>",
            "type" : "string"
          },
          "object" : {
            "description" : "incomingEinvoice",
            "type" : "string"
          },
          "status" : {
            "description" : "RECEIVED, MADE_AVAILABLE, IN_HAND, APPROVED, PARTIALLY_APPROVED, DISPUTED, REFUSED, PAYMENT_SENT…",
            "type" : "string"
          },
          "number" : {
            "description" : "The supplier's invoice number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "issueDate" : {
            "description" : "The invoice's date, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "dueDate" : {
            "description" : "Its due date, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "sender" : {
            "$ref" : "#/components/schemas/IncomingEinvoiceSender"
          },
          "subtotal" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "total" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "amountDue" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "prepaidAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "hasXml" : {
            "description" : "Its CII (XML) is stored: Accept: application/xml reads it",
            "type" : "boolean"
          },
          "hasPdf" : {
            "description" : "A PDF can be shown (the sender's, or SuperPDP's render): Accept: application/pdf reads it",
            "type" : "boolean"
          },
          "receivedAt" : {
            "description" : "When it arrived",
            "type" : "string",
            "format" : "date-time"
          },
          "lastStatusAt" : {
            "description" : "When its status last moved, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IncomingEinvoiceLineResource"
            }
          },
          "history" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IncomingEinvoiceEventResource"
            }
          }
        }
      },
      "IncomingEinvoiceEventResource" : {
        "title" : "IncomingEinvoiceEventResource",
        "description" : "A step of an incoming e-invoice's life: a decision, a payment, a status the platform gave",
        "type" : "object",
        "required" : [
          "status",
          "at",
          "userId",
          "reasonCode",
          "note"
        ],
        "properties" : {
          "status" : {
            "description" : "The status reached",
            "type" : "string"
          },
          "at" : {
            "description" : "An instant, RFC 3339 in UTC",
            "type" : "string",
            "format" : "date-time"
          },
          "userId" : {
            "description" : "Who did it (user_<uuid>), or null for the platform",
            "type" : [
              "string",
              "null"
            ]
          },
          "reasonCode" : {
            "description" : "A refusal's AFNOR reason code, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "note" : {
            "description" : "What the buyer wrote with the decision (kept in Myle), or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "IncomingEinvoiceLineResource" : {
        "title" : "IncomingEinvoiceLineResource",
        "description" : "A line of an incoming e-invoice, as the supplier's document gives it. unitPrice and total: excluding VAT, null when not given",
        "type" : "object",
        "required" : [
          "index",
          "reference",
          "name",
          "description",
          "quantity",
          "unit",
          "unitPrice",
          "vatRate",
          "total"
        ],
        "properties" : {
          "index" : {
            "description" : "The line's position, from 1 as in the document",
            "type" : "integer",
            "format" : "int32"
          },
          "reference" : {
            "description" : "The supplier's reference, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "unit" : {
            "description" : "The unit (UN/ECE rec. 20: TNE, KGM, LS…), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "unitPrice" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "total" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "IncomingEinvoiceReason" : {
        "title" : "IncomingEinvoiceReason",
        "description" : "What the buyer contests, kept in Myle: required to dispute, optional to accept in part",
        "type" : "object",
        "properties" : {
          "reason" : {
            "description" : "What you contest, in your words: kept in Myle's history, not sent as a code",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "IncomingEinvoiceResource" : {
        "title" : "IncomingEinvoiceResource",
        "description" : "An e-invoice a supplier sent the organization. subtotal: excluding VAT; total: including VAT; amountDue: what remains to pay (the net payable, or the total); prepaidAmount: paid before the invoice; each null when the document gives none",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "status",
          "number",
          "issueDate",
          "dueDate",
          "sender",
          "subtotal",
          "total",
          "amountDue",
          "prepaidAmount",
          "hasXml",
          "receivedAt",
          "lastStatusAt"
        ],
        "properties" : {
          "id" : {
            "description" : "incomingEinvoice_<uuid>",
            "type" : "string"
          },
          "object" : {
            "description" : "incomingEinvoice",
            "type" : "string"
          },
          "status" : {
            "description" : "RECEIVED, MADE_AVAILABLE, IN_HAND, APPROVED, PARTIALLY_APPROVED, DISPUTED, REFUSED, PAYMENT_SENT…",
            "type" : "string"
          },
          "number" : {
            "description" : "The supplier's invoice number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "issueDate" : {
            "description" : "The invoice's date, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "dueDate" : {
            "description" : "Its due date, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "sender" : {
            "$ref" : "#/components/schemas/IncomingEinvoiceSender"
          },
          "subtotal" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "total" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "amountDue" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "prepaidAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "hasXml" : {
            "description" : "Its CII (XML) is stored: Accept: application/xml reads it",
            "type" : "boolean"
          },
          "receivedAt" : {
            "description" : "When it arrived",
            "type" : "string",
            "format" : "date-time"
          },
          "lastStatusAt" : {
            "description" : "When its status last moved, or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "IncomingEinvoiceResourceList" : {
        "title" : "IncomingEinvoiceResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IncomingEinvoiceResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "IncomingEinvoiceSender" : {
        "title" : "IncomingEinvoiceSender",
        "description" : "The supplier who sent the e-invoice, as its document names it",
        "type" : "object",
        "required" : [
          "name",
          "siren",
          "siret",
          "vatNumber"
        ],
        "properties" : {
          "name" : {
            "description" : "Its name, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "Its SIREN, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siret" : {
            "description" : "Its SIRET, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InitialStock" : {
        "title" : "InitialStock",
        "description" : "The stock created with a product, in the same transaction: the product is not created without it. Requires the Stocks module and STOCKS_CREATE, and STOCKLINES_CREATE for a quantity above 0. lot: the lot of that quantity (declared empty without a quantity); absent or null for none.",
        "type" : "object",
        "properties" : {
          "label" : {
            "description" : "The stock's name; absent or null: the product's name",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity in stock at once, a decimal string from 0 to 10000000, written as one « Stock initial » movement; absent or \"0\": no movement",
            "type" : [
              "string",
              "null"
            ]
          },
          "lot" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/InitialStockLot"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "InitialStockLot" : {
        "title" : "InitialStockLot",
        "description" : "A lot of the stock created with a product",
        "type" : "object",
        "required" : [
          "number"
        ],
        "properties" : {
          "number" : {
            "description" : "The lot's number, as printed on the goods",
            "type" : "string"
          },
          "bestBeforeDate" : {
            "description" : "Its best-before date (YYYY-MM-DD); absent or null for none",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          }
        }
      },
      "InvoiceCompanySnapshot" : {
        "title" : "InvoiceCompanySnapshot",
        "description" : "The customer as the invoice froze it at its creation: what the PDF prints, whatever the company became since",
        "type" : "object",
        "required" : [
          "name",
          "address",
          "billingAddress",
          "headquartersAddress",
          "siren",
          "vatNumber"
        ],
        "properties" : {
          "name" : {
            "description" : "The customer's legal name",
            "type" : "string"
          },
          "address" : {
            "description" : "The address the invoice is addressed to",
            "type" : "string"
          },
          "billingAddress" : {
            "description" : "Its billing address, when the invoice is sent there rather than to address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "headquartersAddress" : {
            "description" : "Its headquarters address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "Its SIREN, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceDiscount" : {
        "title" : "InvoiceDiscount",
        "description" : "The customer's discount the invoice carries; amount: what the lines' discounts deduct, excl. VAT",
        "type" : "object",
        "required" : [
          "percentage",
          "amount",
          "reason"
        ],
        "properties" : {
          "percentage" : {
            "description" : "The customer's discount, a decimal string in percent, applied to the lines that carry none; or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "amount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "reason" : {
            "description" : "Why the customer gets it, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceEditability" : {
        "title" : "InvoiceEditability",
        "description" : "Whether a draft's lines, customer and description can still be changed: editable, or reason says why not",
        "type" : "object",
        "required" : [
          "editable",
          "reason"
        ],
        "properties" : {
          "editable" : {
            "description" : "true while the draft has not left the organization (no mail, link, online read, network, payment)",
            "type" : "boolean"
          },
          "reason" : {
            "description" : "Why it cannot, or null: NOT_DRAFT, MAILED, SHARE_LINK, PUBLIC_ACCESS (read online), TRANSMITTED (sent to the e-invoicing network), PAID, GENERATED_CREDIT_NOTE, SHOP (a Boutique order's), STRIPE_IMPORTED. An open list",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceEligibility" : {
        "title" : "InvoiceEligibility",
        "description" : "What each batch would act on among the invoices the filters give: the counts the web app shows on its batch buttons",
        "type" : "object",
        "required" : [
          "total",
          "share",
          "validate",
          "creditNote",
          "duplicate",
          "publicSectorDrafts"
        ],
        "properties" : {
          "total" : {
            "description" : "The invoices the filters give (the caller's, drafts included, deleted ones never)",
            "type" : "integer",
            "format" : "int32"
          },
          "share" : {
            "description" : "Validated and not handed over yet (VALIDATED, or EINVOICE_REJECTED: refused by the e-invoicing platform), the invoices the web app's « Partager » acts on; batch-share also takes an UNPAID or a LOST one",
            "type" : "integer",
            "format" : "int32"
          },
          "validate" : {
            "description" : "Drafts, for batch-validate",
            "type" : "integer",
            "format" : "int32"
          },
          "creditNote" : {
            "description" : "LOST or EINVOICE_REFUSED with no credit note yet, for batch-credit-notes",
            "type" : "integer",
            "format" : "int32"
          },
          "duplicate" : {
            "description" : "Every invoice but a credit note and one imported from Stripe, for batch-duplicate",
            "type" : "integer",
            "format" : "int32"
          },
          "publicSectorDrafts" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/PublicSectorCustomers"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "InvoiceLineInput" : {
        "title" : "InvoiceLineInput",
        "description" : "A line of a new invoice",
        "type" : "object",
        "required" : [
          "name",
          "quantity",
          "unitPrice",
          "vatRate"
        ],
        "properties" : {
          "productId" : {
            "description" : "The catalog product it sells (product_<uuid>); absent for a free line",
            "type" : [
              "string",
              "null"
            ]
          },
          "number" : {
            "description" : "The product's reference as printed",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unit" : {
            "description" : "The unit of the quantity: HOUR, HA, KM, DAY, HALF_DAY, TONNE, UNIT, FLAT; absent for a piece",
            "type" : [
              "string",
              "null"
            ]
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate in percent, a decimal string from 0 to 100: \"20\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "A discount in percent, a decimal string from 0 to 100",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to; absent for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceLineResource" : {
        "title" : "InvoiceLineResource",
        "description" : "An invoice line. unitPrice: excluding VAT, before the discount; subtotal: quantity × unitPrice, discount deducted, excluding VAT; total: the subtotal with its VAT.",
        "type" : "object",
        "required" : [
          "index",
          "productId",
          "number",
          "name",
          "description",
          "quantity",
          "unit",
          "unitPrice",
          "vatRate",
          "discountRate",
          "subtotal",
          "total",
          "accountingNumber"
        ],
        "properties" : {
          "index" : {
            "description" : "The line's position in the invoice, from 0",
            "type" : "integer",
            "format" : "int32"
          },
          "productId" : {
            "description" : "The catalog product it sells (product_<uuid>), or null for a free line",
            "type" : [
              "string",
              "null"
            ]
          },
          "number" : {
            "description" : "The product's reference as printed, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unit" : {
            "description" : "The unit of the quantity (HOUR, HA, KM, DAY, HALF_DAY, TONNE, UNIT, FLAT), or null for a piece",
            "type" : [
              "string",
              "null"
            ]
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent: \"20\", \"5.5\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "The line's discount, a decimal string in percent, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to (706000…), or null for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceNeighbors" : {
        "title" : "InvoiceNeighbors",
        "description" : "An invoice's place in the invoice list: previous, the invoice right before it, and next, the invoice right after it; each null at an end of the list, both null when the filters leave the invoice out of it",
        "type" : "object",
        "required" : [
          "previous",
          "next"
        ],
        "properties" : {
          "previous" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/InvoiceSummary"
              },
              {
                "type" : "null"
              }
            ]
          },
          "next" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/InvoiceSummary"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "InvoiceResource" : {
        "title" : "InvoiceResource",
        "description" : "An invoice. A DRAFT has no number, issueDate nor dueDate: the validation gives them. subtotal: the lines' subtotals (excluding VAT, discounts deducted); vat: the VAT; total: what the invoice amounts to; amountDue: what remains to be paid (a credit note's total is negative). company: the customer as the invoice froze it.",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "status",
          "companyId",
          "company",
          "issueDate",
          "dueDate",
          "description",
          "lines",
          "discount",
          "subtotal",
          "vat",
          "total",
          "amountDue",
          "deliveryNoteIds",
          "creditNoteIds",
          "correctsInvoiceId",
          "tags",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The invoice's id (invoice_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"invoice\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "Its legal number (20261003-000171), or null while it is a DRAFT",
            "type" : [
              "string",
              "null"
            ]
          },
          "status" : {
            "description" : "DRAFT, VALIDATED, SHARED, UNPAID, PARTIALLY_PAID, PARTIALLY_PAID_OVERDUE, PAID, LOST, PAYMENT_ANNOUNCED, SEPA_PENDING, SEPA_FAILED, SEPA_DISPUTED, EINVOICE_SUBMITTED, EINVOICE_REJECTED, EINVOICE_DISPUTED, EINVOICE_REFUSED. An open enum: tolerate a value you do not know. A deleted invoice is never returned (404)",
            "type" : "string",
            "enum" : [
              "UNPAID",
              "PAID",
              "PARTIALLY_PAID",
              "PARTIALLY_PAID_OVERDUE",
              "DRAFT",
              "VALIDATED",
              "SHARED",
              "LOST",
              "SEPA_PENDING",
              "SEPA_FAILED",
              "SEPA_DISPUTED",
              "EINVOICE_SUBMITTED",
              "EINVOICE_REJECTED",
              "EINVOICE_DISPUTED",
              "EINVOICE_REFUSED",
              "PAYMENT_ANNOUNCED"
            ]
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "company" : {
            "$ref" : "#/components/schemas/InvoiceCompanySnapshot"
          },
          "issueDate" : {
            "description" : "Its issue date (YYYY-MM-DD), or null while it is a DRAFT",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "dueDate" : {
            "description" : "Its due date (YYYY-MM-DD), or null while it is a DRAFT",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "description" : {
            "description" : "A description printed on it, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceLineResource"
            }
          },
          "discount" : {
            "$ref" : "#/components/schemas/InvoiceDiscount"
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vat" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "amountDue" : {
            "$ref" : "#/components/schemas/Money"
          },
          "deliveryNoteIds" : {
            "description" : "The delivery notes it invoices (deliveryNote_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "creditNoteIds" : {
            "description" : "The credit notes that cancel or correct it (invoice_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "correctsInvoiceId" : {
            "description" : "For a credit note, the invoice it cancels or corrects (invoice_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its own tags, sorted",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "description" : "When it was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When it, its lines, its status or its tags last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "InvoiceResourceList" : {
        "title" : "InvoiceResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceStatusChange" : {
        "title" : "InvoiceStatusChange",
        "description" : "One status an invoice went through. author: the person or the organization key's robot that set it, or null when Myle did (the delivered e-mail, the e-invoicing network, the due date passing, a SEPA debit…)",
        "type" : "object",
        "required" : [
          "status",
          "changedAt",
          "author"
        ],
        "properties" : {
          "status" : {
            "description" : "The status it took (see the invoice's)",
            "type" : "string"
          },
          "changedAt" : {
            "description" : "When it took it (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "author" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Author"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "InvoiceStatusChangeList" : {
        "title" : "InvoiceStatusChangeList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceStatusChange"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceSummary" : {
        "title" : "InvoiceSummary",
        "description" : "An invoice, in short: enough to name it and to fetch it",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "number",
          "status",
          "companyName"
        ],
        "properties" : {
          "id" : {
            "description" : "The invoice's id (invoice_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"invoice\"",
            "type" : "string"
          },
          "number" : {
            "description" : "Its legal number, or null for a DRAFT",
            "type" : [
              "string",
              "null"
            ]
          },
          "status" : {
            "description" : "Its status (see the invoice's)",
            "type" : "string"
          },
          "companyName" : {
            "description" : "The customer's name as the invoice froze it",
            "type" : "string"
          }
        }
      },
      "InvoiceTag" : {
        "title" : "InvoiceTag",
        "description" : "A tag, as invoices carry it",
        "type" : "string"
      },
      "InvoiceTagList" : {
        "title" : "InvoiceTagList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/InvoiceTag"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ItemError" : {
        "title" : "ItemError",
        "description" : "Why this item failed: code, context and error as in an error response, without request_id",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code (billing.invoice.not-a-draft…)",
            "type" : "string"
          },
          "context" : {
            "$ref" : "#/components/schemas/ItemErrorContext"
          },
          "error" : {
            "description" : "What went wrong, in the request's language (Accept-Language)",
            "type" : "string"
          }
        }
      },
      "ItemErrorContext" : {
        "title" : "ItemErrorContext",
        "description" : "The code's context, an object",
        "type" : "object"
      },
      "ItemList" : {
        "title" : "ItemList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ItemResult" : {
        "title" : "ItemResult",
        "description" : "The outcome of one item",
        "type" : "object",
        "required" : [
          "id",
          "status",
          "error"
        ],
        "properties" : {
          "id" : {
            "description" : "The item's id, as sent",
            "type" : "string"
          },
          "status" : {
            "description" : "SUCCEEDED or FAILED",
            "type" : "string",
            "enum" : [
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "error" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ItemError"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "ItemResultWithCreatedId" : {
        "title" : "ItemResultWithCreatedId",
        "description" : "The outcome of one item, and what it created",
        "type" : "object",
        "required" : [
          "id",
          "status",
          "error",
          "createdId"
        ],
        "properties" : {
          "id" : {
            "description" : "The item's id, as sent",
            "type" : "string"
          },
          "status" : {
            "description" : "SUCCEEDED or FAILED",
            "type" : "string",
            "enum" : [
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "error" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ItemError"
              },
              {
                "type" : "null"
              }
            ]
          },
          "createdId" : {
            "description" : "What the item created (its id: the credit note, the draft, the payment), null when it failed",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ItemResults" : {
        "title" : "ItemResults",
        "description" : "One result per item, in the order sent: SUCCEEDED, or FAILED with its error",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ItemResult"
            }
          }
        }
      },
      "ItemResultsWithCreatedId" : {
        "title" : "ItemResultsWithCreatedId",
        "description" : "One result per item, in the order sent: SUCCEEDED with the id of what it created, or FAILED with its error",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ItemResultWithCreatedId"
            }
          }
        }
      },
      "LegalFormResource" : {
        "title" : "LegalFormResource",
        "description" : "The legal form of a company, as the INSEE registry gives it",
        "type" : "object",
        "required" : [
          "code",
          "label"
        ],
        "properties" : {
          "code" : {
            "description" : "Its code (5710 for a SAS), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "label" : {
            "description" : "Its name (« SAS, société par actions simplifiée »), or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "LineStockAvailability" : {
        "title" : "LineStockAvailability",
        "description" : "An order line and the stocks its goods can leave from",
        "type" : "object",
        "required" : [
          "lineIndex",
          "productId",
          "name",
          "quantity",
          "stocks"
        ],
        "properties" : {
          "lineIndex" : {
            "description" : "The line's index: a lot's lineIndex",
            "type" : "integer",
            "format" : "int32"
          },
          "productId" : {
            "description" : "Its product (product_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "Its label",
            "type" : "string"
          },
          "quantity" : {
            "description" : "The quantity ordered, a decimal string",
            "type" : "string"
          },
          "stocks" : {
            "description" : "The stocks of its product",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LineStockResource"
            }
          }
        }
      },
      "LineStockAvailabilityList" : {
        "title" : "LineStockAvailabilityList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LineStockAvailability"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "LineStockResource" : {
        "title" : "LineStockResource",
        "description" : "A stock of a line's product, and what it can give",
        "type" : "object",
        "required" : [
          "stockId",
          "number",
          "name",
          "available",
          "untracked",
          "lots"
        ],
        "properties" : {
          "stockId" : {
            "description" : "The stock (stock_<uuid>): send it as a lot's stockId",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number",
            "type" : "string"
          },
          "name" : {
            "description" : "Its name",
            "type" : "string"
          },
          "available" : {
            "description" : "What it holds, a decimal string",
            "type" : "string"
          },
          "untracked" : {
            "description" : "What it holds without a lot number, a decimal string",
            "type" : "string"
          },
          "lots" : {
            "description" : "Its lots that can still give goods",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/StockLotResource"
            }
          }
        }
      },
      "LocalizedText" : {
        "title" : "LocalizedText",
        "description" : "A text in French and in English",
        "type" : "object",
        "required" : [
          "fr",
          "en"
        ],
        "properties" : {
          "fr" : {
            "description" : "In French",
            "type" : "string"
          },
          "en" : {
            "description" : "In English",
            "type" : "string"
          }
        }
      },
      "MarkIncomingEinvoicePaid" : {
        "title" : "MarkIncomingEinvoicePaid",
        "description" : "How and when the supplier was paid",
        "type" : "object",
        "properties" : {
          "method" : {
            "description" : "CASH, CHECK, TRANSFER (the default), CARD, SEPA_DIRECT_DEBIT, PAYPAL or OTHER",
            "type" : [
              "string",
              "null"
            ]
          },
          "paidAt" : {
            "description" : "The payment's date (YYYY-MM-DD); today (Europe/Paris) by default",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          }
        }
      },
      "Money" : {
        "title" : "Money",
        "description" : "An amount of money: a decimal string and its ISO 4217 currency",
        "type" : "object",
        "required" : [
          "amount",
          "currency"
        ],
        "properties" : {
          "amount" : {
            "description" : "A decimal string, never a number: \"1250.00\"",
            "type" : "string"
          },
          "currency" : {
            "description" : "The ISO 4217 currency code: EUR",
            "type" : "string"
          }
        }
      },
      "OnlinePaymentSettingResource" : {
        "title" : "OnlinePaymentSettingResource",
        "description" : "The online payment of the organization's invoices (a « Pay » button on the invoice's public page)",
        "type" : "object",
        "required" : [
          "object",
          "isEnabled",
          "isActive",
          "isStripeConnected",
          "chargesEnabled",
          "isAllowedByPlan",
          "isCollectionAllowed",
          "updatedAt"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"onlinePaymentSetting\"",
            "type" : "string"
          },
          "isEnabled" : {
            "description" : "The organization turned the online payment of its invoices on",
            "type" : "boolean"
          },
          "isActive" : {
            "description" : "It is on and the account can take payments: invoices show « Pay »",
            "type" : "boolean"
          },
          "isStripeConnected" : {
            "description" : "A Stripe account is connected",
            "type" : "boolean"
          },
          "chargesEnabled" : {
            "description" : "Stripe lets the account take payments",
            "type" : "boolean"
          },
          "isAllowedByPlan" : {
            "description" : "The organization's plan carries Stripe collection",
            "type" : "boolean"
          },
          "isCollectionAllowed" : {
            "description" : "The collection is neither turned off nor paused",
            "type" : "boolean"
          },
          "updatedAt" : {
            "description" : "When the setting last changed (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "OpeningHoursDay" : {
        "title" : "OpeningHoursDay",
        "description" : "The opening hours of one day of the week",
        "type" : "object",
        "required" : [
          "day",
          "ranges"
        ],
        "properties" : {
          "day" : {
            "description" : "MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY or SUNDAY",
            "type" : "string",
            "enum" : [
              "MONDAY",
              "TUESDAY",
              "WEDNESDAY",
              "THURSDAY",
              "FRIDAY",
              "SATURDAY",
              "SUNDAY"
            ]
          },
          "ranges" : {
            "description" : "Its open ranges, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursRange"
            }
          }
        }
      },
      "OpeningHoursRange" : {
        "title" : "OpeningHoursRange",
        "description" : "A time range of a day, open to close (HH:mm, the organization's local time)",
        "type" : "object",
        "required" : [
          "open",
          "close"
        ],
        "properties" : {
          "open" : {
            "description" : "When it opens (HH:mm)",
            "type" : "string"
          },
          "close" : {
            "description" : "When it closes (HH:mm), after it opens",
            "type" : "string"
          }
        }
      },
      "OrderBatchIds" : {
        "title" : "OrderBatchIds",
        "description" : "The orders a batch acts on",
        "type" : "object",
        "required" : [
          "ids"
        ],
        "properties" : {
          "ids" : {
            "description" : "Their ids (order_<uuid>), at least one; each order is answered once, at its first place in the order sent",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "OrderCompanySnapshot" : {
        "title" : "OrderCompanySnapshot",
        "description" : "The customer as the order froze it at its creation (or when its customer changed): what the PDF prints, whatever the company became since",
        "type" : "object",
        "required" : [
          "name",
          "address",
          "billingAddress",
          "headquartersAddress",
          "siren",
          "vatNumber"
        ],
        "properties" : {
          "name" : {
            "description" : "The customer's legal name",
            "type" : "string"
          },
          "address" : {
            "description" : "The address the order is addressed to",
            "type" : "string"
          },
          "billingAddress" : {
            "description" : "Its billing address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "headquartersAddress" : {
            "description" : "Its headquarters address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "Its SIREN, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderDelivery" : {
        "title" : "OrderDelivery",
        "description" : "Where, when and by whom an order is delivered",
        "type" : "object",
        "required" : [
          "date",
          "addressId",
          "address",
          "preparerId",
          "delivererId"
        ],
        "properties" : {
          "date" : {
            "description" : "When it is to be delivered (YYYY-MM-DD), or null; a delivery sets it to the delivery note's day",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "addressId" : {
            "description" : "The customer's postal address it is delivered to (postalAddress_<uuid>, one of the company's postalAddresses), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "address" : {
            "description" : "Where it is delivered, as printed (the address chosen, or a free text of older orders), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "preparerId" : {
            "description" : "The member who prepares it (user_<uuid>, robot_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "delivererId" : {
            "description" : "The member who delivers it (user_<uuid>, robot_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderDeliveryInput" : {
        "title" : "OrderDeliveryInput",
        "description" : "Where, when and by whom a new order is delivered; every member optional",
        "type" : "object",
        "properties" : {
          "date" : {
            "description" : "When it is to be delivered (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "addressId" : {
            "description" : "The customer's postal address to deliver to (postalAddress_<uuid>, one of the company's)",
            "type" : [
              "string",
              "null"
            ]
          },
          "preparerId" : {
            "description" : "The member who prepares it (user_<uuid>, robot_<uuid>)",
            "type" : [
              "string",
              "null"
            ]
          },
          "delivererId" : {
            "description" : "The member who delivers it (user_<uuid>, robot_<uuid>)",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderEditability" : {
        "title" : "OrderEditability",
        "description" : "Whether an order's lines, customer and description can still be changed: editable, or reason says why not",
        "type" : "object",
        "required" : [
          "editable",
          "reason"
        ],
        "properties" : {
          "editable" : {
            "description" : "true while it is VALIDATED and has not left the organization (no mail, link, share), nor was converted or placed on the Boutique",
            "type" : "boolean"
          },
          "reason" : {
            "description" : "Why it cannot, or null: NOT_DRAFT (no longer VALIDATED), MAILED, SHARE_LINK, PUBLIC_ACCESS (read online), SHARED (marked shared once), CONVERTED (a delivery note or an invoice was made from it), SHOP (a Boutique order). An open list",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderEligibility" : {
        "title" : "OrderEligibility",
        "description" : "What each batch would act on among the orders the filters give: the counts the web app shows on its batch buttons",
        "type" : "object",
        "required" : [
          "total",
          "share",
          "approve"
        ],
        "properties" : {
          "total" : {
            "description" : "The orders the filters give (the caller's, deleted ones never)",
            "type" : "integer",
            "format" : "int32"
          },
          "share" : {
            "description" : "VALIDATED, for batch-share",
            "type" : "integer",
            "format" : "int32"
          },
          "approve" : {
            "description" : "VALIDATED or SHARED, for batch-approve",
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "OrderLineInput" : {
        "title" : "OrderLineInput",
        "description" : "A line of an order. unitPrice: in EUR, excluding VAT, before the discount; discountAmount: a discount of a fixed amount in EUR, excluding VAT (it adds up with discountRate). A line names no stock lot: the lots are chosen when the goods leave (POST …/deliver, POST …/invoice)",
        "type" : "object",
        "required" : [
          "productId",
          "name",
          "quantity",
          "unitPrice",
          "vatRate"
        ],
        "properties" : {
          "productId" : {
            "description" : "The catalog product it orders (product_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "The product's reference as printed",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate in percent, a decimal string from 0 to 100: \"20\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "A discount in percent, a decimal string from 0 to 100",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "discountReason" : {
            "description" : "Why the line is discounted, printed with it",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to; absent for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderLineResource" : {
        "title" : "OrderLineResource",
        "description" : "An order line. unitPrice: excluding VAT, before the discount; discountAmount: a discount of a fixed amount, or null (discountRate and discountAmount add up); subtotal: quantity × unitPrice, discounts deducted, excluding VAT; total: the subtotal with its VAT.",
        "type" : "object",
        "required" : [
          "index",
          "productId",
          "number",
          "name",
          "description",
          "quantity",
          "unitPrice",
          "vatRate",
          "discountRate",
          "discountAmount",
          "discountReason",
          "subtotal",
          "total",
          "accountingNumber"
        ],
        "properties" : {
          "index" : {
            "description" : "The line's position in the order, from 0",
            "type" : "integer",
            "format" : "int32"
          },
          "productId" : {
            "description" : "The catalog product it orders (product_<uuid>), or null for a line without a product",
            "type" : [
              "string",
              "null"
            ]
          },
          "number" : {
            "description" : "The product's reference as printed, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent: \"20\", \"5.5\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "The line's discount in percent, a decimal string, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "discountReason" : {
            "description" : "Why the line is discounted, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to (706000…), or null for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderLotInput" : {
        "title" : "OrderLotInput",
        "description" : "A stock lot the goods of an order line leave from",
        "type" : "object",
        "required" : [
          "lineIndex",
          "quantity"
        ],
        "properties" : {
          "lineIndex" : {
            "description" : "The order line it serves (its index; one the order does not have: 422)",
            "type" : "integer",
            "format" : "int32"
          },
          "stockId" : {
            "description" : "The stock they leave (stock_<uuid>, one of the stocks GET …/stock-availability offers the line: a stock of another product is a 422)",
            "type" : [
              "string",
              "null"
            ]
          },
          "lotNumber" : {
            "description" : "The lot's number (its traceability code), as GET …/stock-availability gives it",
            "type" : [
              "string",
              "null"
            ]
          },
          "origin" : {
            "description" : "Where the goods come from, printed with the line",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity leaving this lot, a decimal string above zero; the lots of a line add up to at most its quantity (on an invoice, exactly it, a single lot included)",
            "type" : "string"
          },
          "useByDays" : {
            "description" : "The days until the « date limite de consommation » (DLC) printed with the line",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "consumeBeforeDays" : {
            "description" : "The days until the « date de consommation recommandée » (DCR) printed with the line",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "bestBeforeDays" : {
            "description" : "The days until the « date de durabilité minimale » (DDM) printed with the line",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "OrderNeighbors" : {
        "title" : "OrderNeighbors",
        "description" : "An order's place in the order list: previous, the order right before it, and next, the one right after it; each null at an end of the list, both null when the filters leave the order out of it",
        "type" : "object",
        "required" : [
          "previous",
          "next"
        ],
        "properties" : {
          "previous" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/OrderSummary"
              },
              {
                "type" : "null"
              }
            ]
          },
          "next" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/OrderSummary"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "OrderResource" : {
        "title" : "OrderResource",
        "description" : "An order. It is born VALIDATED, with its number: there is no draft. subtotal: the lines' subtotals (excluding VAT, discounts deducted); vat: the VAT; total: what the order amounts to. company: the customer as the order froze it.",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "status",
          "companyId",
          "company",
          "issueDate",
          "delivery",
          "description",
          "lines",
          "subtotal",
          "vat",
          "total",
          "quotationIds",
          "deliveryNoteIds",
          "invoiceIds",
          "settled",
          "tags",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The order's id (order_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"order\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number in the organization's sequence (\"42\"), given at its creation",
            "type" : "string"
          },
          "status" : {
            "description" : "VALIDATED (taken, not marked shared yet), SHARED (the customer has it), APPROVED (confirmed), WAITING_FOR_DELIVERY (prepared), DELIVERED (a delivery note was made from it), INVOICED (billed, or settled on its deposits), CANCELED, ORDERED (older orders only). An open enum: tolerate a value you do not know. A deleted order is never returned (404)",
            "type" : "string",
            "enum" : [
              "APPROVED",
              "CANCELED",
              "INVOICED",
              "SHARED",
              "ORDERED",
              "DELIVERED",
              "VALIDATED",
              "WAITING_FOR_DELIVERY"
            ]
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "company" : {
            "$ref" : "#/components/schemas/OrderCompanySnapshot"
          },
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD)",
            "type" : "string",
            "format" : "date"
          },
          "delivery" : {
            "$ref" : "#/components/schemas/OrderDelivery"
          },
          "description" : {
            "description" : "A description printed on it, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderLineResource"
            }
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vat" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "quotationIds" : {
            "description" : "The quotations it was made from (quotation_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "deliveryNoteIds" : {
            "description" : "The delivery notes made from it (deliveryNote_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "invoiceIds" : {
            "description" : "The invoices made from it, deposit and final invoices included (invoice_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "settled" : {
            "description" : "true once closed on its deposits (« Solder la commande »): INVOICED, without a final invoice",
            "type" : "boolean"
          },
          "tags" : {
            "description" : "Its own tags, sorted",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "description" : "When it was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When it, its lines, its status or its tags last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "OrderResourceList" : {
        "title" : "OrderResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page; totalCount when includeTotal=true was sent",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "totalCount" : {
            "description" : "The number of orders of the whole list, every page, with the same filters (cursor and limit aside); only when includeTotal=true was sent",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int64"
          }
        }
      },
      "OrderStatusChange" : {
        "title" : "OrderStatusChange",
        "description" : "One status an order went through. author: the person or the organization key's robot that set it, or null when Myle did (its creation, the Boutique)",
        "type" : "object",
        "required" : [
          "status",
          "changedAt",
          "author"
        ],
        "properties" : {
          "status" : {
            "description" : "The status it took (see the order's)",
            "type" : "string"
          },
          "changedAt" : {
            "description" : "When it took it (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "author" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Author"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "OrderStatusChangeList" : {
        "title" : "OrderStatusChangeList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderStatusChange"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderSummary" : {
        "title" : "OrderSummary",
        "description" : "An order, in short: enough to name it and to fetch it",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "number",
          "status",
          "companyName"
        ],
        "properties" : {
          "id" : {
            "description" : "The order's id (order_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"order\"",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number",
            "type" : "string"
          },
          "status" : {
            "description" : "Its status (see the order's)",
            "type" : "string"
          },
          "companyName" : {
            "description" : "The customer's name as the order froze it",
            "type" : "string"
          }
        }
      },
      "OrderTag" : {
        "title" : "OrderTag",
        "description" : "A tag, as orders carry it",
        "type" : "string"
      },
      "OrderTagList" : {
        "title" : "OrderTagList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderTag"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "OrganizationResource" : {
        "title" : "OrganizationResource",
        "description" : "An organization: a farm, a company, an association using Myle",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "name",
          "siren",
          "vatNumber",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The organization's id (organization_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"organization\"",
            "type" : "string"
          },
          "name" : {
            "description" : "The organization's name",
            "type" : "string"
          },
          "siren" : {
            "description" : "Its SIREN (French company number), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its intra-community VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "createdAt" : {
            "description" : "When the organization was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When the organization was last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "OutgoingEinvoiceFailureResource" : {
        "title" : "OutgoingEinvoiceFailureResource",
        "description" : "A submission that failed and waits for an action: the invoice (its total, or null), the failure read (or null)",
        "type" : "object",
        "required" : [
          "object",
          "invoiceId",
          "invoiceNumber",
          "invoiceStatus",
          "companyId",
          "companyName",
          "total",
          "status",
          "failure",
          "isAutoRetryPending",
          "isMailAllowed",
          "isDismissible",
          "failedAt"
        ],
        "properties" : {
          "object" : {
            "description" : "outgoingEinvoiceFailure",
            "type" : "string"
          },
          "invoiceId" : {
            "description" : "The invoice (invoice_<uuid>)",
            "type" : [
              "string",
              "null"
            ]
          },
          "invoiceNumber" : {
            "description" : "Its number, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "invoiceStatus" : {
            "description" : "The invoice's status (VALIDATED, UNPAID…), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "companyName" : {
            "description" : "The customer's name, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "total" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "status" : {
            "description" : "SUBMISSION_FAILED or REJECTED",
            "type" : "string"
          },
          "failure" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/EinvoiceFailureResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "isAutoRetryPending" : {
            "description" : "An automatic retry is about to submit it again",
            "type" : "boolean"
          },
          "isMailAllowed" : {
            "description" : "The e-mail is open again: the PDF may go as on a customer off the network",
            "type" : "boolean"
          },
          "isDismissible" : {
            "description" : "The caller may dismiss it (the invoice reached the customer off the network)",
            "type" : "boolean"
          },
          "failedAt" : {
            "description" : "When it failed",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "OutgoingEinvoiceFailureResourceList" : {
        "title" : "OutgoingEinvoiceFailureResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OutgoingEinvoiceFailureResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "PaymentResource" : {
        "title" : "PaymentResource",
        "description" : "A payment recorded on an invoice. amount: what was paid, in EUR (on a credit note, what was refunded).",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "invoiceId",
          "amount",
          "method",
          "methodLabel",
          "paidAt",
          "reference",
          "createdAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The payment's id (payment_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"payment\"",
            "type" : "string"
          },
          "invoiceId" : {
            "description" : "The invoice it pays (invoice_<uuid>)",
            "type" : "string"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          },
          "method" : {
            "description" : "How it was paid: CASH, CHECK, TRANSFER, CARD, SEPA_DIRECT_DEBIT, PAYPAL, OTHER. An open enum: tolerate a value you do not know",
            "type" : "string",
            "enum" : [
              "CASH",
              "CHECK",
              "TRANSFER",
              "CARD",
              "SEPA_DIRECT_DEBIT",
              "PAYPAL",
              "OTHER"
            ]
          },
          "methodLabel" : {
            "description" : "The organization's own name for the method (« Lydia »), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "paidAt" : {
            "description" : "When it was paid (YYYY-MM-DD), or null when not said",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "reference" : {
            "description" : "Its reference (a cheque number, a transfer's label), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "createdAt" : {
            "description" : "When it was recorded (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "PaymentResourceList" : {
        "title" : "PaymentResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PaymentResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "PaymentStatusResource" : {
        "title" : "PaymentStatusResource",
        "description" : "An invoice's payment status. total: what it asks (incl. VAT); paid: what its payments add up to; amountDue: what remains; lastDebit: its last SEPA debit, null when none was started (EUR).",
        "type" : "object",
        "required" : [
          "object",
          "invoiceId",
          "status",
          "statusChangedAt",
          "failureCode",
          "failureMessage",
          "total",
          "paid",
          "amountDue",
          "payments",
          "lastDebit"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"paymentStatus\"",
            "type" : "string"
          },
          "invoiceId" : {
            "description" : "The invoice (invoice_<uuid>)",
            "type" : "string"
          },
          "status" : {
            "description" : "The invoice's status (UNPAID, SEPA_PENDING while a debit is on its way, PAID, SEPA_FAILED, SEPA_DISPUTED…), as the invoice's own status says it; an open enum",
            "type" : "string"
          },
          "statusChangedAt" : {
            "description" : "When it moved to that status (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "failureCode" : {
            "description" : "Why the last debit failed or was disputed: the bank's code (a SEPA reason), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "failureMessage" : {
            "description" : "The bank's explanation, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "paid" : {
            "$ref" : "#/components/schemas/Money"
          },
          "amountDue" : {
            "$ref" : "#/components/schemas/Money"
          },
          "payments" : {
            "description" : "The payments recorded on the invoice, newest first (a debit appears here once Stripe settled it)",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PaymentResource"
            }
          },
          "lastDebit" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/DebitFeeResource"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "PaymentsAccountResource" : {
        "title" : "PaymentsAccountResource",
        "description" : "The organization's Stripe Connect account. collection: the collection's state, null when no account is connected.",
        "type" : "object",
        "required" : [
          "object",
          "isConnected",
          "chargesEnabled",
          "payoutsEnabled",
          "detailsSubmitted",
          "collection",
          "closedAt"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"paymentsAccount\"",
            "type" : "string"
          },
          "isConnected" : {
            "description" : "A Stripe account is connected to the organization",
            "type" : "boolean"
          },
          "chargesEnabled" : {
            "description" : "Stripe lets the account take payments; null when none is connected",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "payoutsEnabled" : {
            "description" : "Stripe pays the account out to its bank; null when none is connected",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "detailsSubmitted" : {
            "description" : "The onboarding's details were all given to Stripe; null when none is connected",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "collection" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/PaymentsCollectionResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "closedAt" : {
            "description" : "When Stripe closed the account for want of a subscription (connect again), else null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "PaymentsCollectionResource" : {
        "title" : "PaymentsCollectionResource",
        "description" : "The collection of an organization whose Stripe account is connected",
        "type" : "object",
        "required" : [
          "isDisabled",
          "disabledAt",
          "isPaused",
          "pauseReason",
          "pausesAt"
        ],
        "properties" : {
          "isDisabled" : {
            "description" : "The organization turned its Stripe collection off (its payment settings): nothing is debited",
            "type" : "boolean"
          },
          "disabledAt" : {
            "description" : "When it turned it off (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "isPaused" : {
            "description" : "The collection is paused because the organization no longer pays for Myle",
            "type" : "boolean"
          },
          "pauseReason" : {
            "description" : "Why it is paused: NO_SUBSCRIPTION, PAYMENT_OVERDUE (an open enum), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "pausesAt" : {
            "description" : "While a payment of Myle is overdue but within its grace period: when the pause starts, else null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "PostalAddressGeocodeResource" : {
        "title" : "PostalAddressGeocodeResource",
        "description" : "Where it was located, for the routes",
        "type" : "object",
        "required" : [
          "status",
          "latitude",
          "longitude",
          "geocodedAt"
        ],
        "properties" : {
          "status" : {
            "description" : "EXACT (the house number), STREET, CITY (the city's center only: too rough for a route), FAILED (the geocoder knows no such address: correct it), PENDING (not located yet: it will be). An open enum: tolerate a value you do not know",
            "type" : "string"
          },
          "latitude" : {
            "description" : "Its latitude (WGS 84), or null",
            "type" : [
              "number",
              "null"
            ],
            "format" : "double"
          },
          "longitude" : {
            "description" : "Its longitude (WGS 84), or null",
            "type" : [
              "number",
              "null"
            ],
            "format" : "double"
          },
          "geocodedAt" : {
            "description" : "When it was located (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          }
        }
      },
      "PostalAddressResource" : {
        "title" : "PostalAddressResource",
        "description" : "A postal address of a company. openingHours: its own opening hours, the days with hours, Monday first (the company's shape), [] for none; null when it has none of its own and the company's apply (a delivery reads its address's hours, else its company's).",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "label",
          "recipientLine",
          "line1",
          "postalCode",
          "city",
          "siret",
          "deliveryInstructions",
          "openingHours",
          "geocode"
        ],
        "properties" : {
          "id" : {
            "description" : "The address's id (postalAddress_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"postalAddress\"",
            "type" : "string"
          },
          "label" : {
            "description" : "Its internal name (« Siège », « Hangar »), never printed on a document, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "recipientLine" : {
            "description" : "The line printed above the street when the recipient is not simply the company, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "line1" : {
            "description" : "The street, as entered (it may hold several lines)",
            "type" : "string"
          },
          "postalCode" : {
            "description" : "The postal code, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "city" : {
            "description" : "The city, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siret" : {
            "description" : "The SIRET of the establishment at this address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "deliveryInstructions" : {
            "description" : "What whoever delivers there needs to know (a door code, where to leave the goods), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "openingHours" : {
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          },
          "geocode" : {
            "$ref" : "#/components/schemas/PostalAddressGeocodeResource"
          }
        }
      },
      "ProductNeighbors" : {
        "title" : "ProductNeighbors",
        "description" : "A product's place in the product list: previous, the product right before it, and next, the product right after it; each null at an end of the list, both null when the filters leave the product out of it",
        "type" : "object",
        "required" : [
          "previous",
          "next"
        ],
        "properties" : {
          "previous" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ProductSummary"
              },
              {
                "type" : "null"
              }
            ]
          },
          "next" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ProductSummary"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "ProductResource" : {
        "title" : "ProductResource",
        "description" : "A product or a service of the organization's catalog. unitPrice: its unit price excluding VAT, up to 4 decimals, or null when the catalog gives none; costPrice: its purchase price excluding VAT (set by a supplier catalog import), or null; createdBy: who created it, a person or an organization key's robot, or null when that is not known; shelfLife: the dates its goods carry (DLC, DCR, DDM).",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "name",
          "status",
          "unitPrice",
          "costPrice",
          "vatRate",
          "accountingNumber",
          "barcodes",
          "tags",
          "createdAt",
          "updatedAt",
          "createdBy",
          "origins",
          "shelfLife",
          "weightGrams",
          "volumeMilliliters",
          "marginCoefficient",
          "importSupplier"
        ],
        "properties" : {
          "id" : {
            "description" : "The product's id (product_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"product\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "The product's reference in the catalog, unique among the organization's products (A0012)",
            "type" : "string"
          },
          "name" : {
            "description" : "The product's name",
            "type" : "string"
          },
          "status" : {
            "description" : "ACTIVE. An open enum: tolerate a value you do not know. A deleted product is never returned (404)",
            "type" : "string",
            "enum" : [
              "ACTIVE"
            ]
          },
          "unitPrice" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "costPrice" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent: \"20\", \"5.5\"",
            "type" : "string"
          },
          "accountingNumber" : {
            "description" : "The accounting account sales of this product are booked to (706000…), or null for the default",
            "type" : [
              "string",
              "null"
            ]
          },
          "barcodes" : {
            "description" : "The product's barcodes, its main one first",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/BarcodeResource"
            }
          },
          "tags" : {
            "description" : "The product's tags, sorted",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "description" : "When the product was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When the product last changed (RFC 3339, UTC), its barcodes included",
            "type" : "string",
            "format" : "date-time"
          },
          "createdBy" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Author"
              },
              {
                "type" : "null"
              }
            ]
          },
          "origins" : {
            "description" : "Where the product comes from, as its labels say (« France », « Bretagne »), in their order",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "shelfLife" : {
            "$ref" : "#/components/schemas/ShelfLife"
          },
          "weightGrams" : {
            "description" : "The weight of one unit, in grams (an integer), or null when not known; a tour's load adds it up",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "volumeMilliliters" : {
            "description" : "The volume of one unit, in milliliters (an integer), or null when not known; a tour's load adds it up",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "marginCoefficient" : {
            "description" : "The coefficient its unit price was derived from its cost price with (unitPrice = costPrice × coefficient), a decimal string (\"1.35\"), set by a supplier catalog import; null otherwise. Read-only",
            "type" : [
              "string",
              "null"
            ]
          },
          "importSupplier" : {
            "description" : "The supplier catalog it was imported from, a key of Myle's import profiles (pointp…); null for a product created otherwise. Read-only",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ProductResourceList" : {
        "title" : "ProductResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page; totalCount when includeTotal=true was sent",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ProductResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "totalCount" : {
            "description" : "The number of products of the whole list, every page, with the same filters (cursor and limit aside); only when includeTotal=true was sent",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int64"
          }
        }
      },
      "ProductSummary" : {
        "title" : "ProductSummary",
        "description" : "A product, in short: enough to name it and to fetch it",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "number",
          "name"
        ],
        "properties" : {
          "id" : {
            "description" : "The product's id (product_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"product\"",
            "type" : "string"
          },
          "number" : {
            "description" : "The product's reference in the catalog",
            "type" : "string"
          },
          "name" : {
            "description" : "The product's name",
            "type" : "string"
          }
        }
      },
      "PublicSectorCustomers" : {
        "title" : "PublicSectorCustomers",
        "description" : "Public bodies among the customers of the drafts: validating mails them the original (Chorus Pro)",
        "type" : "object",
        "required" : [
          "count",
          "names"
        ],
        "properties" : {
          "count" : {
            "description" : "How many customers are public bodies (tag E-FACT:CHORUS)",
            "type" : "integer",
            "format" : "int32"
          },
          "names" : {
            "description" : "Their names, sorted, 5 at most (count is not capped)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "QuotationBatchIds" : {
        "title" : "QuotationBatchIds",
        "description" : "The quotations a batch acts on",
        "type" : "object",
        "required" : [
          "ids"
        ],
        "properties" : {
          "ids" : {
            "description" : "Their ids (quotation_<uuid>), at least one; each quotation is answered once, at its first place in the order sent",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "QuotationCompanySnapshot" : {
        "title" : "QuotationCompanySnapshot",
        "description" : "The customer as the quotation froze it at its creation (or when its customer changed): what the PDF prints, whatever the company became since",
        "type" : "object",
        "required" : [
          "name",
          "address",
          "billingAddress",
          "headquartersAddress",
          "siren",
          "vatNumber"
        ],
        "properties" : {
          "name" : {
            "description" : "The customer's legal name",
            "type" : "string"
          },
          "address" : {
            "description" : "The address the quotation is addressed to",
            "type" : "string"
          },
          "billingAddress" : {
            "description" : "Its billing address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "headquartersAddress" : {
            "description" : "Its headquarters address, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "Its SIREN, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "Its VAT number, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "QuotationEditability" : {
        "title" : "QuotationEditability",
        "description" : "Whether a quotation's lines, customer and description can still be changed: editable, or reason says why not",
        "type" : "object",
        "required" : [
          "editable",
          "reason"
        ],
        "properties" : {
          "editable" : {
            "description" : "true while it is VALIDATED and has not left the organization (no mail, link, online read, share)",
            "type" : "boolean"
          },
          "reason" : {
            "description" : "Why it cannot, or null: NOT_DRAFT (no longer VALIDATED), MAILED, SHARE_LINK, PUBLIC_ACCESS (read online), SHARED (marked shared once), CONVERTED (an order or an invoice was made from it). An open list",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "QuotationEligibility" : {
        "title" : "QuotationEligibility",
        "description" : "What each batch would act on among the quotations the filters give: the counts the web app shows on its batch buttons",
        "type" : "object",
        "required" : [
          "total",
          "share",
          "approve",
          "order"
        ],
        "properties" : {
          "total" : {
            "description" : "The quotations the filters give (the caller's, deleted ones never)",
            "type" : "integer",
            "format" : "int32"
          },
          "share" : {
            "description" : "VALIDATED, for batch-share",
            "type" : "integer",
            "format" : "int32"
          },
          "approve" : {
            "description" : "SHARED, for batch-approve",
            "type" : "integer",
            "format" : "int32"
          },
          "order" : {
            "description" : "APPROVED, for batch-order",
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "QuotationLineInput" : {
        "title" : "QuotationLineInput",
        "description" : "A line of a quotation. unitPrice: in EUR, excluding VAT, before the discount; discountAmount: a discount of a fixed amount in EUR, excluding VAT (it adds up with discountRate)",
        "type" : "object",
        "required" : [
          "productId",
          "name",
          "quantity",
          "unitPrice",
          "vatRate"
        ],
        "properties" : {
          "productId" : {
            "description" : "The catalog product it offers (product_<uuid>): a quotation's lines all name one",
            "type" : "string"
          },
          "number" : {
            "description" : "The product's reference as printed",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate in percent, a decimal string from 0 to 100: \"20\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "A discount in percent, a decimal string from 0 to 100",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "discountReason" : {
            "description" : "Why the line is discounted, printed with it",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to; absent for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "QuotationLineResource" : {
        "title" : "QuotationLineResource",
        "description" : "A quotation line. unitPrice: excluding VAT, before the discount; discountAmount: a discount of a fixed amount, or null (discountRate and discountAmount add up); subtotal: quantity × unitPrice, discounts deducted, excluding VAT; total: the subtotal with its VAT.",
        "type" : "object",
        "required" : [
          "index",
          "productId",
          "number",
          "name",
          "description",
          "quantity",
          "unitPrice",
          "vatRate",
          "discountRate",
          "discountAmount",
          "discountReason",
          "subtotal",
          "total",
          "accountingNumber"
        ],
        "properties" : {
          "index" : {
            "description" : "The line's position in the quotation, from 0",
            "type" : "integer",
            "format" : "int32"
          },
          "productId" : {
            "description" : "The catalog product it offers (product_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "The product's reference as printed, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "The line's label",
            "type" : "string"
          },
          "description" : {
            "description" : "A longer description printed under the label, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "quantity" : {
            "description" : "The quantity, a decimal string: \"12.5\"",
            "type" : "string"
          },
          "unitPrice" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vatRate" : {
            "description" : "The VAT rate, a decimal string in percent: \"20\", \"5.5\"",
            "type" : "string"
          },
          "discountRate" : {
            "description" : "The line's discount in percent, a decimal string, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountAmount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "discountReason" : {
            "description" : "Why the line is discounted, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "accountingNumber" : {
            "description" : "The accounting account the line is booked to (706000…), or null for the default",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "QuotationNeighbors" : {
        "title" : "QuotationNeighbors",
        "description" : "A quotation's place in the quotation list: previous, the quotation right before it, and next, the one right after it; each null at an end of the list, both null when the filters leave the quotation out of it",
        "type" : "object",
        "required" : [
          "previous",
          "next"
        ],
        "properties" : {
          "previous" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/QuotationSummary"
              },
              {
                "type" : "null"
              }
            ]
          },
          "next" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/QuotationSummary"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "QuotationResource" : {
        "title" : "QuotationResource",
        "description" : "A quotation. It is born VALIDATED, with its number: there is no draft. subtotal: the lines' subtotals (excluding VAT, discounts deducted); vat: the VAT; total: what the quotation amounts to. company: the customer as the quotation froze it.",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "organizationId",
          "number",
          "status",
          "companyId",
          "company",
          "issueDate",
          "expiryDate",
          "workStartDate",
          "workEndDate",
          "description",
          "lines",
          "subtotal",
          "vat",
          "total",
          "orderIds",
          "invoiceIds",
          "tags",
          "createdAt",
          "updatedAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The quotation's id (quotation_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"quotation\"",
            "type" : "string"
          },
          "organizationId" : {
            "description" : "The organization it belongs to (organization_<uuid>)",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number in the organization's sequence (\"4101\"), given at its creation",
            "type" : "string"
          },
          "status" : {
            "description" : "VALIDATED (issued, not marked shared yet), SHARED (the customer has it), APPROVED (accepted), CANCELED (refused or withdrawn), EXPIRED (its validity passed while it waited), ORDERED (an order was made from it), INVOICED (billed). An open enum: tolerate a value you do not know. A deleted quotation is never returned (404)",
            "type" : "string",
            "enum" : [
              "APPROVED",
              "CANCELED",
              "INVOICED",
              "SHARED",
              "ORDERED",
              "EXPIRED",
              "VALIDATED"
            ]
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "company" : {
            "$ref" : "#/components/schemas/QuotationCompanySnapshot"
          },
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD)",
            "type" : "string",
            "format" : "date"
          },
          "expiryDate" : {
            "description" : "The last day it is valid (YYYY-MM-DD): the day after, a quotation still waiting becomes EXPIRED",
            "type" : "string",
            "format" : "date"
          },
          "workStartDate" : {
            "description" : "When the work it offers starts (YYYY-MM-DD), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "workEndDate" : {
            "description" : "When the work it offers ends (YYYY-MM-DD), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "description" : {
            "description" : "A description printed on it, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "lines" : {
            "description" : "Its lines, in order",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/QuotationLineResource"
            }
          },
          "subtotal" : {
            "$ref" : "#/components/schemas/Money"
          },
          "vat" : {
            "$ref" : "#/components/schemas/Money"
          },
          "total" : {
            "$ref" : "#/components/schemas/Money"
          },
          "orderIds" : {
            "description" : "The orders made from it (order_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "invoiceIds" : {
            "description" : "The invoices made from it (invoice_<uuid>)",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "tags" : {
            "description" : "Its own tags, sorted",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "description" : "When it was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "updatedAt" : {
            "description" : "When it, its lines, its status or its tags last changed (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "QuotationResourceList" : {
        "title" : "QuotationResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page; totalCount when includeTotal=true was sent",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/QuotationResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          },
          "totalCount" : {
            "description" : "The number of quotations of the whole list, every page, with the same filters (cursor and limit aside); only when includeTotal=true was sent",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int64"
          }
        }
      },
      "QuotationStatusChange" : {
        "title" : "QuotationStatusChange",
        "description" : "One status a quotation went through. author: the person or the organization key's robot that set it, or null when Myle did (its creation, the customer's answer on the public page, the validity passing)",
        "type" : "object",
        "required" : [
          "status",
          "changedAt",
          "author"
        ],
        "properties" : {
          "status" : {
            "description" : "The status it took (see the quotation's)",
            "type" : "string"
          },
          "changedAt" : {
            "description" : "When it took it (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          },
          "author" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Author"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "QuotationStatusChangeList" : {
        "title" : "QuotationStatusChangeList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/QuotationStatusChange"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "QuotationSummary" : {
        "title" : "QuotationSummary",
        "description" : "A quotation, in short: enough to name it and to fetch it",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "number",
          "status",
          "companyName"
        ],
        "properties" : {
          "id" : {
            "description" : "The quotation's id (quotation_<uuid>)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"quotation\"",
            "type" : "string"
          },
          "number" : {
            "description" : "Its number",
            "type" : "string"
          },
          "status" : {
            "description" : "Its status (see the quotation's)",
            "type" : "string"
          },
          "companyName" : {
            "description" : "The customer's name as the quotation froze it",
            "type" : "string"
          }
        }
      },
      "QuotationTag" : {
        "title" : "QuotationTag",
        "description" : "A tag, as quotations carry it",
        "type" : "string"
      },
      "QuotationTagList" : {
        "title" : "QuotationTagList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/QuotationTag"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "RefuseIncomingEinvoice" : {
        "title" : "RefuseIncomingEinvoice",
        "description" : "A refusal: an AFNOR reason code (MDT-113) sent to the supplier, and an optional note kept in Myle",
        "type" : "object",
        "properties" : {
          "reasonCode" : {
            "description" : "The reason, an AFNOR code of the refusal list (MDT-113): sent to the supplier through the platform",
            "type" : [
              "string",
              "null"
            ]
          },
          "note" : {
            "description" : "What you write: kept in Myle's history, not sent",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "ReplaceOnlinePaymentSetting" : {
        "title" : "ReplaceOnlinePaymentSetting",
        "description" : "The online payment of invoices, on or off",
        "type" : "object",
        "required" : [
          "isEnabled"
        ],
        "properties" : {
          "isEnabled" : {
            "description" : "On (true) or off (false)",
            "type" : "boolean"
          }
        }
      },
      "ReplaceRoutingAddress" : {
        "title" : "ReplaceRoutingAddress",
        "description" : "The address to retain: one the directory publishes, or null to return to the automatic resolution",
        "type" : "object",
        "properties" : {
          "identifier" : {
            "description" : "An address the directory publishes for the SIREN, or null for the automatic resolution",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "RightResource" : {
        "title" : "RightResource",
        "description" : "A right of the Myle permission model, which a member or an API key holds in an organization",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "category",
          "label",
          "critical",
          "module"
        ],
        "properties" : {
          "id" : {
            "description" : "The right's name, as API keys and endpoints name it (INVOICES_LIST)",
            "type" : "string"
          },
          "object" : {
            "description" : "Always \"right\"",
            "type" : "string"
          },
          "category" : {
            "description" : "The family of rights it belongs to (INVOICES, COMPANIES…)",
            "type" : "string"
          },
          "label" : {
            "$ref" : "#/components/schemas/LocalizedText"
          },
          "critical" : {
            "description" : "Whether it is a sensitive right (members, money, deletion…)",
            "type" : "boolean"
          },
          "module" : {
            "description" : "The organization module it belongs to, which the plan must carry, or null",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "RightResourceList" : {
        "title" : "RightResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RightResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "RoutingCandidateResource" : {
        "title" : "RoutingCandidateResource",
        "description" : "An electronic address the directory publishes for the SIREN",
        "type" : "object",
        "required" : [
          "identifier",
          "isActive",
          "isReachable",
          "siret",
          "serviceCode",
          "label",
          "isSuggested",
          "isSelected"
        ],
        "properties" : {
          "identifier" : {
            "description" : "The address: 0225:<SIREN>, 0225:<SIREN>_<SIRET>, 0225:<SIREN>_<SIRET>_<SERVICE>…",
            "type" : "string"
          },
          "isActive" : {
            "description" : "Active in the directory",
            "type" : "boolean"
          },
          "isReachable" : {
            "description" : "Registered on the network, or null when unknown",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "siret" : {
            "description" : "The establishment's SIRET the address names, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "serviceCode" : {
            "description" : "The service code the address names (DAF, FACTURES_PUBLIQUES…), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "label" : {
            "description" : "A readable label (the establishment, the service), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "isSuggested" : {
            "description" : "The address to propose first",
            "type" : "boolean"
          },
          "isSelected" : {
            "description" : "The address retained now",
            "type" : "boolean"
          }
        }
      },
      "SendInvoice" : {
        "title" : "SendInvoice",
        "description" : "Who to send the invoice to: ids of its customer's e-mail addresses (companyEmailAddress_<uuid>, the company's emailAddresses), never a free address",
        "type" : "object",
        "required" : [
          "to"
        ],
        "properties" : {
          "to" : {
            "description" : "The recipients, at least one: ids of the customer's e-mail addresses",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "SendOrder" : {
        "title" : "SendOrder",
        "description" : "Who to send the order to: ids of its customer's e-mail addresses (companyEmailAddress_<uuid>, the company's emailAddresses), never a free address",
        "type" : "object",
        "required" : [
          "to"
        ],
        "properties" : {
          "to" : {
            "description" : "The recipients, at least one: ids of the customer's e-mail addresses",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "SendQuotation" : {
        "title" : "SendQuotation",
        "description" : "Who to send the quotation to: ids of its customer's e-mail addresses (companyEmailAddress_<uuid>, the company's emailAddresses), never a free address",
        "type" : "object",
        "required" : [
          "to"
        ],
        "properties" : {
          "to" : {
            "description" : "The recipients, at least one: ids of the customer's e-mail addresses",
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "SepaBankAccountResource" : {
        "title" : "SepaBankAccountResource",
        "description" : "The bank account a mandate debits",
        "type" : "object",
        "required" : [
          "last4",
          "bankCode",
          "country"
        ],
        "properties" : {
          "last4" : {
            "description" : "The IBAN's last four digits",
            "type" : "string"
          },
          "bankCode" : {
            "description" : "The bank's code",
            "type" : "string"
          },
          "country" : {
            "description" : "The bank's country (FR)",
            "type" : "string"
          }
        }
      },
      "SepaFeeRates" : {
        "title" : "SepaFeeRates",
        "description" : "What a debit costs, in EUR: stripeFee (Stripe's, per debit), myleFixedFee plus the percentage of the amount, at most myleMaxFee (Myle's, VAT included).",
        "type" : "object",
        "required" : [
          "stripeFee",
          "myleFixedFee",
          "myleVariablePercentage",
          "myleMaxFee",
          "myleVatRate"
        ],
        "properties" : {
          "stripeFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "myleFixedFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "myleVariablePercentage" : {
            "description" : "Myle's commission on the amount debited, in percent (\"0.3\"), added to its fixed part",
            "type" : "string"
          },
          "myleMaxFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "myleVatRate" : {
            "description" : "The VAT rate Myle's commission includes, in percent (\"20\")",
            "type" : "string"
          }
        }
      },
      "SepaFeeResource" : {
        "title" : "SepaFeeResource",
        "description" : "The fee of one SEPA debit. amount: what was debited; fee: everything withheld (stripeFee, Stripe's, plus myleFee, Myle's commission incl. VAT); all in EUR.",
        "type" : "object",
        "required" : [
          "object",
          "invoiceId",
          "kind",
          "amount",
          "fee",
          "stripeFee",
          "myleFee",
          "isBilled",
          "billedAt",
          "createdAt"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"sepaFee\"",
            "type" : "string"
          },
          "invoiceId" : {
            "description" : "The invoice debited (invoice_<uuid>)",
            "type" : "string"
          },
          "kind" : {
            "description" : "SEPA_COLLECTION (a debit), STRIPE_DISPUTE_FEE (Stripe's fee on a dispute); an open enum",
            "type" : "string"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          },
          "fee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "stripeFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "myleFee" : {
            "$ref" : "#/components/schemas/Money"
          },
          "isBilled" : {
            "description" : "Myle invoiced its commission (the monthly commission invoice)",
            "type" : "boolean"
          },
          "billedAt" : {
            "description" : "When it was invoiced (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "createdAt" : {
            "description" : "When the debit started (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "SepaFeeResourceList" : {
        "title" : "SepaFeeResourceList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SepaFeeResource"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "SepaMandateInvitationResource" : {
        "title" : "SepaMandateInvitationResource",
        "description" : "An invitation to sign a SEPA mandate",
        "type" : "object",
        "required" : [
          "object",
          "companyId",
          "email",
          "isSent",
          "url",
          "expiresAt"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"sepaMandateInvitation\"",
            "type" : "string"
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "email" : {
            "description" : "The address the invitation is for, which Stripe puts on the mandate",
            "type" : "string"
          },
          "isSent" : {
            "description" : "It was mailed to that address",
            "type" : "boolean"
          },
          "url" : {
            "description" : "The link the customer signs at (single use), to share yourself; null when it was mailed",
            "type" : [
              "string",
              "null"
            ]
          },
          "expiresAt" : {
            "description" : "When the link expires (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "SepaMandateResource" : {
        "title" : "SepaMandateResource",
        "description" : "A customer's SEPA mandate. bankAccount: the account it debits, null when there is none.",
        "type" : "object",
        "required" : [
          "object",
          "companyId",
          "status",
          "reference",
          "mandateUrl",
          "acceptedAt",
          "bankAccount",
          "autoDebit"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"sepaMandate\"",
            "type" : "string"
          },
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "status" : {
            "description" : "ACTIVE: the customer signed a mandate the organization may debit; NONE: none (an open enum)",
            "type" : "string",
            "enum" : [
              "ACTIVE",
              "NONE"
            ]
          },
          "reference" : {
            "description" : "The mandate's reference, or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "mandateUrl" : {
            "description" : "The mandate's page at Stripe (what the customer signed), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "acceptedAt" : {
            "description" : "When the customer accepted it (RFC 3339, UTC), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date-time"
          },
          "bankAccount" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/SepaBankAccountResource"
              },
              {
                "type" : "null"
              }
            ]
          },
          "autoDebit" : {
            "description" : "The customer's validated invoices are debited automatically (the SEPA:AUTO-PRÉLÈVEMENT tag); changed by PATCH …/companies/{companyId} autoDebit",
            "type" : "boolean"
          }
        }
      },
      "SepaQuotaCompanyUsage" : {
        "title" : "SepaQuotaCompanyUsage",
        "description" : "What one customer was debited. amount: in EUR.",
        "type" : "object",
        "required" : [
          "companyId",
          "count",
          "amount"
        ],
        "properties" : {
          "companyId" : {
            "description" : "The customer (company_<uuid>)",
            "type" : "string"
          },
          "count" : {
            "description" : "How many debits",
            "type" : "integer",
            "format" : "int32"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          }
        }
      },
      "SepaQuotaLimit" : {
        "title" : "SepaQuotaLimit",
        "description" : "A quota. maxAmount: at most this much debited, in EUR.",
        "type" : "object",
        "required" : [
          "maxCount",
          "maxAmount"
        ],
        "properties" : {
          "maxCount" : {
            "description" : "At most this many debits",
            "type" : "integer",
            "format" : "int32"
          },
          "maxAmount" : {
            "$ref" : "#/components/schemas/Money"
          }
        }
      },
      "SepaQuotaResource" : {
        "title" : "SepaQuotaResource",
        "description" : "The organization's SEPA quota. perCompany, perOrganization: the quotas over the window; amount: what the organization was debited over it; minimumDebit, maximumDebit: the bounds of one debit (EUR).",
        "type" : "object",
        "required" : [
          "object",
          "windowDays",
          "perCompany",
          "perOrganization",
          "count",
          "amount",
          "companies",
          "minimumDebit",
          "maximumDebit",
          "blockedReason",
          "fees"
        ],
        "properties" : {
          "object" : {
            "description" : "Always \"sepaQuota\"",
            "type" : "string"
          },
          "windowDays" : {
            "description" : "The rolling window, in days",
            "type" : "integer",
            "format" : "int32"
          },
          "perCompany" : {
            "$ref" : "#/components/schemas/SepaQuotaLimit"
          },
          "perOrganization" : {
            "$ref" : "#/components/schemas/SepaQuotaLimit"
          },
          "count" : {
            "description" : "How many debits the organization made over the window",
            "type" : "integer",
            "format" : "int32"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Money"
          },
          "companies" : {
            "description" : "What each customer was debited over the window",
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SepaQuotaCompanyUsage"
            }
          },
          "minimumDebit" : {
            "$ref" : "#/components/schemas/Money"
          },
          "maximumDebit" : {
            "$ref" : "#/components/schemas/Money"
          },
          "blockedReason" : {
            "description" : "What blocks every debit of the organization, whatever the invoice: DEMO, COLLECTION_PAUSED, PLAN_REQUIRED, NOT_CONNECTED, COLLECTION_DISABLED, ACCOUNT_SUSPENDED (an open enum), or null",
            "type" : [
              "string",
              "null"
            ]
          },
          "fees" : {
            "$ref" : "#/components/schemas/SepaFeeRates"
          }
        }
      },
      "SetCorrectedInvoice" : {
        "title" : "SetCorrectedInvoice",
        "description" : "The invoice a credit note keyed in by hand corrects",
        "type" : "object",
        "required" : [
          "correctsInvoiceId"
        ],
        "properties" : {
          "correctsInvoiceId" : {
            "description" : "The invoice it corrects (invoice_<uuid>): an issued invoice of the same customer, dated no later than the credit note, not cancelled already (GET …/correctable-invoices lists them)",
            "type" : "string"
          }
        }
      },
      "ShelfLife" : {
        "title" : "ShelfLife",
        "description" : "The dates a product's goods carry (French food labelling): useBy, the « date limite de consommation » (DLC); consumeBefore, the « date de consommation recommandée » (DCR); bestBefore, the « date de durabilité minimale » (DDM)",
        "type" : "object",
        "required" : [
          "useBy",
          "consumeBefore",
          "bestBefore"
        ],
        "properties" : {
          "useBy" : {
            "$ref" : "#/components/schemas/ShelfLifeDate"
          },
          "consumeBefore" : {
            "$ref" : "#/components/schemas/ShelfLifeDate"
          },
          "bestBefore" : {
            "$ref" : "#/components/schemas/ShelfLifeDate"
          }
        }
      },
      "ShelfLifeDate" : {
        "title" : "ShelfLifeDate",
        "description" : "One of the dates a product's goods carry: whether the documents' lines give it, and its default delay",
        "type" : "object",
        "required" : [
          "isEnabled",
          "days"
        ],
        "properties" : {
          "isEnabled" : {
            "description" : "Whether the lines of a document (quotation, order, delivery note, invoice) for this product carry this date",
            "type" : "boolean"
          },
          "days" : {
            "description" : "Its default delay in days: the date a line proposes is the document's date plus this many days; null for none",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "ShelfLifeDateInput" : {
        "title" : "ShelfLifeDateInput",
        "description" : "One of a product's shelf-life dates. On a creation, an absent member takes its default (disabled, no delay); on a change (merge patch), an absent member is unchanged",
        "type" : "object",
        "properties" : {
          "isEnabled" : {
            "description" : "Whether the lines of a document for this product carry this date",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "days" : {
            "description" : "Its default delay in days, an integer from 0: the date a line proposes is the document's date plus this many days; null for none",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "ShelfLifeInput" : {
        "title" : "ShelfLifeInput",
        "description" : "The dates a product's goods carry: useBy (DLC), consumeBefore (DCR), bestBefore (DDM). An absent date is unchanged (a change) or disabled without a delay (a creation)",
        "type" : "object",
        "properties" : {
          "useBy" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ShelfLifeDateInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "consumeBefore" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ShelfLifeDateInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "bestBefore" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ShelfLifeDateInput"
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "StartOnboarding" : {
        "title" : "StartOnboarding",
        "description" : "Where Stripe sends the user back once the onboarding is done, and when its link has expired",
        "type" : "object",
        "required" : [
          "returnUrl",
          "refreshUrl"
        ],
        "properties" : {
          "returnUrl" : {
            "description" : "The page Stripe returns to when the user leaves the onboarding (an absolute http(s) URL)",
            "type" : "string"
          },
          "refreshUrl" : {
            "description" : "The page Stripe sends to when the link expired or was used: ask a new link there (http(s) URL)",
            "type" : "string"
          }
        }
      },
      "StockLotResource" : {
        "title" : "StockLotResource",
        "description" : "A lot of a stock that can still give goods",
        "type" : "object",
        "required" : [
          "lotNumber",
          "bestBeforeDate",
          "available",
          "recorded"
        ],
        "properties" : {
          "lotNumber" : {
            "description" : "Its number (traceability code): send it as a lot's lotNumber",
            "type" : "string"
          },
          "bestBeforeDate" : {
            "description" : "The start of its best-before period (YYYY-MM-DD), or null",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "available" : {
            "description" : "What it can still give, a decimal string",
            "type" : "string"
          },
          "recorded" : {
            "description" : "What was recorded into it, a decimal string",
            "type" : "string"
          }
        }
      },
      "Tag" : {
        "title" : "Tag",
        "description" : "A tag, as products carry it",
        "type" : "string"
      },
      "TagList" : {
        "title" : "TagList",
        "description" : "A page of a list: data, and nextCursor unless it is the last page",
        "type" : "object",
        "required" : [
          "data"
        ],
        "properties" : {
          "data" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Tag"
            }
          },
          "nextCursor" : {
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateBarcode" : {
        "title" : "UpdateBarcode",
        "description" : "A merge patch of a barcode (RFC 7396): an absent member is unchanged",
        "type" : "object",
        "properties" : {
          "isPrimary" : {
            "description" : "true: the barcode becomes the product's main one, the previous one stops being. Only true is accepted: a product's main barcode is replaced, never removed",
            "type" : [
              "boolean",
              "null"
            ]
          }
        }
      },
      "UpdateCompany" : {
        "title" : "UpdateCompany",
        "description" : "A merge patch of a company (RFC 7396): an absent member is unchanged. Its e-mail addresses are changed under …/email-addresses, its headquarters and billing addresses are not changed here.",
        "type" : "object",
        "properties" : {
          "number" : {
            "description" : "A new reference, unique among the organization's companies",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "A new name",
            "type" : [
              "string",
              "null"
            ]
          },
          "type" : {
            "description" : "BUSINESS_FR, CONSUMER or FOREIGN; to BUSINESS_FR, the company must have a SIREN or a VAT number",
            "type" : [
              "string",
              "null"
            ]
          },
          "siren" : {
            "description" : "A new SIREN (or SIRET); null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "vatNumber" : {
            "description" : "A new VAT number; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "A new accounting account; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "phone" : {
            "description" : "A new phone number; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountPercentage" : {
            "description" : "A new discount in percent, from 0 to 100; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "discountReason" : {
            "description" : "Why it gets a discount; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "invoicingPeriod" : {
            "description" : "MONTHLY, TEN_DAYS, DAILY or DISABLED; null is DISABLED",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its tags, all of them (managed ones are kept whatever is sent); null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "deliveryAddresses" : {
            "description" : "Its delivery addresses, all of them: one with the id of an address it has changes it, one without an id is added, one it has that is not sent is removed (refused, 409, while something uses it); null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/DeliveryAddressInput"
            }
          },
          "autoDebit" : {
            "description" : "Debit its validated invoices by SEPA automatically (true) or not (false), through its mandate. Needs STRIPE_MANDATES_MANAGE (the other members, COMPANIES_PATCH). Turning it on is refused when the collection is off or paused or the plan lacks SEPA debits, and a session passes the passkey step-up stripe.setAutoDebit (an API key holding the right needs none); turning it off is always possible. Applied before the other members",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "showPricesOnDeliveryNotes" : {
            "description" : "Whether its delivery notes show the prices",
            "type" : [
              "boolean",
              "null"
            ]
          },
          "openingHours" : {
            "description" : "Its opening hours, all of them, one entry per day (a day not sent has none); null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          },
          "places" : {
            "description" : "Its places, all of them; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UpdateCompanyEmailAddress" : {
        "title" : "UpdateCompanyEmailAddress",
        "description" : "A merge patch of an e-mail address of a company (RFC 7396): an absent member is unchanged. The address itself is not changed here (remove it and add the new one); its subscription is given back by …/resubscribe.",
        "type" : "object",
        "properties" : {
          "label" : {
            "description" : "A new label; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "purposes" : {
            "description" : "The documents to send to it automatically, all of them: INVOICE, DELIVERY_NOTE, ORDER, QUOTATION; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UpdateInvoice" : {
        "title" : "UpdateInvoice",
        "description" : "A merge patch of a draft invoice (RFC 7396): an absent member is unchanged. Its lines, customer and description are not changed here yet.",
        "type" : "object",
        "properties" : {
          "tags" : {
            "description" : "Its own tags, all of them; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UpdateOrder" : {
        "title" : "UpdateOrder",
        "description" : "A merge patch of an order (RFC 7396): an absent member is unchanged. Its lines, customer and delivery address: POST …/edit (the description here too, in any status).",
        "type" : "object",
        "properties" : {
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "delivery" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/UpdateOrderDelivery"
              },
              {
                "type" : "null"
              }
            ]
          },
          "description" : {
            "description" : "A description printed on it; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its own tags, all of them; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UpdateOrderDelivery" : {
        "title" : "UpdateOrderDelivery",
        "description" : "A merge patch of an order's delivery: an absent member is unchanged, null clears it. Its address: POST …/edit",
        "type" : "object",
        "properties" : {
          "date" : {
            "description" : "When it is to be delivered (YYYY-MM-DD); null for none",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "preparerId" : {
            "description" : "The member who prepares it (user_<uuid>, robot_<uuid>); null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "delivererId" : {
            "description" : "The member who delivers it (user_<uuid>, robot_<uuid>); null for none",
            "type" : [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateOrganizationApiKey" : {
        "title" : "UpdateOrganizationApiKey",
        "description" : "A merge patch of an organization key (RFC 7396): an absent member is unchanged",
        "type" : "object",
        "properties" : {
          "name" : {
            "description" : "A new name, also given to its robot account",
            "type" : [
              "string",
              "null"
            ]
          },
          "roleId" : {
            "description" : "One of the organization's roles, whose rights you hold all; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "rights" : {
            "description" : "Its direct rights; what you change must be rights you hold; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "tagScope" : {
            "description" : "Its tag scope ({category: [tags]}); null for none (its role's)",
            "anyOf" : [
              {
                
              },
              {
                "type" : "null"
              }
            ]
          }
        }
      },
      "UpdatePostalAddress" : {
        "title" : "UpdatePostalAddress",
        "description" : "A merge patch of a postal address of a company (RFC 7396): an absent member is unchanged, null clears it. A new street, postal code or city locates the address again; openingHours null: none of its own, the company's apply.",
        "type" : "object",
        "properties" : {
          "label" : {
            "description" : "A new internal name, never printed; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "recipientLine" : {
            "description" : "The line printed above the street; null: addressed like the company",
            "type" : [
              "string",
              "null"
            ]
          },
          "line1" : {
            "description" : "The street; never null",
            "type" : [
              "string",
              "null"
            ]
          },
          "postalCode" : {
            "description" : "The postal code; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "city" : {
            "description" : "The city; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "siret" : {
            "description" : "The SIRET of the establishment at this address (14 digits); null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "deliveryInstructions" : {
            "description" : "What whoever delivers there needs to know; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "openingHours" : {
            "description" : "Its own opening hours, the whole week (each day once, its ranges HH:mm to a later HH:mm), [] for none; null: none of its own, the company's apply",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "$ref" : "#/components/schemas/OpeningHoursDay"
            }
          }
        }
      },
      "UpdateProduct" : {
        "title" : "UpdateProduct",
        "description" : "A merge patch of a product (RFC 7396): an absent member is unchanged. unitPrice: a new unit price excluding VAT, in EUR; null for none. shelfLife: the dates its goods carry, merged member by member (an absent date, or an absent member of a date, is unchanged).",
        "type" : "object",
        "properties" : {
          "number" : {
            "description" : "A new reference, unique among the organization's products",
            "type" : [
              "string",
              "null"
            ]
          },
          "name" : {
            "description" : "A new name",
            "type" : [
              "string",
              "null"
            ]
          },
          "unitPrice" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/Money"
              },
              {
                "type" : "null"
              }
            ]
          },
          "vatRate" : {
            "description" : "A new VAT rate in percent, a decimal string from 0 to 100",
            "type" : [
              "string",
              "null"
            ]
          },
          "accountingNumber" : {
            "description" : "A new accounting account; null for the default one",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "The product's tags, all of them; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "origins" : {
            "description" : "The product's origins, all of them, in their order; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "shelfLife" : {
            "anyOf" : [
              {
                "$ref" : "#/components/schemas/ShelfLifeInput"
              },
              {
                "type" : "null"
              }
            ]
          },
          "weightGrams" : {
            "description" : "A new weight of one unit, in grams, an integer from 0; null when not known",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          },
          "volumeMilliliters" : {
            "description" : "A new volume of one unit, in milliliters, an integer from 0; null when not known",
            "type" : [
              "integer",
              "null"
            ],
            "format" : "int32"
          }
        }
      },
      "UpdateQuotation" : {
        "title" : "UpdateQuotation",
        "description" : "A merge patch of a quotation (RFC 7396): an absent member is unchanged. Its lines, customer and description: POST …/edit (the description here too, in any status).",
        "type" : "object",
        "properties" : {
          "issueDate" : {
            "description" : "Its date (YYYY-MM-DD)",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "expiryDate" : {
            "description" : "The last day it is valid (YYYY-MM-DD), on or after issueDate. To reopen an EXPIRED one: …/extend",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "workStartDate" : {
            "description" : "When the work it offers starts (YYYY-MM-DD); null for none",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "workEndDate" : {
            "description" : "When the work it offers ends (YYYY-MM-DD), on or after workStartDate; null for none",
            "type" : [
              "string",
              "null"
            ],
            "format" : "date"
          },
          "description" : {
            "description" : "A description printed on it; null for none",
            "type" : [
              "string",
              "null"
            ]
          },
          "tags" : {
            "description" : "Its own tags, all of them; null for none",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UpdateUserApiKey" : {
        "title" : "UpdateUserApiKey",
        "description" : "A merge patch of a user key (RFC 7396): an absent member is unchanged",
        "type" : "object",
        "properties" : {
          "name" : {
            "description" : "A new name",
            "type" : [
              "string",
              "null"
            ]
          },
          "organizationIds" : {
            "description" : "The organizations it may act in, among yours; null for all of them",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          },
          "rights" : {
            "description" : "The rights it is narrowed to, never beyond yours; null for all of yours",
            "type" : [
              "array",
              "null"
            ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "UserResource" : {
        "title" : "UserResource",
        "description" : "The signed-in user; for an organization key, its robot account (object robot, an e-mail address that is never routable, the key's name as firstName)",
        "type" : "object",
        "required" : [
          "id",
          "object",
          "email",
          "firstName",
          "lastName",
          "createdAt"
        ],
        "properties" : {
          "id" : {
            "description" : "The user's id (user_<uuid>), or robot_<uuid> for an organization key's robot account",
            "type" : "string"
          },
          "object" : {
            "description" : "\"user\", or \"robot\" for an organization key's robot account",
            "type" : "string"
          },
          "email" : {
            "description" : "The e-mail address the user signs in with",
            "type" : "string"
          },
          "firstName" : {
            "description" : "First name",
            "type" : "string"
          },
          "lastName" : {
            "description" : "Last name",
            "type" : "string"
          },
          "createdAt" : {
            "description" : "When the account was created (RFC 3339, UTC)",
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "Error" : {
        "description" : "An error. Branch on code; read context with the schema of Error.<code>.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code, <module>.<area>.<reason>",
            "type" : "string"
          },
          "context" : {
            "description" : "The detail, whose schema the code fixes",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.bad-request" : {
        "description" : "The request cannot be read: unreadable JSON, malformed parameter.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.bad-request"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.api-version-unsupported" : {
        "description" : "The Myle-API-Version asked for is not a date, or is older than the endpoint's oldest supported behavior.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.api-version-unsupported"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "minimum"
            ],
            "properties" : {
              "minimum" : {
                "description" : "The oldest version this endpoint supports (YYYY-MM-DD)",
                "type" : "string",
                "format" : "date"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.module-required" : {
        "description" : "The organization's plan or settings lack the module this operation belongs to.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.module-required"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "module"
            ],
            "properties" : {
              "module" : {
                "description" : "The module required",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.subscription-required" : {
        "description" : "The organization has no active paid subscription: it is read-only, it can read and export but not write.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.subscription-required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.plan-limit-reached" : {
        "description" : "The organization's plan allows no more of what this operation creates.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.plan-limit-reached"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "limit",
              "max",
              "current"
            ],
            "properties" : {
              "limit" : {
                "description" : "The limit reached: companies, invoicesPerMonth, users or emailsPerMonth",
                "type" : "string"
              },
              "max" : {
                "description" : "What the plan allows",
                "type" : "integer",
                "format" : "int64"
              },
              "current" : {
                "description" : "What the organization has (at least max)",
                "type" : "integer",
                "format" : "int64"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.not-found" : {
        "description" : "What the path names does not exist, or the caller cannot see it (the same answer for both).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.not-found"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "name"
            ],
            "properties" : {
              "kind" : {
                "description" : "The entity concerned, by its English name (organization, invoice…)",
                "type" : "string"
              },
              "name" : {
                "description" : "The id or key sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.method-not-allowed" : {
        "description" : "This path does not accept this method; see the Allow header.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.method-not-allowed"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.not-acceptable" : {
        "description" : "No representation of the resource matches the Accept header.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.not-acceptable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "available"
            ],
            "properties" : {
              "available" : {
                "description" : "The media types this operation can answer",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.conflict" : {
        "description" : "The request conflicts with an existing resource.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.conflict"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "name"
            ],
            "properties" : {
              "kind" : {
                "description" : "The entity concerned, by its English name (organization, invoice…)",
                "type" : "string"
              },
              "name" : {
                "description" : "The conflicting key",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.precondition-failed" : {
        "description" : "The If-Match sent is stale: the resource has changed since.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.precondition-failed"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.payload-too-large" : {
        "description" : "The request body is larger than this operation accepts.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.payload-too-large"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "maxBytes"
            ],
            "properties" : {
              "maxBytes" : {
                "description" : "The largest body accepted, in bytes",
                "type" : "integer",
                "format" : "int64"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.unsupported-media-type" : {
        "description" : "The request body's Content-Type is not one this operation reads.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.unsupported-media-type"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.validation-failed" : {
        "description" : "Fields of the request are invalid.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.validation-failed"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "fields"
            ],
            "properties" : {
              "fields" : {
                "description" : "Each invalid field: path (a JSON Pointer into the body, or ?<name> for a query parameter) and code",
                "type" : "array",
                "items" : {
                  "description" : "One invalid field",
                  "type" : "object",
                  "required" : [
                    "path",
                    "code"
                  ],
                  "properties" : {
                    "path" : {
                      "description" : "A JSON Pointer into the body (/lines/0/quantity), or ?<name>",
                      "type" : "string"
                    },
                    "code" : {
                      "description" : "A kebab-case reason: required, invalid-format, too-long…",
                      "type" : "string"
                    }
                  }
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.idempotency-key-reused" : {
        "description" : "This Idempotency-Key was already used for a request with another body.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.idempotency-key-reused"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.idempotency-key-in-use" : {
        "description" : "A request with this Idempotency-Key is still being processed; retry after the Retry-After delay.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.idempotency-key-in-use"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.rate-limited" : {
        "description" : "Too many requests for this policy; retry after the Retry-After delay.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.rate-limited"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "policy"
            ],
            "properties" : {
              "policy" : {
                "description" : "The rate-limit policy exceeded (read, write, export; ip or user for the per-address or per-session limit of the whole application)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.internal-error" : {
        "description" : "An unexpected error; give the request_id to support.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.internal-error"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.bad-gateway" : {
        "description" : "A service Myle depends on refused the operation.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.bad-gateway"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "service"
            ],
            "properties" : {
              "service" : {
                "description" : "The service that refused",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.core.unavailable" : {
        "description" : "Myle or one of its services is temporarily unavailable; retry later.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "core.unavailable"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.credential.missing" : {
        "description" : "No credential was sent: send Authorization: Bearer <token>.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.credential.missing"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.credential.invalid" : {
        "description" : "The credential sent is not valid.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.credential.invalid"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.credential.expired" : {
        "description" : "The credential sent has expired.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.credential.expired"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.credential.revoked" : {
        "description" : "The credential sent was revoked (password change, logout everywhere).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.credential.revoked"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.right.missing" : {
        "description" : "The caller lacks the right this operation requires in this organization.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.right.missing"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "right"
            ],
            "properties" : {
              "right" : {
                "description" : "The right required",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.email.unconfirmed" : {
        "description" : "The account's e-mail address is not confirmed yet.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.email.unconfirmed"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.session.refused" : {
        "description" : "This session may not perform this operation (an application's session outside its grant, a read-only session).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.session.refused"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.api-key.organization-not-allowed" : {
        "description" : "The user API key sent is narrowed to other organizations than this one.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.api-key.organization-not-allowed"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.session.required" : {
        "description" : "This operation accepts a signed-in session only, never an API key (keys, members, passwords, billing…).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.session.required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.step-up.required" : {
        "description" : "This operation needs a fresh passkey proof (a WebAuthn step-up) for this action.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.step-up.required"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "action"
            ],
            "properties" : {
              "action" : {
                "description" : "The action to confirm with a passkey (apiKey.create…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.auth.api-key.limit-reached" : {
        "description" : "The limit of active API keys is reached (10 per user, 20 per organization); revoke one first.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "auth.api-key.limit-reached"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "limit"
            ],
            "properties" : {
              "limit" : {
                "description" : "The number of active keys allowed",
                "type" : "integer",
                "format" : "int64"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.products.barcode.duplicate" : {
        "description" : "The product already carries this barcode (another product of the organization may carry it too).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "products.barcode.duplicate"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "value"
            ],
            "properties" : {
              "value" : {
                "description" : "The barcode sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.products.barcode.outside-company-prefix" : {
        "description" : "The organization declared its GS1 company prefix, and this EAN-13 does not start with it: register the supplier's barcode on the supplier's product, or use an internal code (restricted distribution, 200 to 299).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "products.barcode.outside-company-prefix"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "companyPrefix"
            ],
            "properties" : {
              "companyPrefix" : {
                "description" : "The organization's GS1 company prefix",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.crm.company.identifier-required" : {
        "description" : "A French business (type BUSINESS_FR) needs a SIREN, a SIRET or a VAT number; send one, or choose the CONSUMER or FOREIGN type.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "crm.company.identifier-required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.crm.company.invalid-identifier" : {
        "description" : "The SIREN (9 digits, or a 14-digit SIRET) or the French VAT number (FR, a 2-digit key, the SIREN) cannot be read.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "crm.company.invalid-identifier"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "field",
              "value"
            ],
            "properties" : {
              "field" : {
                "description" : "The member refused: siren or vatNumber (the VAT number wins when both are sent)",
                "type" : "string"
              },
              "value" : {
                "description" : "The value sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.crm.company.invalid-siret" : {
        "description" : "The establishment SIRET of an address is not 14 digits.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "crm.company.invalid-siret"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "siret"
            ],
            "properties" : {
              "siret" : {
                "description" : "The SIRET sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.crm.company.accounting-number-taken" : {
        "description" : "Another company of the organization has this accounting number.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "crm.company.accounting-number-taken"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "accountingNumber"
            ],
            "properties" : {
              "accountingNumber" : {
                "description" : "The accounting number sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.crm.postal-address.referenced" : {
        "description" : "A delivery address the request removes is still in use: nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "crm.postal-address.referenced"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "postalAddressId",
              "reasons"
            ],
            "properties" : {
              "postalAddressId" : {
                "description" : "The address in use (postalAddress_<uuid>)",
                "type" : "string"
              },
              "reasons" : {
                "description" : "What uses it: HEADQUARTERS, BILLING, ORDERS",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-a-draft" : {
        "description" : "The invoice is no longer a draft: a validated invoice is never changed, deleted or validated again; it is cancelled or corrected by a credit note.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-a-draft"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (VALIDATED, PAID…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.stripe-imported" : {
        "description" : "The invoice was imported from Stripe (Myle's own subscriptions): it is managed in Stripe, never written in Myle.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.stripe-imported"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.foreign-product" : {
        "description" : "A line names a product of another organization: nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.foreign-product"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "productIds"
            ],
            "properties" : {
              "productIds" : {
                "description" : "The products refused (product_<uuid>), as sent",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.out-of-scope-reference" : {
        "description" : "The invoice references a customer or products outside the caller's tag scope: nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.out-of-scope-reference"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "ids"
            ],
            "properties" : {
              "kind" : {
                "description" : "What is out of scope: company or product",
                "type" : "string"
              },
              "ids" : {
                "description" : "The ids refused (company_<uuid>, product_<uuid>), as sent",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.partial-credit-note" : {
        "description" : "This credit note cancels a delivery-note invoice that deducts a deposit: it must take it back whole. For a price error or a partial return, delete this draft and issue a credit note that corrects the invoice.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.partial-credit-note"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.facturx-unavailable" : {
        "description" : "A draft has no Factur-X: the Factur-X carries the legal number the validation gives.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.facturx-unavailable"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-payable" : {
        "description" : "The invoice's status takes no payment: a draft, a validated invoice not sent yet (SHARED is the first status that does), a SEPA debit in progress or failed. Nothing was recorded.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-payable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (DRAFT, VALIDATED, SEPA_PENDING…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.already-paid" : {
        "description" : "The invoice is paid already: someone (Stripe, the customer's e-invoicing platform, a member) booked the money first. Read the invoice again before recording anything. Nothing was recorded.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.already-paid"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.credit-note-linked" : {
        "description" : "A credit note cancels the invoice: its status no longer moves, and it takes no payment. Nothing was recorded.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.credit-note-linked"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.payment.not-removable" : {
        "description" : "The invoice's status no longer lets its payments be removed: only a PAID or partially paid invoice's can. Nothing was removed.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.payment.not-removable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (LOST, SEPA_PENDING…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.payment.stripe-collected" : {
        "description" : "The payment was collected through Stripe: it is refunded in Stripe, never removed in Myle. Nothing was removed.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.payment.stripe-collected"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-creditable" : {
        "description" : "Only a LOST invoice, or one the customer refused on the e-invoicing network (EINVOICE_REFUSED), is cancelled by a credit note issued here: mark it lost first. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-creditable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (VALIDATED, PAID…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.already-credited" : {
        "description" : "Another member or key issued the credit note that cancels this invoice already (the caller's own is answered again, never refused). Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.already-credited"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "creditNoteId"
            ],
            "properties" : {
              "creditNoteId" : {
                "description" : "The credit note that cancels it (invoice_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.deposit-deducted" : {
        "description" : "A deposit invoice that another invoice has deducted (the order's final invoice, delivery-note invoices, or the credit note that settled the order) can no longer be cancelled: the balance would be wrong. Cancel those invoices first, or settle the order. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.deposit-deducted"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.einvoice-required" : {
        "description" : "The customer receives its invoices through the e-invoicing network and this one has not been submitted there yet: its legal channel is the network, not an e-mail nor a hand-over. Nothing was sent or marked.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.einvoice-required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.recipient-unsubscribed" : {
        "description" : "This address unsubscribed from the organization's e-mails: nothing was sent to it (in a send's per-recipient results).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.recipient-unsubscribed"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "emailAddressId"
            ],
            "properties" : {
              "emailAddressId" : {
                "description" : "The address refused (companyEmailAddress_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.transition-refused" : {
        "description" : "The invoice's status cannot move to the one asked: a draft is validated first, an invoice is shared before it is written off, a paid one is taken back to unpaid rather than shared… Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.transition-refused"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status",
              "to"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (DRAFT, VALIDATED, PAID…)",
                "type" : "string"
              },
              "to" : {
                "description" : "The status asked (SHARED, LOST, UNPAID)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.generated-credit-note" : {
        "description" : "This credit note was issued to cancel a lost invoice: it is never written off itself. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.generated-credit-note"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-editable" : {
        "description" : "The draft has been seen outside the organization, or settled, and is no longer changed: correct it by a credit note once validated, or delete it and create another. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-editable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: MAILED, SHARE_LINK, PUBLIC_ACCESS (read online), TRANSMITTED (sent to the e-invoicing network), PAID, GENERATED_CREDIT_NOTE, SHOP (a Boutique order's), STOCK_TRACKED (its lines take from a stock: change them in the web app), DELIVERY_FORMS (its lines bill delivery forms: change them, or its customer, in the web app); an open list",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-reinvoiceable" : {
        "description" : "Only a credit note issued here to cancel an invoice (POST …/credit-notes), once validated, is re-billed: this invoice is no such credit note, or it is still a draft. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-reinvoiceable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (DRAFT, VALIDATED…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.already-reinvoiced" : {
        "description" : "Another member or key re-billed this credit note already (the caller's own draft is answered again, never refused). Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.already-reinvoiced"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "invoiceId"
            ],
            "properties" : {
              "invoiceId" : {
                "description" : "The invoice that re-bills it (invoice_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-a-credit-note" : {
        "description" : "This invoice is no credit note (its total is not negative): it corrects no invoice. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-a-credit-note"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.correction-fixed" : {
        "description" : "The invoice this credit note corrects can no longer be changed. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.correction-fixed"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: GENERATED (issued to cancel that invoice), EINVOICED (on the e-invoicing network), DELIVERED (handed to the customer with it: only the first choice is free)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-correctable" : {
        "description" : "This credit note cannot correct that invoice: it corrects an issued invoice of the same customer, dated no later than the credit note, not cancelled already, and one the caller can see (GET …/correctable-invoices lists them). Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-correctable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "invoiceId"
            ],
            "properties" : {
              "invoiceId" : {
                "description" : "The invoice refused (invoice_<uuid>), as sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.billing.invoice.not-duplicable" : {
        "description" : "This invoice is not copied as a new draft: a credit note is never duplicated, and a copy needs its customer and its products within the caller's tag scope, its customer still on file. Nothing was created for it.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "billing.invoice.not-duplicable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: CREDIT_NOTE (a credit note, generated or hand-made), OUT_OF_SCOPE_REFERENCE (its customer or a product outside the caller's tag scope), CUSTOMER_NOT_FOUND (its customer is no longer on file)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.transition-refused" : {
        "description" : "The quotation's status does not lead to the one asked: a quotation is shared while VALIDATED, approved while SHARED, ordered or billed while APPROVED, and cancelled unless it was converted (ORDERED, INVOICED). Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.transition-refused"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status",
              "to"
            ],
            "properties" : {
              "status" : {
                "description" : "The quotation's status (VALIDATED, SHARED, APPROVED…)",
                "type" : "string"
              },
              "to" : {
                "description" : "The status asked (SHARED, APPROVED, CANCELED, INVOICED)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.not-extendable" : {
        "description" : "Only a quotation still waiting for its customer's answer (VALIDATED, SHARED) or EXPIRED gets a new validity date: an approved, cancelled or converted one has had its answer. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.not-extendable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The quotation's status (APPROVED, CANCELED…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.converted" : {
        "description" : "The quotation was converted and the order or the invoice it made still lives: delete that one first (its deletion takes the quotation back to APPROVED). Nothing was deleted.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.converted"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "id"
            ],
            "properties" : {
              "kind" : {
                "description" : "What it made: order or invoice",
                "type" : "string"
              },
              "id" : {
                "description" : "That document's id (order_<uuid>, invoice_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.already-invoiced" : {
        "description" : "Another member, key or the nightly billing billed this quotation already (the caller's own billing is answered again), or the caller's own billing made an invoice deleted since. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.already-invoiced"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "invoiceId"
            ],
            "properties" : {
              "invoiceId" : {
                "description" : "The invoice it made (invoice_<uuid>, perhaps deleted since), or null when its link is missing",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.has-deposits" : {
        "description" : "The quotation is billed in several times: deposit invoices were issued on it, and its final invoice, which deducts them, settles it; a whole invoice would bill them twice. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.has-deposits"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.not-editable" : {
        "description" : "The quotation has left the organization (mailed, shared by a link, read online, marked shared) or is no longer VALIDATED: its lines, customer and description are kept as the customer saw them; issue a new quotation. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.not-editable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: NOT_DRAFT (no longer VALIDATED), MAILED, SHARE_LINK, PUBLIC_ACCESS, SHARED, CONVERTED",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.foreign-product" : {
        "description" : "A line names a product of another organization: nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.foreign-product"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "productIds"
            ],
            "properties" : {
              "productIds" : {
                "description" : "The products refused (product_<uuid>)",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.out-of-scope-reference" : {
        "description" : "The quotation references a customer or products outside the caller's tag scope: nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.out-of-scope-reference"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "ids"
            ],
            "properties" : {
              "kind" : {
                "description" : "What is out of scope: company or product",
                "type" : "string"
              },
              "ids" : {
                "description" : "The ids refused (company_<uuid>, product_<uuid>)",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.quotations.quotation.recipient-unsubscribed" : {
        "description" : "This address unsubscribed from the organization's e-mails: the quotation was not sent to it.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "quotations.quotation.recipient-unsubscribed"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "emailAddressId"
            ],
            "properties" : {
              "emailAddressId" : {
                "description" : "The address refused (companyEmailAddress_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.transition-refused" : {
        "description" : "The order's status does not lead to the one asked: an order is shared while VALIDATED, approved while VALIDATED or SHARED, marked waiting for delivery while APPROVED, delivered and billed while WAITING_FOR_DELIVERY, and cancelled until it is delivered. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.transition-refused"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status",
              "to"
            ],
            "properties" : {
              "status" : {
                "description" : "The order's status (VALIDATED, APPROVED…)",
                "type" : "string"
              },
              "to" : {
                "description" : "The status asked (SHARED, APPROVED, WAITING_FOR_DELIVERY, DELIVERED, INVOICED…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.not-deletable" : {
        "description" : "A delivered order is deleted once its delivery note is (which takes it back to WAITING_FOR_DELIVERY); a billed one never is: credit its invoice instead. Nothing was deleted.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.not-deletable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The order's status: DELIVERED or INVOICED",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.not-editable" : {
        "description" : "The order has left the organization (mailed, shared by a link, marked shared), was converted, comes from the Boutique or is no longer VALIDATED: its lines, customer and description are kept as the customer saw them. Or its customer cannot change: it was made from a quotation that customer accepted. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.not-editable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: NOT_DRAFT (no longer VALIDATED), MAILED, SHARE_LINK, PUBLIC_ACCESS, SHARED, CONVERTED, SHOP, FROM_QUOTATION (its customer only)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.foreign-product" : {
        "description" : "A line names a product of another organization: nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.foreign-product"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "productIds"
            ],
            "properties" : {
              "productIds" : {
                "description" : "The products refused (product_<uuid>)",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.out-of-scope-reference" : {
        "description" : "The order references a customer or products outside the caller's tag scope: nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.out-of-scope-reference"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "kind",
              "ids"
            ],
            "properties" : {
              "kind" : {
                "description" : "What is out of scope: company or product",
                "type" : "string"
              },
              "ids" : {
                "description" : "The ids refused (company_<uuid>, product_<uuid>)",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.already-invoiced" : {
        "description" : "Another member or key billed this order already (the caller's own billing is answered again), or the caller's own billing made an invoice deleted since. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.already-invoiced"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "invoiceId"
            ],
            "properties" : {
              "invoiceId" : {
                "description" : "The invoice it made (invoice_<uuid>, perhaps deleted since), or null when its link is missing",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.has-deposits" : {
        "description" : "The order is billed in several times: deposit invoices were issued on it (or on the quotation it was made from), and its final invoice, which deducts them, settles it; a whole invoice would bill them twice. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.has-deposits"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.shop-billed" : {
        "description" : "The order was placed and paid by card on the organization's Boutique: its invoice is issued when the card is charged, at the amount really charged; converting it here would bill it twice. Nothing was created.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.shop-billed"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.orders.order.recipient-unsubscribed" : {
        "description" : "This address unsubscribed from the organization's e-mails: the order was not sent to it.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "orders.order.recipient-unsubscribed"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "emailAddressId"
            ],
            "properties" : {
              "emailAddressId" : {
                "description" : "The address refused (companyEmailAddress_<uuid>)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.organization.paid-plan-required" : {
        "description" : "E-invoicing comes with a paid plan: an organization on a trial or without a paid subscription cannot connect to the e-invoicing platform, nor submit invoices unless it connected before. Nothing was done.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.organization.paid-plan-required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.organization.not-subject" : {
        "description" : "The organization is declared an individual or a foreign company: it is outside the mandatory e-invoicing reform, and has nothing to connect.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.organization.not-subject"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.connection.not-connected" : {
        "description" : "The organization is not connected to the e-invoicing platform: connect it first (POST …/einvoicing/connect, with a signed-in session).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.connection.not-connected"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.routing-address.not-published" : {
        "description" : "The directory does not publish this electronic address for the SIREN: choose one of the candidates read with GET. Nothing was written.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.routing-address.not-published"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "identifier"
            ],
            "properties" : {
              "identifier" : {
                "description" : "The address refused, as sent",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.einvoice.not-eligible" : {
        "description" : "The invoice cannot go through the e-invoicing network now (the organization not connected or verified, the customer not reachable, the invoice not validated…): nothing was submitted. Read GET …/einvoice for the eligibility.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.einvoice.not-eligible"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reasons"
            ],
            "properties" : {
              "reasons" : {
                "description" : "Why, as codes (ORG_NOT_CONNECTED, CLIENT_NOT_INVOICABLE…)",
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.einvoice.not-retryable" : {
        "description" : "The last submission failed in a way submitting again cannot fix until something changes (the customer's address, the invoice's content): nothing was submitted.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.einvoice.not-retryable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "failureCode"
            ],
            "properties" : {
              "failureCode" : {
                "description" : "The classified failure (ROUTING_ADDRESS_UNKNOWN, INVALID_DOCUMENT…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.einvoice.credit-note-reference-missing" : {
        "description" : "A credit note goes through the network with the invoice it corrects: name it on the credit note first. Nothing was submitted.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.einvoice.credit-note-reference-missing"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.incoming-einvoice.already-settled" : {
        "description" : "The incoming e-invoice is paid already (PAYMENT_SENT): its purchase and its payment are booked, and no decision or payment walks that back. Nothing was done.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.incoming-einvoice.already-settled"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.incoming-einvoice.not-on-platform" : {
        "description" : "The incoming e-invoice has no id on the e-invoicing platform: no decision can be sent for it. Nothing was done.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.incoming-einvoice.not-on-platform"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.einvoicing.incoming-einvoice.not-accepted" : {
        "description" : "Only an accepted (or partially accepted) incoming e-invoice is marked paid: accept it first. Nothing was recorded.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "einvoicing.incoming-einvoice.not-accepted"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "Its status (RECEIVED, DISPUTED, REFUSED…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.account.not-connected" : {
        "description" : "No Stripe account is connected to the organization: connect one first (POST …/payments-account/onboarding).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.account.not-connected"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.account.demo" : {
        "description" : "A demo organization never reaches Stripe: nothing was done.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.account.demo"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.account.suspended" : {
        "description" : "Stripe suspended the organization's account: debits are blocked until it is settled in the Stripe dashboard.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.account.suspended"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.collection.disabled" : {
        "description" : "The organization turned its Stripe collection off (in its payment settings): nothing is debited, no mandate is offered, no auto-debit is turned on until it turns it back on.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.collection.disabled"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.collection.paused" : {
        "description" : "The organization's Stripe collection is paused because it no longer pays for Myle: it resumes with its subscription.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.collection.paused"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "reason"
            ],
            "properties" : {
              "reason" : {
                "description" : "Why: NO_SUBSCRIPTION or PAYMENT_OVERDUE",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.plan.collection-required" : {
        "description" : "The organization's plan does not carry Stripe collection (SEPA debits, mandates, auto-debit, online payment of invoices); the trial does not either. It comes with a paid plan.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.plan.collection-required"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.mandate.missing" : {
        "description" : "The customer has no usable SEPA mandate: send them a mandate invitation (POST …/sepa-mandate/invitation).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.mandate.missing"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.mandate.foreign-iban" : {
        "description" : "The customer's mandate is on a bank account outside France: only French IBANs are debited.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.mandate.foreign-iban"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.mandate.invitations-throttled" : {
        "description" : "Too many mandate invitations in a row, by this caller or to this customer: retry in an hour.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.mandate.invitations-throttled"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.debit.not-debitable" : {
        "description" : "The invoice's status takes no debit: a draft, a paid one, a debit already in progress (SEPA_PENDING), a dispute or a refusal on the e-invoicing network. Nothing was debited.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.debit.not-debitable"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "status"
            ],
            "properties" : {
              "status" : {
                "description" : "The invoice's status (DRAFT, PAID, SEPA_PENDING…)",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.debit.nothing-due" : {
        "description" : "Nothing remains due on the invoice: nothing was debited.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.debit.nothing-due"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.debit.below-minimum" : {
        "description" : "What remains due is below the smallest SEPA debit: nothing was debited.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.debit.below-minimum"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "minimum"
            ],
            "properties" : {
              "minimum" : {
                "description" : "The smallest debit, a decimal amount in EUR (\"20.00\")",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.debit.above-maximum" : {
        "description" : "What remains due is above the largest SEPA debit: nothing was debited.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.debit.above-maximum"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "maximum"
            ],
            "properties" : {
              "maximum" : {
                "description" : "The largest debit, a decimal amount in EUR",
                "type" : "string"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.debit.quota-reached" : {
        "description" : "The organization's SEPA quota over the rolling window is reached, for this customer or for the whole organization: nothing was debited (GET …/payments-account/sepa-quota tells what remains).",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.debit.quota-reached"
          },
          "context" : {
            "description" : "The detail of this error",
            "type" : "object",
            "required" : [
              "scope",
              "measure",
              "limit",
              "current",
              "windowDays"
            ],
            "properties" : {
              "scope" : {
                "description" : "Whose quota: company or organization",
                "type" : "string"
              },
              "measure" : {
                "description" : "What is counted: count or amount",
                "type" : "string"
              },
              "limit" : {
                "description" : "The quota: a number of debits, or a decimal amount in EUR",
                "type" : "string"
              },
              "current" : {
                "description" : "What the window holds already, in the same unit",
                "type" : "string"
              },
              "windowDays" : {
                "description" : "The rolling window, in days",
                "type" : "integer",
                "format" : "int64"
              }
            }
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      },
      "Error.payments.refund.nothing-to-refund" : {
        "description" : "No payment of the invoice was collected through Stripe: there is nothing to refund there.",
        "type" : "object",
        "required" : [
          "code",
          "context",
          "error",
          "request_id"
        ],
        "properties" : {
          "code" : {
            "description" : "The error code",
            "const" : "payments.refund.nothing-to-refund"
          },
          "context" : {
            "description" : "No detail: always {}",
            "type" : "object"
          },
          "error" : {
            "description" : "A sentence in French or English, from Accept-Language; never parse it",
            "type" : "string"
          },
          "request_id" : {
            "description" : "The request's id in Myle's logs (also in Myle-Request-Id); give it to support",
            "type" : "string"
          }
        },
        "additionalProperties" : false
      }
    },
    "securitySchemes" : {
      "session" : {
        "type" : "http",
        "description" : "A Myle session token, sent as Authorization: Bearer <token>",
        "scheme" : "bearer",
        "bearerFormat" : "JWT"
      },
      "organizationKey" : {
        "type" : "http",
        "description" : "An organization API key, sent as Authorization: Bearer <token>. It acts as its own robot account in its organization, with the rights configured on it; created by a member holding API_KEYS_MANAGE.",
        "scheme" : "bearer",
        "bearerFormat" : "myleOrganizationKey_<key id>_<secret>_<checksum>"
      },
      "userKey" : {
        "type" : "http",
        "description" : "A user API key, sent as Authorization: Bearer <token>. It acts as the user who created it, with their live rights, possibly narrowed to some organizations and rights.",
        "scheme" : "bearer",
        "bearerFormat" : "myleAccountKey_<key id>_<secret>_<checksum>"
      }
    }
  }
}
