{
  "openapi": "3.0.0",
  "info": {
    "title": "Growwer API",
    "description": "The Growwer customer API. Authenticate every call with an API key created on\nyour profile page, sent as `Authorization: Bearer <key>`. A read key can call\nevery GET operation; writes need a read and write key and an\n`Idempotency-Key` header.\n\nIdempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII\ncharacters without spaces) for each operation and reuse it only to retry that same\noperation. Keys belong to your account, not to one API key.\n- A successful write is stored for 30 days: a retry with the same key and\n  the same request replays its response with `Idempotent-Replayed: true`\n  and does nothing again.\n- A refused write (4xx) has no effect and releases its key: once you fix the\n  cause, retry with the same key and the write runs.\n- A failed write (5xx) may have taken effect, so it is never run again under\n  its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it\n  took effect before retrying with a new key.\n- A retry while the first request is still running gets 409\n  `idempotency_request_in_progress`. A request still running after 5 minutes\n  is treated as failed: a retry gets 409 `idempotency_outcome_unknown`.\n- The same key with a different request (method, path, query or body) gets\n  409 `idempotency_key_reused`. A write without the header gets 400\n  `idempotency_key_required`.\n\nTest mode: a test key (`gw_sk_test_` plus 43 characters) works on your\naccount's test data alone, apart from the real catalogue: test projects,\norders and files, and a test wallet that starts at 1,000.00 EUR. Every\nresponse to a test key carries `Growwer-Mode: test`, and an id of the other\nmode answers 404 as a missing object would.\n- A test order is validated and debited from the test wallet as a live one\n  is. A simulated seller accepts it a minute later and delivers it two\n  minutes after that; you approve the delivery or request an update.\n- The Test helpers top the test wallet up, move a test order on at once and\n  reset your test data. A live key on them gets 403 `test_mode_only`.\n- A test key on the seller and managed service operations, on a project's\n  catalogue writes and on media requests gets 403\n  `not_available_in_test_mode`.\n- Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with\n  a live and a test key never replays the other mode's response.\n\nWebhooks: a subscription receives the events of its mode, signed as Standard\nWebhooks. A subscription created with a live key gets the events of your\norders and your wallet; one created with a test key gets those of your test\norders and test wallet, with `mode: test`, and never a live event.\n`x-webhooks` lists every event Growwer POSTs and its payload; the\nWebhookEvent schema describes the headers, the signature and the retries.\n\nEvery response carries `X-Request-Id`. Errors share one shape,\n`{code, message, requestId, details?}`. Money is integer cents plus a\ncurrency code (12500 is 125.00 EUR), answered with `amountDecimal`, the same\namount as an exact decimal string (\"125.00\"); dates are ISO-8601.\n",
    "termsOfService": "https://growwer.com/legal/terms-of-use/",
    "contact": {
      "name": "Growwer Support",
      "url": "https://growwer.com/contact/",
      "email": "support@growwer.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://growwer.com/legal/terms-of-use/"
    },
    "version": "1"
  },
  "servers": [
    {
      "url": "https://tool.growwer.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Your account",
        "description": "Profile basics, the buyer and seller balances, whether your seller account is restricted, whether the catalogue is open to you, whether you have a managed service, and whether the key you called with is live or test. A test key reads its test wallet as the buyer balance (1,000.00 EUR until test orders and top-ups move it), never your real balance, and no seller side.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "Your account.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "id",
                    "email",
                    "firstName",
                    "language",
                    "createdAt",
                    "buyer",
                    "seller",
                    "catalogue",
                    "managedService",
                    "mode"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "language": {
                      "description": "The language Growwer writes to you in.",
                      "type": "string",
                      "example": "en"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "buyer": {
                      "required": [
                        "balance"
                      ],
                      "properties": {
                        "balance": {
                          "$ref": "#/components/schemas/Balance"
                        }
                      },
                      "type": "object"
                    },
                    "seller": {
                      "description": "Your seller side. Null to a test key: selling is not available in test mode, so a test key reads neither your seller balance nor its status.",
                      "required": [
                        "balance",
                        "restricted",
                        "onHoliday",
                        "holidayEndDate"
                      ],
                      "properties": {
                        "balance": {
                          "$ref": "#/components/schemas/Balance"
                        },
                        "restricted": {
                          "description": "Whether your seller account is restricted: it accepts no orders and its balance is held. Contact support for the reason.",
                          "type": "boolean"
                        },
                        "onHoliday": {
                          "description": "Whether you are on holiday: your medias take no orders. Set it with PUT /seller/holiday.",
                          "type": "boolean"
                        },
                        "holidayEndDate": {
                          "description": "The day your holiday ends, at 00:00 of that day in Growwer's server time, or null when you are not on holiday or end it yourself.",
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        }
                      },
                      "type": "object",
                      "nullable": true
                    },
                    "catalogue": {
                      "required": [
                        "eligible",
                        "dailyCap",
                        "remainingToday"
                      ],
                      "properties": {
                        "eligible": {
                          "description": "Whether you have the full daily cap of the catalogue operations (tag Catalogue: searching a project's medias, flash offers and media details). It is open to accounts with recent completed orders, as buyer or as seller; until then the catalogue answers within a smaller daily trial quota, which rises to the full cap after a completed order. A media you have ordered is always readable with GET /medias/{id} and counts against neither.",
                          "type": "boolean"
                        },
                        "dailyCap": {
                          "description": "How many distinct medias the catalogue operations show you per UTC day: the full cap when `eligible` is true, the trial quota otherwise. 0 means the catalogue answers 403 `catalogue_requires_recent_order` until you have a recent completed order.",
                          "type": "integer",
                          "minimum": 0
                        },
                        "remainingToday": {
                          "description": "How many units of `dailyCap` still fit today (UTC): each new distinct media costs one, and a catalogue response that holds no new media, an empty one or a saved filter count included, costs one unless the same request was answered today and the media lists, topics and language of its project have not changed since. Medias you have already seen today, and requests already answered today, are free. Null when the count cannot be read right now; the catalogue operations then answer 503 until it can.",
                          "type": "integer",
                          "nullable": true,
                          "minimum": 0
                        }
                      },
                      "type": "object"
                    },
                    "managedService": {
                      "required": [
                        "active"
                      ],
                      "properties": {
                        "active": {
                          "description": "Whether you have a managed service: Growwer's team runs link building campaigns for you (tag Managed services). With one, request a new campaign with POST /managed-service/campaign-requests; without one, ask about the service with POST /managed-service/info-requests.",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    },
                    "mode": {
                      "description": "The mode of the key you called with. `live` works on your real account; `test` works in test mode, where nothing you do reaches real sellers, money or orders. Every response to a test key also carries the header `Growwer-Mode: test`.",
                      "type": "string",
                      "enum": [
                        "live",
                        "test"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/vocabulary": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Codes and names",
        "description": "The countries, languages, topics, product types, link types and order states that other operations take and return. Names are in English.",
        "operationId": "getVocabulary",
        "responses": {
          "200": {
            "description": "Every code, with its English name where it has one.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "countries",
                    "languages",
                    "topics",
                    "productTypes",
                    "linkTypes",
                    "orderStates"
                  ],
                  "properties": {
                    "countries": {
                      "description": "ISO 3166-1 alpha-2 codes.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CodeName"
                      }
                    },
                    "languages": {
                      "description": "ISO 639 codes, as the web's language selectors offer them.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CodeName"
                      }
                    },
                    "topics": {
                      "type": "array",
                      "items": {
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "productTypes": {
                      "description": "What an order buys: a sponsored post, or a link added to an existing page.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "post_order",
                          "link_addition_order"
                        ]
                      }
                    },
                    "linkTypes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "dofollow",
                          "nofollow",
                          "citation"
                        ]
                      }
                    },
                    "orderStates": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/saved-filters/{filterId}/media-count": {
      "get": {
        "tags": [
          "Saved filters"
        ],
        "summary": "Count the medias of a saved filter",
        "description": "How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`. The catalogue access and the daily limit of the catalogue apply: a count costs one unit of that limit the first time a filter is counted in a UTC day, and counting the same filter again that day is free.",
        "operationId": "countSavedFilterMedias",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filterId",
            "in": "path",
            "description": "The saved filter.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The number of matching medias.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "count"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/CatalogueForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "The saved filter uses a web filter the API does not support (code `saved_filter_unsupported`); `details.field` names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/saved-filters": {
      "get": {
        "tags": [
          "Saved filters"
        ],
        "summary": "List the saved filters of a project",
        "description": "Your saved filters of one of your projects, newest first, including those saved on the web. A project has at most 100. Apply one with `savedFilterId` on GET /projects/{id}/medias.",
        "operationId": "listSavedFilters",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The saved filters and how many there are.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SavedFilter"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Saved filters"
        ],
        "summary": "Save a filter",
        "description": "Saves a catalogue search of one of your projects, which then also appears on the web. `filters` takes the filter parameters of GET /projects/{id}/medias, and `source`, with the same values; lists may be JSON arrays and flags JSON booleans. With `notificationFrequency`, Growwer emails you new medias that match. A project has at most 100 saved filters and an account 500.",
        "operationId": "createSavedFilter",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "filters"
                ],
                "properties": {
                  "name": {
                    "description": "1 to 255 characters.",
                    "type": "string",
                    "maxLength": 255
                  },
                  "filters": {
                    "description": "At least one filter parameter of GET /projects/{id}/medias, or `source`, by name.",
                    "type": "object",
                    "example": {
                      "language": [
                        "es"
                      ],
                      "minDomainRating": 30,
                      "favourite": true
                    },
                    "additionalProperties": true
                  },
                  "notificationFrequency": {
                    "description": "Email new matching medias this often. Omit it for no emails.",
                    "type": "string",
                    "enum": [
                      "daily",
                      "weekly",
                      "monthly"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The saved filter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedFilter"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The project already has 100 saved filters, or the account 500 (code `saved_filter_limit_reached`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/saved-filters/{filterId}": {
      "delete": {
        "tags": [
          "Saved filters"
        ],
        "summary": "Delete a saved filter",
        "description": "Deletes one of your saved filters of one of your projects, including one saved on the web. Its notifications stop.",
        "operationId": "deleteSavedFilter",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filterId",
            "in": "path",
            "description": "The saved filter.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The saved filter was deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/discards/{mediaId}": {
      "put": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Discard a media for a project",
        "description": "Discards a media for one of your projects, as the web does. Discarding it again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.",
        "operationId": "discardMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "description": "The media.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The media is discarded for the project."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Restore a discarded media for a project",
        "description": "Restores a media you discarded for one of your projects. Restoring one that is not discarded, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.",
        "operationId": "undiscardMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "description": "The media.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The media is not discarded for the project."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/favourites/{mediaId}": {
      "put": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Add a media to the favourites of a project",
        "description": "Marks a media as a favourite of one of your projects, as the heart on the web does. Adding a favourite again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.",
        "operationId": "favouriteMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "description": "The media.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The media is a favourite of the project."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Remove a media from the favourites of a project",
        "description": "Removes a media from the favourites of one of your projects. Removing one that is not a favourite, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.",
        "operationId": "unfavouriteMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "description": "The media.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The media is not a favourite of the project."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/medias/{id}": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Get a media",
        "description": "One media of the catalogue: an active, public media. A media you have ordered is always readable, even if it has since left the catalogue, and is open to every account. Otherwise the media counts towards the distinct medias the account may see per day (UTC): the full daily cap for accounts with recent completed orders, a smaller trial quota for other accounts (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). For the media's state in one of your projects, search the project with GET /projects/{id}/medias.",
        "operationId": "getCatalogueMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The media.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The media.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogueMedia"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/CatalogueForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/flash-offers": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "List flash offers",
        "description": "The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily limit of that operation apply: each new media costs one unit, a page that holds no new media, an empty one included, costs one, and repeating a request already answered the same day is free while the media lists, topics and language of the project stay as they were.",
        "operationId": "listFlashOffers",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "description": "The project to search flash offers for.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/CatalogueSource"
          },
          {
            "$ref": "#/components/parameters/CatalogueSort"
          },
          {
            "$ref": "#/components/parameters/CatalogueDomain"
          },
          {
            "$ref": "#/components/parameters/CatalogueWebsiteType"
          },
          {
            "$ref": "#/components/parameters/CatalogueLanguage"
          },
          {
            "$ref": "#/components/parameters/CatalogueCountry"
          },
          {
            "$ref": "#/components/parameters/CatalogueTopics"
          },
          {
            "$ref": "#/components/parameters/CatalogueNotBannedTopics"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinTraffic"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxTraffic"
          },
          {
            "$ref": "#/components/parameters/CatalogueTrafficTrendUpward"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinDomainRating"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxDomainRating"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinLinkedToReferringRatio"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxLinkedToReferringRatio"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinPostPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxPostPrice"
          },
          {
            "$ref": "#/components/parameters/CataloguePostLinkType"
          },
          {
            "$ref": "#/components/parameters/CataloguePromotedSocialNetwork"
          },
          {
            "$ref": "#/components/parameters/CatalogueWithoutAdvertisingLabel"
          },
          {
            "$ref": "#/components/parameters/CatalogueHomepageListing"
          },
          {
            "$ref": "#/components/parameters/CatalogueHasLinkAddition"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinLinkAdditionPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxLinkAdditionPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueLinkAdditionLinkType"
          },
          {
            "$ref": "#/components/parameters/CatalogueBestPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueRecommended"
          },
          {
            "$ref": "#/components/parameters/CatalogueFavourite"
          },
          {
            "$ref": "#/components/parameters/CatalogueRequested"
          },
          {
            "$ref": "#/components/parameters/CatalogueBought"
          },
          {
            "$ref": "#/components/parameters/CatalogueDiscarded"
          },
          {
            "$ref": "#/components/parameters/CatalogueNew"
          },
          {
            "$ref": "#/components/parameters/CatalogueRanksGoalKeyword"
          },
          {
            "$ref": "#/components/parameters/CatalogueRanksAiKeyword"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Medias per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Medias to skip, at most 99900.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "maximum": 99900,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of flash offers and how many there are in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectCatalogueMedia"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/CatalogueForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/media-requests": {
      "post": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Request specific medias for a project",
        "description": "Asks Growwer to find the medias of these domains for one of your projects, as the \"request specific domains\" form on the web does. Each entry may be a domain or a URL; it is read as its full domain, lowercased. Repeated domains are requested once, and a domain already requested changes nothing. Up to 200 distinct domains per call. They then appear in the project's catalogue with `project.requested` true (`requested=true` on GET /projects/{id}/medias) once Growwer lists them.",
        "operationId": "requestMedias",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domains"
                ],
                "properties": {
                  "domains": {
                    "description": "Domains or URLs, 1 to 200 distinct domains.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "example.com"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The domains were requested: each distinct domain, as Growwer read it.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "domains"
                  ],
                  "properties": {
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}/medias": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "summary": "Search the catalogue for a project",
        "description": "The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). Each new media of a page costs one unit of that limit, and a page that holds no new media, an empty one included, costs one unit, so a `total` costs at least one; repeating a request already answered the same day is free, and so are medias seen again that day. A change of the media lists of the project (a media request, a favourite, a discard), its topics or its language makes the same request a new one.",
        "operationId": "searchProjectMedias",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The project.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/CatalogueSource"
          },
          {
            "$ref": "#/components/parameters/CatalogueSort"
          },
          {
            "name": "savedFilterId",
            "in": "query",
            "description": "Apply one of your saved filters of this project, including one saved on the web, instead of the other parameters. Do not combine it with any filter, `source` or `sort`. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/CatalogueDomain"
          },
          {
            "$ref": "#/components/parameters/CatalogueWebsiteType"
          },
          {
            "$ref": "#/components/parameters/CatalogueLanguage"
          },
          {
            "$ref": "#/components/parameters/CatalogueCountry"
          },
          {
            "$ref": "#/components/parameters/CatalogueTopics"
          },
          {
            "$ref": "#/components/parameters/CatalogueNotBannedTopics"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinTraffic"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxTraffic"
          },
          {
            "$ref": "#/components/parameters/CatalogueTrafficTrendUpward"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinDomainRating"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxDomainRating"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinLinkedToReferringRatio"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxLinkedToReferringRatio"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinPostPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxPostPrice"
          },
          {
            "$ref": "#/components/parameters/CataloguePostLinkType"
          },
          {
            "$ref": "#/components/parameters/CataloguePromotedSocialNetwork"
          },
          {
            "$ref": "#/components/parameters/CatalogueWithoutAdvertisingLabel"
          },
          {
            "$ref": "#/components/parameters/CatalogueHomepageListing"
          },
          {
            "$ref": "#/components/parameters/CatalogueHasLinkAddition"
          },
          {
            "$ref": "#/components/parameters/CatalogueMinLinkAdditionPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueMaxLinkAdditionPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueLinkAdditionLinkType"
          },
          {
            "$ref": "#/components/parameters/CatalogueBestPrice"
          },
          {
            "$ref": "#/components/parameters/CatalogueRecommended"
          },
          {
            "$ref": "#/components/parameters/CatalogueFavourite"
          },
          {
            "$ref": "#/components/parameters/CatalogueRequested"
          },
          {
            "$ref": "#/components/parameters/CatalogueFlashOffer"
          },
          {
            "$ref": "#/components/parameters/CatalogueBought"
          },
          {
            "$ref": "#/components/parameters/CatalogueDiscarded"
          },
          {
            "$ref": "#/components/parameters/CatalogueNew"
          },
          {
            "$ref": "#/components/parameters/CatalogueRanksGoalKeyword"
          },
          {
            "$ref": "#/components/parameters/CatalogueRanksAiKeyword"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Medias per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Medias to skip, at most 99900.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "maximum": 99900,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of matching medias and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectCatalogueMedia"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/CatalogueForbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "A parameter is not valid (code `validation_failed`; `details.fields` names it), or the saved filter uses a web filter the API does not support (code `saved_filter_unsupported`; `details.field` names it).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload a file",
        "description": "Uploads a document (odt, doc, docx or txt, up to 8 MB) for a later write to reference by its `id`. A file belongs to you, can be used by one write, and expires 24 hours after it was uploaded; an expired or used file is answered like an unknown one.\n\nYou may hold 20 files that no write has used yet and that have not expired. Past them it answers 429 `file_limit_reached`, with `details.limit` the number you may hold and `Retry-After` the seconds until the first of them expires; using one of them in a write frees its place at once. A file refused as invalid (422) is refused before they are counted, and a refused upload stores nothing.",
        "operationId": "uploadFile",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The file, stored until `expiresAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "id",
                    "name",
                    "size",
                    "expiresAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "description": "The name the file was uploaded with.",
                      "type": "string"
                    },
                    "size": {
                      "description": "Bytes.",
                      "type": "integer"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "description": "No file was sent as the `file` field, or it is too large, not an odt, doc, docx or txt document, or its name is longer than 255 characters (code `validation_failed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/invoices/{id}/pdf": {
      "get": {
        "tags": [
          "Buyer wallet"
        ],
        "summary": "Download an invoice",
        "description": "The PDF of one of your invoices.",
        "operationId": "getInvoicePdf",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/invoices": {
      "get": {
        "tags": [
          "Buyer wallet"
        ],
        "summary": "List your invoices",
        "description": "The invoices of your top-ups, newest first.",
        "operationId": "listInvoices",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Invoices per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Invoices to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your invoices and how many you have in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invoice"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns/{id}/proposals/estimate": {
      "post": {
        "tags": [
          "Managed services"
        ],
        "summary": "Estimate accepting proposals",
        "description": "Totals the campaign's accepted proposals that still await their order and the `proposed` ones you name in `accept`, and compares the total with your wallet's available balance. Each proposal counts at its `currentPrice`, or at its `proposedPrice` when the media no longer offers the service. Nothing is accepted, charged or reserved, so a read-only key may call it and it takes no Idempotency-Key.\n\nThe estimate is advisory: accepting a proposal charges nothing. The team charges your wallet when it places the order for an accepted proposal, and the same balance pays for the orders you place yourself.",
        "operationId": "estimateManagedServiceProposals",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedServiceProposalsEstimateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The totals and how your wallet covers them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedServiceProposalsEstimate"
                }
              }
            }
          },
          "400": {
            "description": "The body is not a JSON object (code `invalid_json`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "The campaign is not yours, or a proposal named in `accept` is not one of the campaign's (code `not_found`, with `details.proposalId`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A proposal named in `accept` is not awaiting your review (code `invalid_state`, with `details.proposalIds`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns/{id}": {
      "get": {
        "tags": [
          "Managed services"
        ],
        "summary": "Get a managed service campaign",
        "operationId": "getManagedServiceCampaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedServiceCampaign"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns/{id}/proposals-summary": {
      "get": {
        "tags": [
          "Managed services"
        ],
        "summary": "Download the summary of a campaign's proposals",
        "description": "The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`). One summary of yours is rendered at a time: a request while another is being rendered gets 429 `proposals_summary_in_progress`, to retry after the `Retry-After` header.",
        "operationId": "getManagedServiceProposalsSummary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "extended",
            "in": "query",
            "description": "Whether to show the prices.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "false",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The summary.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns": {
      "get": {
        "tags": [
          "Managed services"
        ],
        "summary": "List your managed service campaigns",
        "description": "The campaigns your managed service runs for you, newest first. Without a managed service the list is empty: GET /me says whether you have one.",
        "operationId": "listManagedServiceCampaigns",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Campaigns per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Campaigns to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your campaigns and how many you have in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ManagedServiceCampaign"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns/{id}/proposals": {
      "get": {
        "tags": [
          "Managed services"
        ],
        "summary": "List the proposals of a campaign",
        "description": "The medias the team proposes for the campaign, newest first. Those `proposed` await your review (POST /managed-service/campaigns/{id}/proposals/review).",
        "operationId": "listManagedServiceProposals",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only proposals in these states, comma-separated: `proposed`, `accepted`, `cancelled`, `purchase_started`, `purchase_finished`.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "proposed,accepted"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Proposals per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Proposals to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the campaign's proposals and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ManagedServiceProposal"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaign-requests": {
      "post": {
        "tags": [
          "Managed services"
        ],
        "summary": "Request a new campaign",
        "description": "Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service.\n\nThe API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.",
        "operationId": "requestManagedServiceCampaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedServiceRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The request was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedServiceRequestSent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "You have no managed service yet (code `managed_service_required`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/info-requests": {
      "post": {
        "tags": [
          "Managed services"
        ],
        "summary": "Ask about the managed service",
        "description": "Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign.\n\nThe API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.",
        "operationId": "requestManagedServiceInfo",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedServiceRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The request was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedServiceRequestSent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "You already have a managed service (code `managed_service_exists`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/managed-service/campaigns/{id}/proposals/review": {
      "post": {
        "tags": [
          "Managed services"
        ],
        "summary": "Accept or reject proposals",
        "description": "Decides on every proposal of the campaign that awaits your review (`state` `proposed`), as the campaign page does: name each one once, with `accept` or `reject`, and a comment for the team to reject one. Their order in the body does not matter. Accepting charges nothing: the team places the orders for the accepted proposals and your wallet pays for them then. POST /managed-service/campaigns/{id}/proposals/estimate says what they would cost.\n\nWhen every proposal is accepted the campaign moves to `proposal_accepted`; when one is rejected the team is told and prepares others. A proposal someone else moved on the campaign page while the request ran is answered in the state it reached.",
        "operationId": "reviewManagedServiceProposals",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagedServiceProposalReviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The campaign and the proposals you reviewed, as they now are.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedServiceProposalReview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The campaign is not yours, or a proposal named is not one of the campaign's (code `not_found`, with `details.proposalId`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "No proposal of the campaign awaits your review (code `no_pending_proposals`), or a proposal named does not (code `invalid_state`, with `details.proposalIds`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is invalid (code `validation_failed`), or it leaves out proposals awaiting your review (code `review_incomplete`, with `details.missingProposalIds`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/approve": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Approve an order's delivery",
        "description": "Approves the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The order finishes and the seller is paid. It takes no body.",
        "operationId": "approveOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The order, approved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not pending your review of its delivery (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/approve-draft": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Approve a draft",
        "description": "Approves the draft of a post order whose `pendingAction` is yours to review the draft (GET /orders/{id}/draft downloads it), as the web does. The seller then publishes it. It takes no body.",
        "operationId": "approveOrderDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The order, with its draft approved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not a post order with a draft pending your review (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/cancel": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Cancel an order",
        "description": "Cancels an order the seller has not accepted yet (`state` `pending_acceptance`), as the web does. Its price returns to your wallet's available balance, and the seller is told your reason.",
        "operationId": "cancelOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderActionReason"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The seller has already accepted or refused the order, or it has finished (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders": {
      "get": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "List your orders",
        "description": "The orders you bought, newest first by default. To follow your orders, poll with `sort=updatedAt` and `updatedSince` set to the `updatedAt` of the last order you saw: an order moves to the end of that list each time it changes state.",
        "operationId": "listOrders",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "description": "Only the orders of this project of yours.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "query",
            "description": "Only the orders on this media.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the orders in one of these states, comma-separated. An unknown state is refused with 422 and the list of valid ones.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "pending_acceptance,pending_order_delivery"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "description": "Only the orders whose `updatedAt` is at or after this instant, an ISO-8601 date-time with its offset (send `+` as `%2B`).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "`-createdAt`, newest first, or `updatedAt`, least recently changed first. Orders of the same instant come in id order.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "-createdAt",
              "enum": [
                "-createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Orders per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Orders to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your orders and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Place an order",
        "description": "Places an order on a media for one of your projects and pays its price from your wallet's available balance, as ordering on the web does. Estimate the order first (POST /orders/estimate) and send the price it answers as `expectedPrice`: the order is placed only at that price.\n\nPlacing the same order (same project, media, type and price) again within 5 seconds of one still in progress is refused with `duplicate_order`. Its `details.orderId` is the earlier order, or null when that order has finished or was deleted since.\n\nA proposed draft (`proposedDraftFileId`, from POST /files) is used up when the order is placed. If the order is then refused because another request changed your balance, the media or its price, or placed the same order, the file is used up all the same and the refusal's message says so: upload it again before retrying.",
        "operationId": "createOrder",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The order, placed and paid. `Location` is its URL.",
            "headers": {
              "Location": {
                "description": "The URL of the new order.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The project is not yours, or the media does not exist or is not one you can order for this project (code `not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The order cannot be placed, and nothing was charged:\n- `price_changed`: the price is not `expectedPrice`; `details.currentPrice` is the price.\n- `insufficient_balance`: your available balance does not cover the price; `details` has `required`, `available` and `missing` (Money).\n- `duplicate_order`: the same order was placed seconds ago; `details.orderId` is that order, or null.\n- `seller_on_holiday`: the media is not taking orders right now.\n- `media_topic_not_allowed`: the media does not accept the project's topic.\n- `offer_unavailable`: the media does not offer this type of order.\n- `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`: the `Idempotency-Key` conflicts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`, with the messages of each field in `details.fields`), or `proposedDraftFileId` names no file you can use: it does not exist, has expired or was already used (code `file_unusable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/briefing": {
      "get": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Download the draft you attached to an order",
        "description": "The file you attached to the briefing of a post order. 404 when the order has none (`briefing.hasProposedDraft` is false) or the file cannot be read.",
        "operationId": "downloadOrderBriefing",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/draft": {
      "get": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Download the draft of an order",
        "description": "The file of the current draft of a post order. 404 when the order has no draft file (`draft.hasFile` is false) or the file cannot be read.",
        "operationId": "downloadOrderDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/estimate": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Estimate an order",
        "description": "Checks and prices the order POST /orders would place with the same body, without `expectedPrice`, and compares the price with your wallet's available balance. Nothing is placed, charged or used up, so a read-only key may call it and it takes no Idempotency-Key. Send the `price` it answers as `expectedPrice` when you place the order.\n\nThe estimate is refused for the same reasons as the order itself, except a balance that does not cover the price: that is answered here with `sufficientBalance: false` and the `missing` amount.",
        "operationId": "estimateOrder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderEstimateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The price of the order and how your wallet covers it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEstimate"
                }
              }
            }
          },
          "400": {
            "description": "The body is not a JSON object (code `invalid_json`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "The project is not yours, or the media does not exist or is not one you can order for this project (code `not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The order could not be placed:\n- `seller_on_holiday`: the media is not taking orders right now.\n- `media_topic_not_allowed`: the media does not accept the project's topic.\n- `offer_unavailable`: the media does not offer this type of order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`, with the messages of each field in `details.fields`), or `proposedDraftFileId` names no file you can use: it does not exist, has expired or was already used (code `file_unusable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Get an order",
        "description": "One order you bought, with its briefing, its draft and its state history.",
        "operationId": "getOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/request-draft-update": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Request changes to a draft",
        "description": "Asks the seller to change the draft of a post order whose `pendingAction` is yours to review the draft, as the web does. The seller is told your reason.",
        "operationId": "requestOrderDraftUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderActionReason"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, with its draft back with the seller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not a post order with a draft pending your review (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{id}/request-update": {
      "post": {
        "tags": [
          "Buyer orders"
        ],
        "summary": "Request changes to a delivery",
        "description": "Asks the seller to change the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The seller is told your reason.",
        "operationId": "requestOrderUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderActionReason"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, back with the seller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not pending your review of its delivery (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List your projects",
        "description": "Your projects, newest first.",
        "operationId": "listProjects",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Projects per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Projects to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your projects and how many you have in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Creates a project for a website, as the web's project creation does. Growwer then analyses it in the background to recommend media: the project is answered with `state: analyzing` and turns `finished` when the analysis ends. Analysis can take hours, and it never finishes when no medium matches the project, so poll GET /projects/{id} with backoff and use `createdAt` to decide when to stop.\n\nEvery value is validated as on the web: `topics`, `language` and `country` take the identifiers GET /vocabulary publishes.\n\nCreating a project also categorises its website through an external service, as the web does. When that service fails the answer is 500, although the project may already be saved, and a retry under the same Idempotency-Key answers 409 `idempotency_outcome_unknown`. After either, list your projects (GET /projects) before retrying with a new key, or you may create a duplicate.",
        "operationId": "createProject",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "rootUrl",
                  "websiteType",
                  "topics",
                  "language",
                  "promotedProducts"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  },
                  "rootUrl": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://www.example.com"
                  },
                  "websiteType": {
                    "type": "string",
                    "enum": [
                      "ecommerce",
                      "services",
                      "other"
                    ]
                  },
                  "topics": {
                    "description": "Exactly one topic id from GET /vocabulary.",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "maxItems": 1,
                    "minItems": 1
                  },
                  "language": {
                    "description": "A language code from GET /vocabulary.",
                    "type": "string",
                    "example": "es"
                  },
                  "country": {
                    "description": "A country code from GET /vocabulary; omit it or send null for worldwide.",
                    "type": "string",
                    "example": "ES",
                    "nullable": true
                  },
                  "promotedProducts": {
                    "description": "5 to 10 products or services the campaign promotes.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 5
                  },
                  "userKeywords": {
                    "description": "At most 100 keywords, none with a line break.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The project, created and being analysed. `Location` is its URL.",
            "headers": {
              "Location": {
                "description": "The URL of the new project.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`), or you have reached the number of projects an account may have without a wallet deposit in the last year (code `project_limit_reached`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/projects/{id}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "One of your projects. Poll it to follow `state` after creating the project.",
        "operationId": "getProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "Deletes one of your projects. A project with an order in progress cannot be deleted until its orders finish.",
        "operationId": "deleteProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The project was deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The project has an order in progress (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Edit a project",
        "description": "Changes only the fields you send. `rootUrl` cannot be changed; any field not listed here is refused. Changing `language`, `country`, `promotedProducts` or `topics` makes Growwer categorise the project and work out its target keywords again, in the background.",
        "operationId": "updateProject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "description": "Null or an empty string removes the name.",
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  },
                  "websiteType": {
                    "type": "string",
                    "enum": [
                      "ecommerce",
                      "services",
                      "other"
                    ]
                  },
                  "topics": {
                    "description": "Exactly one topic id from GET /vocabulary.",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "maxItems": 1,
                    "minItems": 1
                  },
                  "language": {
                    "description": "A language code from GET /vocabulary.",
                    "type": "string"
                  },
                  "country": {
                    "description": "A country code from GET /vocabulary, or null for worldwide.",
                    "type": "string",
                    "nullable": true
                  },
                  "promotedProducts": {
                    "description": "5 to 10 products or services the campaign promotes.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 5
                  },
                  "userKeywords": {
                    "description": "At most 100 keywords, none with a line break.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The project as edited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/holiday": {
      "put": {
        "tags": [
          "Seller account"
        ],
        "summary": "Set your holiday",
        "description": "Starts, changes or ends your holiday, as the holiday settings of your profile page do. While you are on holiday your medias take no orders. `endDate` is the day your holiday ends, at 00:00 of that day in Growwer's server time, and must be later than now; leave it out, or send null, for a holiday you end yourself. Ending the holiday takes no `endDate`.\n\nA holiday that already is as you ask is answered 200 without a change. A restricted seller account stays on holiday until the restriction is lifted, so any change is refused. Your holiday is also in GET /me.",
        "operationId": "putSellerHoliday",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "onHoliday"
                ],
                "properties": {
                  "onHoliday": {
                    "type": "boolean"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date",
                    "example": "2026-12-01",
                    "nullable": true
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your holiday, as it now is.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "onHoliday",
                    "endDate"
                  ],
                  "properties": {
                    "onHoliday": {
                      "type": "boolean"
                    },
                    "endDate": {
                      "description": "The day the holiday ends, at 00:00 of that day in Growwer's server time, or null for none.",
                      "type": "string",
                      "format": "date",
                      "nullable": true
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Your seller account is restricted, so its holiday cannot change (code `seller_restricted`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`): an `endDate` that is not a later day, or one sent with `onHoliday` false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/medias/{id}/apply-competitive-fees": {
      "post": {
        "tags": [
          "Seller medias"
        ],
        "summary": "Lower your fees to the competitive fees Growwer suggests",
        "description": "Lowers your post fees for the media to the competitive fees Growwer suggests, per link type. On each side, a fee above the highest whole-euro fee that lists the media at least 1 EUR below its cheapest price on the marketplaces Growwer compares with is lowered to that fee, and a link type that then still does not list the media at least 1 EUR below that price has one of its fees lowered by 1 EUR, which does. GET /seller/medias/{id} shows, per side, the highest fee this sets on that side as `competitiveFees`, and the fees it sets on each link type it lowers as `competitiveFeesByLinkType`. Only fees above their suggestion change: a fee is never raised, a cheaper link type keeps its fee, no link type gains a side it did not offer, and a side without a suggestion keeps your fee.\n\nWhen there is no suggestion (Growwer sets the media's prices, it is not listed on a marketplace Growwer compares with, it already lists below its price there, or no fee would bring it below), or your fees already are at or below the suggested ones, nothing changes and the answer is 200 with the media as it is.\n\nThe fees set are your base fees: a running flash offer keeps discounting them. As with a fee edit, a change of the price may cancel the managed-service proposals accepted for the media whose price it changes. When the fees set still list the media above the marketplaces that list the same domain cheaper, they are saved, and `warnings` holds a `saved_above_competitors` warning with the competitive fee of each side and the names of those marketplaces. Send no body, or an empty object.",
        "operationId": "applySellerMediaCompetitiveFees",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The media, with its fees above the suggested ones lowered to them, or unchanged and without a warning when there were none to lower; `warnings` holds one `saved_above_competitors` when the fees set still list it above the marketplaces that list the same domain cheaper.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerMediaSaved"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not empty, or the fees set break a rule of the media edit page (code `validation_failed`). Nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/medias": {
      "get": {
        "tags": [
          "Seller medias"
        ],
        "summary": "List the medias you sell on",
        "description": "Your medias in every state, with your fees and how they perform, newest first by default.",
        "operationId": "listSellerMedias",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Only the medias in one of these states, comma-separated: `analyzing`, `pending_review`, `active`, `deactivated`. An unknown state is refused with 422.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "active,deactivated"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "By creation date, number of published orders or publication rate; a leading `-` sorts descending. Medias with no publication rate come first ascending, last descending. Ties come in id order.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "-createdAt",
              "enum": [
                "-createdAt",
                "createdAt",
                "-numPublishedOrders",
                "numPublishedOrders",
                "-publicationRate",
                "publicationRate"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Medias per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Medias to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your medias and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerMedia"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Seller medias"
        ],
        "summary": "Register a media you sell on",
        "description": "Registers one of your medias, as the media create page does. The media is created with `state: pending_review` and Growwer reviews it in the background, as for a media registered on the web; GET /seller/medias/{id} shows its state.\n\n- `rootUrl` is the media's root URL; `typology` is `blog` or `press`.\n- `country` and `language` take the codes GET /vocabulary publishes; `topics` and `bannedTopics` take its topic ids, at most 100 each, and no topic may be both; `bannedTopics` left out bans none.\n- `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR, sent in cents.\n- `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising, `never` when left out; `postOffer.promotedSocialNetworks` the social networks posts are promoted on, none when left out.\n- `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; left out, `null` or an empty list offers none.\n- `extraServices` lists the extra services you offer, none when left out. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`.\n- `acceptMediaPublishingTerms` and `declareMediaOwnership` must be `true`: they accept the media publishing terms and declare that you own or manage the media, as the page's checkboxes do, and are recorded as your consents for the media.\n\nA media registered already, by you or by anyone else, is refused with 409 `media_already_registered`, and each such refusal counts toward a daily limit of refusals (429 `media_duplicate_limit_reached` once reached); medias not registered yet are never limited by it.\n\nTo register many medias, call this operation once per media, each call with its own `Idempotency-Key` and its own answer (201, 409, 422 or 429); there is no batch operation. The request limits apply to the loop as to any calls (600 requests per minute per user and 300 per key), and each 409 `media_already_registered` counts toward the daily limit of refusals as it does for a single call. Retry a call that got no answer with its same `Idempotency-Key`, as for any write.",
        "operationId": "createSellerMedia",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "rootUrl",
                  "typology",
                  "country",
                  "language",
                  "topics",
                  "postOffer",
                  "acceptMediaPublishingTerms",
                  "declareMediaOwnership"
                ],
                "properties": {
                  "rootUrl": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://www.example.com"
                  },
                  "typology": {
                    "type": "string",
                    "enum": [
                      "blog",
                      "press"
                    ]
                  },
                  "country": {
                    "description": "A country code from GET /vocabulary.",
                    "type": "string",
                    "example": "ES"
                  },
                  "language": {
                    "description": "A language code from GET /vocabulary.",
                    "type": "string",
                    "example": "es"
                  },
                  "topics": {
                    "description": "Topic ids from GET /vocabulary.",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "bannedTopics": {
                    "description": "The topic ids from GET /vocabulary the media refuses.",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "postOffer": {
                    "required": [
                      "pricingOptions",
                      "maximumLinks"
                    ],
                    "properties": {
                      "pricingOptions": {
                        "type": "array",
                        "items": {
                          "required": [
                            "linkType"
                          ],
                          "properties": {
                            "linkType": {
                              "type": "string",
                              "enum": [
                                "dofollow",
                                "nofollow",
                                "citation"
                              ]
                            },
                            "feeWhenSellerWritesPost": {
                              "description": "What you are paid for a post you write; null or left out when you do not offer it.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/MoneyOrNull"
                                }
                              ]
                            },
                            "feeWhenSellerDoesNotWritePost": {
                              "description": "What you are paid for a post the buyer or Growwer writes; null or left out when you do not offer it.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/MoneyOrNull"
                                }
                              ]
                            }
                          },
                          "type": "object"
                        },
                        "minItems": 1
                      },
                      "maximumLinks": {
                        "type": "integer",
                        "maximum": 4,
                        "minimum": 1
                      },
                      "advertisingLabellingPolicy": {
                        "type": "string",
                        "enum": [
                          "always",
                          "never"
                        ]
                      },
                      "promotedSocialNetworks": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "twitter",
                            "instagram",
                            "facebook",
                            "pinterest",
                            "tumblr",
                            "newsletter"
                          ]
                        },
                        "uniqueItems": true
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "linkAdditionOffer": {
                    "required": [
                      "pricingOptions"
                    ],
                    "properties": {
                      "pricingOptions": {
                        "type": "array",
                        "items": {
                          "required": [
                            "linkType",
                            "fee"
                          ],
                          "properties": {
                            "linkType": {
                              "type": "string",
                              "enum": [
                                "dofollow",
                                "nofollow",
                                "citation"
                              ]
                            },
                            "fee": {
                              "description": "Your base fee for adding a link of this type.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/Money"
                                }
                              ]
                            }
                          },
                          "type": "object"
                        }
                      }
                    },
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": false
                  },
                  "extraServices": {
                    "type": "array",
                    "items": {
                      "required": [
                        "name",
                        "cost"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "list_on_homepage",
                            "extra_charge_for_sensitive_topic"
                          ]
                        },
                        "cost": {
                          "description": "What you are paid for the extra service.",
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Money"
                            }
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "acceptMediaPublishingTerms": {
                    "description": "Must be true: you accept the media publishing terms.",
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "declareMediaOwnership": {
                    "description": "Must be true: you own or manage this media.",
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "example": {
                "rootUrl": "https://www.example.com",
                "typology": "blog",
                "country": "ES",
                "language": "es",
                "topics": [
                  3,
                  7
                ],
                "bannedTopics": [
                  12
                ],
                "postOffer": {
                  "pricingOptions": [
                    {
                      "linkType": "dofollow",
                      "feeWhenSellerWritesPost": {
                        "amount": 12000,
                        "currency": "EUR"
                      },
                      "feeWhenSellerDoesNotWritePost": {
                        "amount": 10000,
                        "currency": "EUR"
                      }
                    }
                  ],
                  "maximumLinks": 2,
                  "advertisingLabellingPolicy": "always",
                  "promotedSocialNetworks": [
                    "twitter"
                  ]
                },
                "linkAdditionOffer": {
                  "pricingOptions": [
                    {
                      "linkType": "dofollow",
                      "fee": {
                        "amount": 6000,
                        "currency": "EUR"
                      }
                    }
                  ]
                },
                "extraServices": [
                  {
                    "name": "list_on_homepage",
                    "cost": {
                      "amount": 5000,
                      "currency": "EUR"
                    }
                  }
                ],
                "acceptMediaPublishingTerms": true,
                "declareMediaOwnership": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The media, registered with `state: pending_review`. `Location` is its URL.",
            "headers": {
              "Location": {
                "description": "The URL of the new media.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerMedia"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Nothing was registered: your seller account is restricted (code `seller_restricted`); or the media is registered already (code `media_already_registered`), with `details.mediaId` naming it only when it is yours, and the refusal counts toward the daily limit of such refusals; or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`): `details.fields` names each field by its path in the body, such as `postOffer.pricingOptions.0.feeWhenSellerWritesPost` or `topics.1`, with the rule the media create page applies. Nothing was registered, and the refusal does not count toward the daily limit of `media_already_registered` refusals.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/medias/{id}": {
      "get": {
        "tags": [
          "Seller medias"
        ],
        "summary": "Get a media you sell on",
        "description": "One of your medias, with your fees, its extras, the competitive fees Growwer suggests and how it performs. Another seller's media is not found.",
        "operationId": "getSellerMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The media.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerMedia"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Seller medias"
        ],
        "summary": "Delete a media you sell on",
        "description": "Deletes one of your medias, in any state, as the media delete button does. The media must have no order in progress: close or reject its orders first. The API never cancels an order for you, and an order placed while the delete runs is refused, never cancelled.\n\nWhat goes with the media, as on the web:\n\n- A running flash offer ends with it, and its managed-service proposals are deleted.\n- Its finished orders stay, with the media's URL; they read `media.id` null.\n- Buyers' favourites and discards of the domain stay, as they are kept by domain.\n- The catalogue search drops the media shortly after the 204, as the search index updates asynchronously.\n\nRepeating the call with the same `Idempotency-Key` answers the same 204 with `Idempotent-Replayed: true`; a new key after the delete answers 404.",
        "operationId": "deleteSellerMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The media was deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Nothing was deleted. Your seller account is restricted (code `seller_restricted`); the media has orders that are not finished (code `media_has_active_orders`, `details.orderIds` lists them: close or reject them first); or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Seller medias"
        ],
        "summary": "Edit the offer of a media you sell on",
        "description": "Sets the fees, extra services, typology and post offer characteristics of one of your medias, as the media edit page saves them. Send only the fields you change: a field you send replaces that field wholly, a field you leave out stays as it is, inside `postOffer` too (sending only `postOffer.maximumLinks` keeps your fees).\n\n- `typology` is `blog` or `press`.\n- `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR.\n- `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising (`always` or `never`); `postOffer.promotedSocialNetworks` the full list of social networks posts are promoted on, each once (an empty list for none).\n- `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; `null` or an empty list stops offering link additions.\n- `extraServices` is the full list of extra services you offer; an empty list removes them all. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`.\n\nThe fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and `currentCost` shows the result. `currentCost` may be sent back as read and is ignored. Country, language, topics and comments are not edited here.\n\nAs on the page, a change of the post offer's price may cancel the managed-service proposals accepted for the media whose price it changes. Your fees are always saved, a raise included. When they list the media above the marketplaces that list the same domain cheaper and some fee would list it under them, the 200 carries a `saved_above_competitors` warning in `warnings`, with the competitive fee of each side and the names of those marketplaces. When such a save raises a fee, or adds a side or a link type, the warning is `saved_not_recommended` instead, with the same details: the media is not recommended in buyers' projects while it lists above them, and stays in the catalogue. A restricted seller account may edit its offer.",
        "operationId": "updateSellerMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "typology": {
                    "type": "string",
                    "enum": [
                      "blog",
                      "press"
                    ]
                  },
                  "postOffer": {
                    "properties": {
                      "pricingOptions": {
                        "type": "array",
                        "items": {
                          "required": [
                            "linkType"
                          ],
                          "properties": {
                            "linkType": {
                              "type": "string",
                              "enum": [
                                "dofollow",
                                "nofollow",
                                "citation"
                              ]
                            },
                            "feeWhenSellerWritesPost": {
                              "description": "What you are paid for a post you write; null or left out when you do not offer it.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/MoneyOrNull"
                                }
                              ]
                            },
                            "feeWhenSellerDoesNotWritePost": {
                              "description": "What you are paid for a post the buyer or Growwer writes; null or left out when you do not offer it.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/MoneyOrNull"
                                }
                              ]
                            }
                          },
                          "type": "object"
                        },
                        "minItems": 1
                      },
                      "maximumLinks": {
                        "type": "integer",
                        "maximum": 4,
                        "minimum": 1
                      },
                      "advertisingLabellingPolicy": {
                        "type": "string",
                        "enum": [
                          "always",
                          "never"
                        ]
                      },
                      "promotedSocialNetworks": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "twitter",
                            "instagram",
                            "facebook",
                            "pinterest",
                            "tumblr",
                            "newsletter"
                          ]
                        },
                        "uniqueItems": true
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "linkAdditionOffer": {
                    "required": [
                      "pricingOptions"
                    ],
                    "properties": {
                      "pricingOptions": {
                        "type": "array",
                        "items": {
                          "required": [
                            "linkType",
                            "fee"
                          ],
                          "properties": {
                            "linkType": {
                              "type": "string",
                              "enum": [
                                "dofollow",
                                "nofollow",
                                "citation"
                              ]
                            },
                            "fee": {
                              "description": "Your base fee for adding a link of this type.",
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/Money"
                                }
                              ]
                            }
                          },
                          "type": "object"
                        }
                      }
                    },
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": false
                  },
                  "extraServices": {
                    "type": "array",
                    "items": {
                      "required": [
                        "name",
                        "cost"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "list_on_homepage",
                            "extra_charge_for_sensitive_topic"
                          ]
                        },
                        "cost": {
                          "description": "What you are paid for the extra service.",
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Money"
                            }
                          ]
                        }
                      },
                      "type": "object"
                    }
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "example": {
                "typology": "blog",
                "postOffer": {
                  "maximumLinks": 2,
                  "advertisingLabellingPolicy": "always",
                  "promotedSocialNetworks": [
                    "twitter",
                    "newsletter"
                  ],
                  "pricingOptions": [
                    {
                      "linkType": "dofollow",
                      "feeWhenSellerWritesPost": {
                        "amount": 12000,
                        "currency": "EUR"
                      },
                      "feeWhenSellerDoesNotWritePost": {
                        "amount": 10000,
                        "currency": "EUR"
                      }
                    },
                    {
                      "linkType": "nofollow",
                      "feeWhenSellerWritesPost": {
                        "amount": 9000,
                        "currency": "EUR"
                      },
                      "feeWhenSellerDoesNotWritePost": {
                        "amount": 7000,
                        "currency": "EUR"
                      }
                    }
                  ]
                },
                "linkAdditionOffer": null,
                "extraServices": [
                  {
                    "name": "list_on_homepage",
                    "cost": {
                      "amount": 5000,
                      "currency": "EUR"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The media, with the changes saved, and `warnings`: one `saved_above_competitors` when it still lists above the marketplaces that list the same domain cheaper and some fee would list it under them, `saved_not_recommended` instead when the save raised a fee or added a side or a link type, none otherwise.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerMediaSaved"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`): `details.fields` names each field by its path in the body, such as `postOffer.pricingOptions.0.feeWhenSellerWritesPost`, with the rule the media edit page applies. Nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/seller/transactions/{id}/document": {
      "get": {
        "tags": [
          "Seller wallet"
        ],
        "summary": "Download the document of a seller wallet movement",
        "description": "The document Growwer attached to a movement of your seller wallet. 404 when the movement has none (`hasDocument` is false) or the file cannot be read.",
        "operationId": "downloadSellerTransactionDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The document, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/withdrawals/{id}/invoice": {
      "get": {
        "tags": [
          "Seller wallet"
        ],
        "summary": "Download the invoice of a withdrawal",
        "description": "The invoice you uploaded for one of your withdrawals, named `withdrawal-{id}-invoice.pdf`. 404 when the withdrawal has none (`hasInvoice` is false); 503 `storage_unavailable` when the file cannot be read right now.",
        "operationId": "downloadWithdrawalInvoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice file.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/seller": {
      "get": {
        "tags": [
          "Seller wallet"
        ],
        "summary": "Get your seller wallet",
        "description": "What your sales have earned: the balance you can withdraw now and what is held until orders settle. `restricted` is true while your seller account is restricted; the reason is not published here, and support can tell you more.",
        "operationId": "getSellerWallet",
        "responses": {
          "200": {
            "description": "Your seller wallet.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "balance",
                    "restricted"
                  ],
                  "properties": {
                    "balance": {
                      "$ref": "#/components/schemas/Balance"
                    },
                    "restricted": {
                      "description": "Whether your seller account is restricted.",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/seller/transactions": {
      "get": {
        "tags": [
          "Seller wallet"
        ],
        "summary": "List your seller wallet movements",
        "description": "Every movement of your seller wallet, newest first: earnings from orders, withdrawals and manual corrections. An earning names its order (`orderId`) and a withdrawal its request (`withdrawalId`).",
        "operationId": "listSellerTransactions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Movements per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Movements to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your movements and how many there are in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerTransaction"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/withdrawals": {
      "get": {
        "tags": [
          "Seller wallet"
        ],
        "summary": "List your withdrawals",
        "description": "The withdrawals you requested from your seller wallet, newest first. Requesting a withdrawal is not available through the API; use the seller wallet page.",
        "operationId": "listWithdrawals",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Only the withdrawals in one of these states, comma-separated: `started`, `approved`, `rejected`. An unknown state is refused with 422.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "started"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Withdrawals per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Withdrawals to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your withdrawals and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Withdrawal"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/accept": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Accept an order",
        "description": "Accepts an order placed on one of your medias (`state` `pending_acceptance`), as the web does. A post order whose draft is still to be written (by you or by Growwer) moves to `pending_draft`; any other order moves to `pending_order_delivery`. The buyer is told. Takes no body.",
        "operationId": "acceptSellerOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The order, accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not waiting for your acceptance (code `invalid_state`), your seller account is restricted and accepts no orders (code `seller_restricted`; support can tell you why), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/deliver": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Deliver an order",
        "description": "Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL without `<` or `>`, as the web does.",
        "operationId": "deliverSellerOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderPostDelivery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, delivered or scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not waiting for its delivery (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/deliver-draft": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Deliver a draft",
        "description": "Delivers the draft of a post order placed on one of your medias whose draft you write (`state` `pending_draft`), as the web does, from a file you uploaded with POST /files. The order moves to `pending_draft_review` when the buyer reviews drafts, otherwise to `pending_order_delivery`. The file is used up once the draft is delivered; a refused request leaves it usable.",
        "operationId": "deliverSellerOrderDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderDraftFile"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, with its draft delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not waiting for a draft you write (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid, or the file is not an odt, doc, docx or txt file of up to 8 MB (code `validation_failed`, with the messages of each field in `details.fields`), or `fileId` names no file you can use: it does not exist, has expired or was already used (code `file_unusable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/deliver-draft-update": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Deliver a draft update",
        "description": "Delivers the draft update the buyer asked for on a post order placed on one of your medias whose draft you write (`state` `pending_draft_update`), as the web does, from a file you uploaded with POST /files. The order moves back to `pending_draft_review`. The file is used up once the draft is delivered; a refused request leaves it usable.",
        "operationId": "deliverSellerOrderDraftUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderDraftFile"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, with its updated draft delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The buyer has not asked for an update of a draft you write (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid, or the file is not an odt, doc, docx or txt file of up to 8 MB (code `validation_failed`, with the messages of each field in `details.fields`), or `fileId` names no file you can use: it does not exist, has expired or was already used (code `file_unusable`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/deliver-update": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Deliver an update",
        "description": "Delivers the update the buyer asked for on an order placed on one of your medias (`state` `pending_order_delivery_update`), as the web does. A post order takes the URL of the published post, which may be the same as before, and the confirmation of its publication date; both must be sent. A link addition order takes no body, and any field is refused. The order moves back to `pending_order_delivery_review` and the buyer is asked to review it.",
        "operationId": "deliverSellerOrderUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderPostDelivery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, with the update delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The buyer has not asked for an update (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/briefing": {
      "get": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Download the draft the buyer attached to an order",
        "description": "The file the buyer attached to the briefing of a post order you sell. 404 when the order has none (`briefing.hasProposedDraft` is false) or the file cannot be read.",
        "operationId": "downloadSellerOrderBriefing",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/draft": {
      "get": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Download the draft of an order you sell",
        "description": "The file of the current draft of a post order you sell. 404 when the order has no draft file (`draft.hasFile` is false) or the file cannot be read. Earlier drafts are not available.",
        "operationId": "downloadSellerOrderDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}": {
      "get": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Get an order you sell",
        "description": "One order placed on one of your medias, with its briefing, its draft and its state history. An order you only bought is not found here; it is under GET /orders/{id}.",
        "operationId": "getSellerOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders": {
      "get": {
        "tags": [
          "Seller orders"
        ],
        "summary": "List the orders you sell",
        "description": "The orders placed on your medias, newest first by default. To follow them, poll with `sort=updatedAt` and `updatedSince` set to the `updatedAt` of the last order you saw: an order moves to the end of that list each time it changes state. The orders you bought are under GET /orders.",
        "operationId": "listSellerOrders",
        "parameters": [
          {
            "name": "mediaId",
            "in": "query",
            "description": "Only the orders on this media of yours.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the orders in one of these states, comma-separated. An unknown state is refused with 422 and the list of valid ones.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "pending_acceptance,pending_order_delivery"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "description": "Only the orders whose `updatedAt` is at or after this instant, an ISO-8601 date-time with its offset (send `+` as `%2B`).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "`-createdAt`, newest first, or `updatedAt`, least recently changed first. Orders of the same instant come in id order.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "-createdAt",
              "enum": [
                "-createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Orders per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Orders to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the orders you sell and how many match in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerOrder"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/refute-draft-update": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Refuse a draft update",
        "description": "Refuses the draft update the buyer asked for on a post order placed on one of your medias whose draft you write (`state` `pending_draft_update`), as the web does. The order moves back to `pending_draft_review` and the buyer is told your reason. A draft Growwer or the buyer writes cannot be refused here.",
        "operationId": "refuteSellerOrderDraftUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderRefutation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, with its draft back in review.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The buyer has not asked for an update of a draft you write, including when Growwer or the buyer writes the draft (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/refute-update": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Refuse an update",
        "description": "Refuses the update the buyer asked for on an order placed on one of your medias (`state` `pending_order_delivery_update`), as the web does. The order moves back to `pending_order_delivery_review` and the buyer is told your reason.",
        "operationId": "refuteSellerOrderUpdate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderRefutation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, back in review.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The buyer has not asked for an update (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/seller/orders/{id}/reject": {
      "post": {
        "tags": [
          "Seller orders"
        ],
        "summary": "Reject an order",
        "description": "Rejects an order placed on one of your medias that you have not accepted yet (`state` `pending_acceptance`), as the web does. The order moves to `rejected_by_seller`, its price returns to the buyer, and the buyer is told your reason.",
        "operationId": "rejectSellerOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOrderRejection"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order, rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellerOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order is not waiting for your acceptance (code `invalid_state`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/test-helpers/orders/{id}/advance": {
      "post": {
        "tags": [
          "Test helpers"
        ],
        "summary": "Advance a test order",
        "description": "Test keys only. Moves one of your test orders at once to `to`, without waiting for the simulated seller: `accepted` or `rejected` (by the seller, from `pending_acceptance`), `draft_delivered` (the sample draft, from `pending_draft` or `pending_draft_update`), `draft_update_requested` (as if you sent the draft back, from `pending_draft_review`), `published` (delivered for your review, from `pending_order_delivery`, `scheduled` or `pending_order_delivery_update`), `update_requested` (as if you sent the delivery back, from `pending_order_delivery_review`) or `cancelled_by_growwer` (from any state that is not finished). The order and your test wallet change as that move changes them live, a rejection or a cancellation refunding the price, and the simulated seller carries on from the new state. A post with a future `scheduledPublicationDate` waits in `scheduled` until that date once the simulated seller delivers it; `published` skips the wait. A target its state does not allow answers 409 `invalid_transition` with the targets it allows. A live key gets 403 `test_mode_only`.",
        "operationId": "advanceTestOrder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "to"
                ],
                "properties": {
                  "to": {
                    "description": "The state to move the test order to.",
                    "type": "string",
                    "enum": [
                      "accepted",
                      "rejected",
                      "published",
                      "update_requested",
                      "draft_delivered",
                      "draft_update_requested",
                      "cancelled_by_growwer"
                    ]
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The test order, moved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`), or it is a live key (code `test_mode_only`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The order's state does not allow `to` (code `invalid_transition`, with `details.validTargets`, the targets it allows, possibly none), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`): a `to` that is not one of the targets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/test-helpers/reset": {
      "post": {
        "tags": [
          "Test helpers"
        ],
        "summary": "Reset your test data",
        "description": "Test keys only. Deletes your test projects, orders and uploaded test files, and returns your test wallet to its opening balance of 1,000.00 EUR with no movements. Your API keys and webhook subscriptions stay, and nothing of your live account changes. It takes no body. A live key gets 403 `test_mode_only`.",
        "operationId": "resetTestData",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Your test data is deleted and your test wallet is back at 1,000.00 EUR."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`), or it is a live key (code `test_mode_only`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/test-helpers/wallet/top-up": {
      "post": {
        "tags": [
          "Test helpers"
        ],
        "summary": "Top up your test wallet",
        "description": "Test keys only. Credits your test wallet, the buyer wallet a test key spends from, with fictitious money: more than nothing and at most 10,000.00 EUR per call. It never touches your real wallets, takes no payment and issues no invoice; the movement shows in GET /wallets/buyer/transactions for a test key as a confirmed `deposit`. A live key gets 403 `test_mode_only`.",
        "operationId": "topUpTestWallet",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "description": "What to credit, in EUR: from 1 to 1000000 cents.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      }
                    ]
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your test wallet, credited.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "balance",
                    "topUpUrl"
                  ],
                  "properties": {
                    "balance": {
                      "$ref": "#/components/schemas/Balance"
                    },
                    "topUpUrl": {
                      "description": "The wallet page where a live buyer tops up, as GET /wallets/buyer gives it.",
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The key is read-only (code `insufficient_capability`), or it is a live key (code `test_mode_only`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`): an `amount` that is not EUR, not more than nothing, or above 10,000.00 EUR.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/buyer/transactions/{id}/document": {
      "get": {
        "tags": [
          "Buyer wallet"
        ],
        "summary": "Download the document of a wallet movement",
        "description": "The document Growwer attached to a movement of your buyer wallet. 404 when the movement has none (`hasDocument` is false) or the file cannot be read.",
        "operationId": "downloadBuyerTransactionDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The document, with its own content type and name.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/buyer": {
      "get": {
        "tags": [
          "Buyer wallet"
        ],
        "summary": "Get your buyer wallet",
        "description": "The balance you buy with, and the page where you top it up.",
        "operationId": "getBuyerWallet",
        "responses": {
          "200": {
            "description": "Your buyer wallet.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "balance",
                    "topUpUrl"
                  ],
                  "properties": {
                    "balance": {
                      "$ref": "#/components/schemas/Balance"
                    },
                    "topUpUrl": {
                      "description": "The wallet page, in your language (English when the web is not available in it), where you top up your balance.",
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/wallets/buyer/transactions": {
      "get": {
        "tags": [
          "Buyer wallet"
        ],
        "summary": "List your buyer wallet movements",
        "description": "Every movement of your buyer wallet, newest first: top-ups, order debits and their refunds, gifts and manual corrections.",
        "operationId": "listBuyerTransactions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Movements per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Movements to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your movements and how many there are in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Transaction"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List your webhook subscriptions",
        "description": "Your webhook subscriptions in the mode of the key, newest first, disabled ones included. A live key lists the live ones and a test key the test ones.",
        "operationId": "listWebhooks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Subscriptions per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Subscriptions to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your subscriptions and how many you have in all.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook subscription",
        "description": "Subscribes an HTTPS URL to the events you list. Growwer then POSTs each event to it, signed as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the `secret` this answer carries. The secret is shown only here and on POST /webhooks/{id}/rotate-secret: store it now. A replay of this request under its `Idempotency-Key` answers the subscription without it.\n\nThe URL must be HTTPS and its host must resolve to public addresses only: a loopback, private, link-local, multicast or metadata address is refused with 422 `webhook_url_not_public`, a host that does not resolve with 422 `webhook_url_unresolvable`. `lowBalanceThreshold` is required with `balance.low` and refused without it. An account has at most 20 subscriptions per mode. A test key subscribes in test mode: its subscriptions get the events of its test orders and test wallet, never live ones.",
        "operationId": "createWebhook",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "description": "An HTTPS URL of at most 2048 characters, without a backslash or credentials. Its host is an IP address or a domain name of two labels or more, such as hooks.example.com, with one trailing dot allowed; a single-label host such as localhost is refused (`validation_failed` on `url`). The host is checked, and resolved at each delivery, in lower case and with a Unicode name in punycode, the form a delivery connects to.",
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "events": {
                    "description": "The events to send, at least one.",
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEventType"
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "lowBalanceThreshold": {
                    "description": "With `balance.low`: the available buyer balance below which the event fires, in EUR.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      }
                    ]
                  },
                  "description": {
                    "description": "A note of yours, at most 255 characters.",
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The subscription and its signing secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The account already has 20 subscriptions in this mode (code `webhook_limit_reached`, with `details.limit`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`, also for a URL whose host is a single-label name), or the URL does not resolve or resolves to an address that is not public (codes `webhook_url_unresolvable`, `webhook_url_not_public`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook subscription",
        "description": "One of your webhook subscriptions, without its secret. A subscription of the other mode is not found.",
        "operationId": "getWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook subscription",
        "description": "Deletes one of your webhook subscriptions and its delivery log. Deliveries still pending are not sent.",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The subscription was deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Edit a webhook subscription",
        "description": "Changes only the fields you send. A new `url` is checked as on create. Dropping `balance.low` from `events` drops the threshold with it. `enabled: false` disables the subscription, which then gets no events; `enabled: true` enables it again, including one Growwer disabled because its endpoint answered 410 or failed for 5 days, and forgets its failures.",
        "operationId": "updateWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "url": {
                    "description": "An HTTPS URL of at most 2048 characters, without a backslash or credentials. Its host is an IP address or a domain name of two labels or more, such as hooks.example.com, with one trailing dot allowed; a single-label host such as localhost is refused (`validation_failed` on `url`). The host is checked, and resolved at each delivery, in lower case and with a Unicode name in punycode, the form a delivery connects to.",
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "events": {
                    "description": "The events to send, at least one; replaces the list.",
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEventType"
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "lowBalanceThreshold": {
                    "description": "With `balance.low`: the available buyer balance below which the event fires, in EUR. Null removes it.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/MoneyOrNull"
                      }
                    ]
                  },
                  "description": {
                    "description": "A note of yours, at most 255 characters. Null removes it.",
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  },
                  "enabled": {
                    "description": "Whether the subscription gets events.",
                    "type": "boolean"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The subscription as edited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "description": "The body is not valid (code `validation_failed`, also for a URL whose host is a single-label name), or the new URL does not resolve or resolves to an address that is not public (codes `webhook_url_unresolvable`, `webhook_url_not_public`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List the deliveries of a webhook subscription",
        "description": "The events sent to the subscription in the last 30 days, newest first, each with its status and its latest 10 attempts: when, the status code your endpoint answered, how long it took and the start of its response body. Older deliveries are deleted.",
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Deliveries per page, 1 to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Deliveries to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the deliveries and how many there are in the last 30 days.",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Redeliver a webhook event",
        "description": "Queues a delivery that has succeeded or failed again, in a new round of retries, and answers it. It sends the same event with the same `webhook-id`, so a consumer that dedupes by it handles it once. Deliveries are kept 30 days. A delivery still pending, being sent or waiting for its next retry, answers 409 `webhook_delivery_pending` and takes none of the hour's sends; so does a redelivery while the subscription has 10 test events and redeliveries pending, its limit for a redelivery, given in `details.limit`. The pending deliveries of events never redelivered do not count. A subscription takes at most 10 test events and redeliveries an hour: past them it answers 429 `webhook_send_limit_reached` with `Retry-After`. A disabled subscription answers 409 `webhook_disabled`.",
        "operationId": "redeliverWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "description": "The delivery.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The delivery, queued again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The subscription is disabled (code `webhook_disabled`), the delivery is still pending or the subscription already has 10 test events and redeliveries pending, its limit in `details.limit` (code `webhook_delivery_pending`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate a webhook secret",
        "description": "Gives the subscription a new signing secret and answers it: it is shown only here, so store it now. For 24 hours, until `previousSecretExpiresAt`, every delivery carries two signatures in `webhook-signature`, one with each secret, so you can switch without missing an event; after that only the new secret signs. A replay of this request under its `Idempotency-Key` answers the subscription without the secret.",
        "operationId": "rotateWebhookSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription and its new signing secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Another request rotated the secret at the same time and its secret is the one in force (code `webhook_secret_rotation_conflict`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Send a test event",
        "description": "Queues a `webhook.test` event for the subscription, whatever events it lists, and answers its delivery: follow it on GET /webhooks/{id}/deliveries. It is signed, retried and logged as any event. It normally supersedes the subscription's earlier test events still pending: their deliveries fail and are not retried, so a test right after fixing the endpoint does not wait behind them; one that cannot be failed then is failed by the next test. A subscription takes at most 10 test events and redeliveries an hour: past them it answers 429 `webhook_send_limit_reached` with `Retry-After`. A disabled subscription answers 409 `webhook_disabled`. A test event that cannot be recorded answers 503 `webhook_test_unavailable`: nothing was sent, the attempt counts toward the hourly limit, and a retry needs a new `Idempotency-Key`.",
        "operationId": "sendWebhookTest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The subscription.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The delivery of the test event, queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The subscription is disabled (code `webhook_disabled`), or the `Idempotency-Key` conflicts (codes `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "description": "A stable, machine-readable error code.",
            "type": "string",
            "example": "unauthorized"
          },
          "message": {
            "description": "A human-readable explanation. It may change.",
            "type": "string"
          },
          "requestId": {
            "description": "UUID v4 generated per request, or the `X-Request-Id` you sent. Quote it when reporting a problem.",
            "type": "string",
            "example": "9b2f6c1e-4d7a-4e3b-8a5f-2c1d0e9f7a64"
          },
          "details": {
            "description": "Extra data on some errors, such as the invalid fields of a validation_failed error.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "type": "object"
      },
      "Money": {
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "description": "Integer cents: 12500 is 125.00 EUR.",
            "type": "integer",
            "example": 12500
          },
          "currency": {
            "description": "ISO 4217 currency code.",
            "type": "string",
            "example": "EUR"
          },
          "amountDecimal": {
            "description": "Exact decimal of `amount` in major units: \"125.00\". An input may only echo it unchanged.",
            "type": "string",
            "readOnly": true,
            "example": "125.00"
          }
        },
        "type": "object"
      },
      "CodeName": {
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Balance": {
        "required": [
          "available",
          "pending"
        ],
        "properties": {
          "available": {
            "description": "What can be spent, or withdrawn, now.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "pending": {
            "description": "What is held until orders in progress settle.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          }
        },
        "type": "object"
      },
      "Project": {
        "required": [
          "id",
          "name",
          "rootUrl",
          "websiteType",
          "topics",
          "language",
          "country",
          "promotedProducts",
          "userKeywords",
          "state",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "description": "Your name for the project, or null when it has none.",
            "type": "string",
            "nullable": true
          },
          "rootUrl": {
            "description": "The website the project promotes. It cannot be changed once the project exists.",
            "type": "string",
            "format": "uri"
          },
          "websiteType": {
            "description": "What the website is: an online shop (`ecommerce`), a services business (`services`) or anything else (`other`).",
            "type": "string",
            "enum": [
              "ecommerce",
              "services",
              "other"
            ]
          },
          "topics": {
            "description": "The website's topic, as a topic id from GET /vocabulary. Exactly one.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "language": {
            "description": "The language of the campaign, as a language code from GET /vocabulary.",
            "type": "string",
            "example": "es"
          },
          "country": {
            "description": "The country the campaign targets, as a country code from GET /vocabulary, or null for worldwide.",
            "type": "string",
            "example": "ES",
            "nullable": true
          },
          "promotedProducts": {
            "description": "The products or services the campaign promotes, 5 to 10.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "userKeywords": {
            "description": "Keywords you want the campaign to target, at most 100.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "description": "`finished` once Growwer has recommended media for the project, `analyzing`\nuntil then. Analysis can take hours, and it never finishes when no medium\nmatches the project. Poll with backoff, and use `createdAt` to decide how\nlong to keep polling.\n",
            "type": "string",
            "enum": [
              "analyzing",
              "finished"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "MoneyOrNull": {
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "description": "Integer cents: 12500 is 125.00 EUR.",
            "type": "integer",
            "example": 12500
          },
          "currency": {
            "description": "ISO 4217 currency code.",
            "type": "string",
            "example": "EUR"
          },
          "amountDecimal": {
            "description": "Exact decimal of `amount` in major units: \"125.00\". An input may only echo it unchanged.",
            "type": "string",
            "readOnly": true,
            "example": "125.00"
          }
        },
        "type": "object",
        "nullable": true
      },
      "CatalogueOffer": {
        "required": [
          "price",
          "linkType",
          "prices",
          "previousPrice"
        ],
        "properties": {
          "price": {
            "description": "What you pay for the offer with its dearest link type, flash offer discount included.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "linkType": {
            "description": "The link type `price` is for.",
            "type": "string",
            "nullable": true,
            "enum": [
              "dofollow",
              "nofollow",
              "citation",
              null
            ]
          },
          "prices": {
            "description": "What you pay for each link type the offer gives, by link type.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Money"
            }
          },
          "previousPrice": {
            "description": "The highest price the offer has had, when `price` is more than 5% below it; otherwise null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          }
        },
        "type": "object"
      },
      "CatalogueOfferOrNull": {
        "required": [
          "price",
          "linkType",
          "prices",
          "previousPrice"
        ],
        "properties": {
          "price": {
            "description": "What you pay for the offer with its dearest link type, flash offer discount included.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "linkType": {
            "description": "The link type `price` is for.",
            "type": "string",
            "nullable": true,
            "enum": [
              "dofollow",
              "nofollow",
              "citation",
              null
            ]
          },
          "prices": {
            "description": "What you pay for each link type the offer gives, by link type.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Money"
            }
          },
          "previousPrice": {
            "description": "The highest price the offer has had, when `price` is more than 5% below it; otherwise null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          }
        },
        "type": "object",
        "nullable": true
      },
      "CataloguePostOffer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CatalogueOffer"
          },
          {
            "required": [
              "advertisingLabel",
              "promotedSocialNetworks",
              "extras"
            ],
            "properties": {
              "advertisingLabel": {
                "description": "Whether the media always labels posts as advertising.",
                "type": "boolean"
              },
              "promotedSocialNetworks": {
                "description": "Where the media promotes the post.",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "twitter",
                    "instagram",
                    "facebook",
                    "pinterest",
                    "tumblr",
                    "newsletter"
                  ]
                }
              },
              "extras": {
                "required": [
                  "homepageListing",
                  "sensitiveTopic"
                ],
                "properties": {
                  "homepageListing": {
                    "description": "What listing the post on the homepage costs, or null when the media does not offer it.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/MoneyOrNull"
                      }
                    ]
                  },
                  "sensitiveTopic": {
                    "required": [
                      "allowed",
                      "extraPrice"
                    ],
                    "properties": {
                      "allowed": {
                        "description": "Whether the media publishes on sensitive topics.",
                        "type": "boolean"
                      },
                      "extraPrice": {
                        "description": "What a post on a sensitive topic costs on top, or null when it costs nothing more.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/MoneyOrNull"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "CatalogueMedia": {
        "required": [
          "id",
          "domain",
          "type",
          "language",
          "country",
          "topics",
          "metrics",
          "positiveTrafficTrend",
          "bestSeller",
          "publicationRate",
          "averageDaysToPublication",
          "onHoliday",
          "flashOffer",
          "bestPrice",
          "postOffer",
          "linkAdditionOffer"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string",
            "example": "example.com"
          },
          "type": {
            "type": "string",
            "enum": [
              "blog",
              "press"
            ]
          },
          "language": {
            "description": "A language code, as in GET /vocabulary.",
            "type": "string"
          },
          "country": {
            "description": "A country code, as in GET /vocabulary, or null for none.",
            "type": "string",
            "nullable": true
          },
          "topics": {
            "description": "Topic ids, as in GET /vocabulary.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "metrics": {
            "description": "The latest measurements; each is null until it is first measured.",
            "required": [
              "organicTraffic",
              "domainRating",
              "referringDomains",
              "linkedDomains",
              "linkedToReferringRatio"
            ],
            "properties": {
              "organicTraffic": {
                "description": "Monthly organic traffic.",
                "type": "number",
                "nullable": true
              },
              "domainRating": {
                "type": "number",
                "nullable": true
              },
              "referringDomains": {
                "type": "number",
                "nullable": true
              },
              "linkedDomains": {
                "type": "number",
                "nullable": true
              },
              "linkedToReferringRatio": {
                "type": "number",
                "nullable": true
              }
            },
            "type": "object"
          },
          "positiveTrafficTrend": {
            "type": "boolean"
          },
          "bestSeller": {
            "type": "boolean"
          },
          "publicationRate": {
            "description": "The share of the media's orders that were published, in percent, or null without orders.",
            "type": "integer",
            "nullable": true
          },
          "averageDaysToPublication": {
            "description": "The average days from order to publication, or null without published orders.",
            "type": "integer",
            "nullable": true
          },
          "onHoliday": {
            "description": "Whether the media is on holiday and will take longer to publish.",
            "type": "boolean"
          },
          "flashOffer": {
            "description": "The flash offer running, or null. Its discount is already in the prices.",
            "required": [
              "discountPercent",
              "endsAt"
            ],
            "properties": {
              "discountPercent": {
                "type": "integer"
              },
              "endsAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "type": "object",
            "nullable": true
          },
          "bestPrice": {
            "description": "The best-price badge the catalogue shows, or null for none: cheaper means the price is at least 1 EUR below the cheapest listing of the media found on the other platforms checked in the last 7 days; only_here means none of the platforms checked lists it. It names neither the platforms nor any price.",
            "required": [
              "badge",
              "platformCount",
              "checkedOn"
            ],
            "properties": {
              "badge": {
                "type": "string",
                "enum": [
                  "cheaper",
                  "only_here"
                ]
              },
              "platformCount": {
                "description": "How many platforms the claim was checked against.",
                "type": "integer",
                "minimum": 1
              },
              "checkedOn": {
                "description": "The day of that check.",
                "type": "string",
                "format": "date"
              }
            },
            "type": "object",
            "nullable": true
          },
          "postOffer": {
            "$ref": "#/components/schemas/CataloguePostOffer"
          },
          "linkAdditionOffer": {
            "description": "Adding a link to an existing article, or null when the media does not offer it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CatalogueOfferOrNull"
              }
            ]
          }
        },
        "type": "object"
      },
      "ProjectCatalogueMedia": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CatalogueMedia"
          },
          {
            "required": [
              "project"
            ],
            "properties": {
              "project": {
                "description": "The media's state in the project, and the AI keywords the web lists for the media in this project.",
                "required": [
                  "favourite",
                  "discarded",
                  "requested",
                  "recommended",
                  "bought",
                  "new",
                  "aiKeywords"
                ],
                "properties": {
                  "favourite": {
                    "type": "boolean"
                  },
                  "discarded": {
                    "type": "boolean"
                  },
                  "requested": {
                    "type": "boolean"
                  },
                  "recommended": {
                    "description": "Growwer recommends the media for the project.",
                    "type": "boolean"
                  },
                  "bought": {
                    "description": "You have ordered on the media for the project.",
                    "type": "boolean"
                  },
                  "new": {
                    "description": "Growwer matched the media with the project recently.",
                    "type": "boolean"
                  },
                  "aiKeywords": {
                    "description": "The AI keywords the web lists for the media in this project, one entry per keyword of each stored source, empty when there are none. Keywords an AI answer gave without referencing any domain may be listed for every media of the project, so an entry does not mean that the engine cited the media. Entries keep their order within an engine, and a keyword listed by two engines appears once for each; the order of the engines is not promised.",
                    "type": "array",
                    "items": {
                      "required": [
                        "keyword",
                        "source"
                      ],
                      "properties": {
                        "keyword": {
                          "type": "string"
                        },
                        "source": {
                          "description": "The AI engine that gave the keyword, as the `ranksAiKeyword` filter names it, or null for an engine it does not name. It is never where the media comes from.",
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "googleAiOverview",
                            "chatgpt",
                            "googleAiMode",
                            null
                          ]
                        }
                      },
                      "type": "object"
                    }
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        ]
      },
      "SellerFees": {
        "required": [
          "feeWhenSellerWritesPost",
          "feeWhenSellerDoesNotWritePost"
        ],
        "properties": {
          "feeWhenSellerWritesPost": {
            "description": "What you are paid for a post you write, or null when you do not offer it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          },
          "feeWhenSellerDoesNotWritePost": {
            "description": "What you are paid for a post the buyer or Growwer writes, or null when you do not offer it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          }
        },
        "type": "object"
      },
      "SellerFeesOrNull": {
        "required": [
          "feeWhenSellerWritesPost",
          "feeWhenSellerDoesNotWritePost"
        ],
        "properties": {
          "feeWhenSellerWritesPost": {
            "description": "What you are paid for a post you write, or null when you do not offer it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          },
          "feeWhenSellerDoesNotWritePost": {
            "description": "What you are paid for a post the buyer or Growwer writes, or null when you do not offer it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          }
        },
        "type": "object",
        "nullable": true
      },
      "SellerMedia": {
        "description": "One of your medias, as its seller sees it.",
        "required": [
          "id",
          "domain",
          "url",
          "typology",
          "state",
          "deactivationStrikes",
          "country",
          "language",
          "topics",
          "bannedTopics",
          "providerComments",
          "publicationRate",
          "averageDaysToPublication",
          "numPublishedOrders",
          "onHoliday",
          "flashOffer",
          "postOffer",
          "linkAdditionOffer",
          "competitiveFees",
          "competitiveFeesByLinkType",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string",
            "example": "example.com"
          },
          "url": {
            "description": "The media's root URL.",
            "type": "string"
          },
          "typology": {
            "type": "string",
            "enum": [
              "blog",
              "press"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "analyzing",
              "pending_review",
              "active",
              "deactivated"
            ]
          },
          "deactivationStrikes": {
            "description": "How many times the media was deactivated for not publishing.",
            "type": "integer"
          },
          "country": {
            "description": "A country code, as in GET /vocabulary, or null for none.",
            "type": "string",
            "nullable": true
          },
          "language": {
            "description": "A language code, as in GET /vocabulary.",
            "type": "string"
          },
          "topics": {
            "description": "Topic ids, as in GET /vocabulary.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "bannedTopics": {
            "description": "The topic ids the media refuses, as in GET /vocabulary.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "providerComments": {
            "description": "Your notes for buyers, or null for none.",
            "type": "string",
            "nullable": true
          },
          "publicationRate": {
            "description": "The share of the media's orders that were published, in percent, or null without orders.",
            "type": "integer",
            "nullable": true
          },
          "averageDaysToPublication": {
            "description": "The average days from order to publication, or null without published orders.",
            "type": "integer",
            "nullable": true
          },
          "numPublishedOrders": {
            "type": "integer"
          },
          "onHoliday": {
            "type": "boolean"
          },
          "flashOffer": {
            "description": "The flash offer running, or null. Its discount is in `currentCost`, never in the fees.",
            "required": [
              "discountPercent",
              "endsAt"
            ],
            "properties": {
              "discountPercent": {
                "type": "integer"
              },
              "endsAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "type": "object",
            "nullable": true
          },
          "postOffer": {
            "required": [
              "pricingOptions",
              "maximumLinks",
              "advertisingLabellingPolicy",
              "promotedSocialNetworks",
              "extraServices"
            ],
            "properties": {
              "pricingOptions": {
                "description": "One entry per link type you offer.",
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SellerFees"
                    },
                    {
                      "required": [
                        "linkType",
                        "currentCost"
                      ],
                      "properties": {
                        "linkType": {
                          "type": "string",
                          "enum": [
                            "dofollow",
                            "nofollow",
                            "citation"
                          ]
                        },
                        "currentCost": {
                          "description": "What you are paid now for the link type, flash offer discount included; read-only. Null when the link type has no current pricing.",
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/MoneyOrNull"
                            }
                          ]
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              },
              "maximumLinks": {
                "description": "How many links a sponsored post may hold, 1 to 4.",
                "type": "integer"
              },
              "advertisingLabellingPolicy": {
                "description": "Whether sponsored posts are labelled as advertising.",
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              "promotedSocialNetworks": {
                "description": "The social networks sponsored posts are promoted on.",
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "twitter",
                    "instagram",
                    "facebook",
                    "pinterest",
                    "tumblr",
                    "newsletter"
                  ]
                }
              },
              "extraServices": {
                "description": "Read here, but PATCH /seller/medias/{id} and POST /seller/medias take it at the top level of the body.",
                "type": "array",
                "items": {
                  "required": [
                    "name",
                    "cost"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "list_on_homepage",
                        "extra_charge_for_sensitive_topic"
                      ]
                    },
                    "cost": {
                      "description": "What you are paid for the extra service.",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "type": "object"
          },
          "linkAdditionOffer": {
            "description": "Adding a link to an existing article, or null when you do not offer it.",
            "required": [
              "pricingOptions"
            ],
            "properties": {
              "pricingOptions": {
                "type": "array",
                "items": {
                  "required": [
                    "linkType",
                    "fee",
                    "currentCost"
                  ],
                  "properties": {
                    "linkType": {
                      "type": "string",
                      "enum": [
                        "dofollow",
                        "nofollow",
                        "citation"
                      ]
                    },
                    "fee": {
                      "description": "Your base fee for the link type.",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        }
                      ]
                    },
                    "currentCost": {
                      "description": "What you are paid now for the link type, flash offer discount included; read-only.",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/MoneyOrNull"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "type": "object",
            "nullable": true
          },
          "competitiveFees": {
            "description": "The post fees Growwer suggests to sell more, as the seller media pages do, or null when it suggests none: for each side, the highest fee POST /seller/medias/{id}/apply-competitive-fees would set on that side, else null. The apply lowers, per link type, a fee above the highest whole-euro fee that lists the media at least 1 EUR below its cheapest price on the marketplaces Growwer compares with to that fee, and lowers by 1 EUR one fee of a link type that then still does not list the media at least 1 EUR below that price. It never raises a fee. Where it lowers several link types, this is the highest per side across them, so a link type's own new fee can be lower: `competitiveFeesByLinkType` gives the fees the apply sets on each link type.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SellerFeesOrNull"
              }
            ]
          },
          "competitiveFeesByLinkType": {
            "description": "The fees POST /seller/medias/{id}/apply-competitive-fees would set, per link type: one entry per link type it lowers, in the order dofollow, nofollow, citation, or null when it suggests none (exactly when `competitiveFees` is null). Per side, the highest of these is `competitiveFees`.",
            "type": "array",
            "items": {
              "required": [
                "linkType",
                "feeWhenSellerWritesPost",
                "feeWhenSellerDoesNotWritePost"
              ],
              "properties": {
                "linkType": {
                  "type": "string",
                  "enum": [
                    "dofollow",
                    "nofollow",
                    "citation"
                  ]
                },
                "feeWhenSellerWritesPost": {
                  "description": "The fee the apply sets for a post you write on this link type, or null when it keeps your fee on that side.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MoneyOrNull"
                    }
                  ]
                },
                "feeWhenSellerDoesNotWritePost": {
                  "description": "The fee the apply sets for a post the buyer or Growwer writes on this link type, or null when it keeps your fee on that side.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MoneyOrNull"
                    }
                  ]
                }
              },
              "type": "object"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "SellerMediaSaved": {
        "description": "A media you sell on as a write answers it (PATCH /seller/medias/{id} and POST /seller/medias/{id}/apply-competitive-fees), with the warnings about the save. GET and the list answer SellerMedia, without them.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/SellerMedia"
          },
          {
            "required": [
              "warnings"
            ],
            "properties": {
              "warnings": {
                "description": "What the save left to know, empty when nothing. `saved_above_competitors`: the fees were saved, but the media still lists above the marketplaces that list the same domain cheaper, and some fee would list it under them. `saved_not_recommended`: the same, for a save that raised a fee or added a side or link type: the media is not recommended in buyers' projects while it lists above them, and stays in the catalogue. `details.competitiveFees` holds the highest fee of each side that lists it under them (`feeWhenSellerWritesPost`, `feeWhenSellerDoesNotWritePost`, null when none does or the media does not offer that side) and `details.competitors` the names of those marketplaces, never their prices.",
                "type": "array",
                "items": {
                  "required": [
                    "code",
                    "message",
                    "details"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "saved_above_competitors",
                        "saved_not_recommended"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "example": "Saved. The media still lists above the marketplaces that list the same domain cheaper. Setting the fees at most at the competitive fees in details lists it under them."
                    },
                    "details": {
                      "required": [
                        "competitiveFees",
                        "competitors"
                      ],
                      "properties": {
                        "competitiveFees": {
                          "required": [
                            "feeWhenSellerWritesPost",
                            "feeWhenSellerDoesNotWritePost"
                          ],
                          "properties": {
                            "feeWhenSellerWritesPost": {
                              "$ref": "#/components/schemas/MoneyOrNull"
                            },
                            "feeWhenSellerDoesNotWritePost": {
                              "$ref": "#/components/schemas/MoneyOrNull"
                            }
                          },
                          "type": "object"
                        },
                        "competitors": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "Prensalink"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "type": "object"
          }
        ]
      },
      "SavedFilter": {
        "required": [
          "id",
          "name",
          "activeFilterCount",
          "notifications",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "activeFilterCount": {
            "description": "How many filters it applies.",
            "type": "integer"
          },
          "notifications": {
            "required": [
              "enabled",
              "frequency"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "frequency": {
                "description": "How often Growwer emails new matching medias, or null when it does not.",
                "type": "string",
                "nullable": true,
                "enum": [
                  "instant",
                  "daily",
                  "weekly",
                  "monthly",
                  null
                ]
              }
            },
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "WebhookEventType": {
        "description": "An event a subscription can list. `webhook.test` is sent only by POST /webhooks/{id}/test and cannot be listed.",
        "type": "string",
        "enum": [
          "order.created",
          "order.accepted",
          "order.rejected",
          "order.published",
          "order.update_requested",
          "order.completed",
          "order.cancelled",
          "balance.low"
        ]
      },
      "Webhook": {
        "required": [
          "id",
          "url",
          "events",
          "lowBalanceThreshold",
          "description",
          "enabled",
          "disabledReason",
          "failingSince",
          "previousSecretExpiresAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            }
          },
          "lowBalanceThreshold": {
            "description": "With `balance.low`, the available buyer balance below which it fires; null otherwise.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "description": "Whether the subscription gets events.",
            "type": "boolean"
          },
          "disabledReason": {
            "description": "Why it is disabled, null while enabled. `by_user`, through PATCH /webhooks/{id}; `endpoint_gone`, its endpoint answered 410; `failing`, every delivery failed for 5 days, and the account owner was emailed.",
            "type": "string",
            "nullable": true,
            "enum": [
              "by_user",
              "endpoint_gone",
              "failing",
              null
            ]
          },
          "failingSince": {
            "description": "Since when its deliveries have failed without one succeeding, null while they succeed. At 5 days it is disabled. The check runs at each failed attempt, so a subscription whose `failingSince` is already more than 5 days old, say one that had no event for a while, is disabled at its next failed attempt, without the retries that delivery would otherwise get.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "previousSecretExpiresAt": {
            "description": "Until when the secret replaced by the last rotation still signs beside the new one, null when it no longer does.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "WebhookWithSecret": {
        "description": "A subscription with its signing secret, which only create and rotate-secret answer.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Webhook"
          },
          {
            "properties": {
              "secret": {
                "description": "The signing secret, `whsec_` and the base64 of 32 random bytes. Shown only in this answer, and absent when the request is replayed under its `Idempotency-Key` (or the MCP tool under its `requestId`), since the secret is never stored.",
                "type": "string",
                "example": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
              }
            },
            "type": "object"
          }
        ]
      },
      "WebhookDeliveryAttempt": {
        "required": [
          "attemptedAt",
          "statusCode",
          "durationMs",
          "responseBody",
          "error"
        ],
        "properties": {
          "attemptedAt": {
            "type": "string",
            "format": "date-time"
          },
          "statusCode": {
            "description": "The HTTP status your endpoint answered, null when it did not answer. Only 2xx succeeds; a redirect is not followed and fails.",
            "type": "integer",
            "nullable": true
          },
          "durationMs": {
            "description": "How long the attempt took, in milliseconds. It gives up after 15 seconds.",
            "type": "integer"
          },
          "responseBody": {
            "description": "Up to the first 1024 bytes of the response body, null when it did not answer.",
            "type": "string",
            "nullable": true
          },
          "error": {
            "description": "Why there is no status, null when it answered. `address_not_allowed`, its host resolved to, or connected to, an address that is not public.",
            "type": "string",
            "nullable": true,
            "enum": [
              "address_not_allowed",
              "timeout",
              "connection_failed",
              null
            ]
          }
        },
        "type": "object"
      },
      "WebhookDelivery": {
        "required": [
          "id",
          "eventId",
          "eventType",
          "status",
          "attemptCount",
          "nextAttemptAt",
          "createdAt",
          "attempts"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "description": "The event's id, sent as `webhook-id` on every attempt and redelivery.",
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "order.created",
              "order.accepted",
              "order.rejected",
              "order.published",
              "order.update_requested",
              "order.completed",
              "order.cancelled",
              "balance.low",
              "webhook.test"
            ]
          },
          "status": {
            "description": "`pending` while it is sent or retried, `succeeded` once an attempt got a 2xx, `failed` once the retries ran out, the endpoint answered 410 or the subscription was disabled.",
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed"
            ]
          },
          "attemptCount": {
            "description": "How many attempts it took, redeliveries included.",
            "type": "integer"
          },
          "nextAttemptAt": {
            "description": "When the next retry is due, null when none is.",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "attempts": {
            "description": "The latest 10 attempts, newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryAttempt"
            }
          }
        },
        "type": "object"
      },
      "WebhookEvent": {
        "description": "What Growwer POSTs to a subscription's URL. OpenAPI 3.0, which this document follows, has no `webhooks` section: `x-webhooks` lists each event in the shape of OpenAPI 3.1's, with this envelope and the event's `data`. The headers are Standard Webhooks': `webhook-id` (the event's `id`, the same on every retry and redelivery), `webhook-timestamp` (Unix seconds of the attempt) and `webhook-signature`, space-separated `v1,<base64>` entries, each an HMAC-SHA256 with a secret's bytes (the base64 after `whsec_`) over `webhook-id.webhook-timestamp.body`; for 24 hours after a rotation there are two. Answer 2xx within 15 seconds; anything else, a redirect included, is retried with jitter, up to 10 attempts within 72 hours of the first, honouring `Retry-After` on 429 and 503 within those 72 hours. Events are delivered at least once and in no guaranteed order: dedupe by `webhook-id` and order by `createdAt`.",
        "required": [
          "id",
          "type",
          "createdAt",
          "apiVersion",
          "mode",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "order.created",
              "order.accepted",
              "order.rejected",
              "order.published",
              "order.update_requested",
              "order.completed",
              "order.cancelled",
              "balance.low",
              "webhook.test"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "apiVersion": {
            "type": "string",
            "enum": [
              "v1"
            ]
          },
          "mode": {
            "description": "The mode of the subscription it is sent to.",
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "data": {
            "description": "What the event is about: an OrderEventData for the `order.*` events, a BalanceLowEventData for `balance.low` and a WebhookTestEventData for `webhook.test`.",
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrderEventData"
              },
              {
                "$ref": "#/components/schemas/BalanceLowEventData"
              },
              {
                "$ref": "#/components/schemas/WebhookTestEventData"
              }
            ]
          }
        },
        "type": "object"
      },
      "OrderEventData": {
        "description": "The `data` of an `order.*` event: the order as GET /orders/{id} answers it at the time of the event. Order by its `updatedAt` when events arrive out of order.",
        "required": [
          "order"
        ],
        "properties": {
          "order": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object"
      },
      "BalanceLowEventData": {
        "description": "The `data` of a `balance.low` event.",
        "required": [
          "wallet",
          "threshold"
        ],
        "properties": {
          "wallet": {
            "description": "Your buyer wallet once the debit was made.",
            "required": [
              "availableBalance",
              "currency"
            ],
            "properties": {
              "availableBalance": {
                "$ref": "#/components/schemas/Money"
              },
              "currency": {
                "description": "The currency of the wallet.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": "object"
          },
          "threshold": {
            "description": "The subscription's `lowBalanceThreshold` that the balance dropped below.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          }
        },
        "type": "object"
      },
      "WebhookTestEventData": {
        "description": "The `data` of a `webhook.test` event.",
        "required": [
          "webhookId"
        ],
        "properties": {
          "webhookId": {
            "description": "The subscription it was sent to.",
            "type": "string",
            "format": "uuid"
          }
        },
        "type": "object"
      },
      "OrderLink": {
        "required": [
          "targetUrl",
          "anchor",
          "type"
        ],
        "properties": {
          "targetUrl": {
            "description": "Where the link points, or null for a citation.",
            "type": "string",
            "nullable": true
          },
          "anchor": {
            "description": "The anchor text, or null when the media chooses it. A citation always has one.",
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "dofollow",
              "nofollow",
              "citation"
            ]
          }
        },
        "type": "object"
      },
      "PostOrderBriefing": {
        "description": "The briefing of a post order (`type` `post`).",
        "required": [
          "title",
          "language",
          "links",
          "extraServices",
          "additionalInfo",
          "hasProposedDraft"
        ],
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "description": "The language code of the article.",
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLink"
            }
          },
          "extraServices": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "list_on_homepage",
                "extra_charge_for_sensitive_topic"
              ]
            }
          },
          "additionalInfo": {
            "type": "string",
            "nullable": true
          },
          "hasProposedDraft": {
            "description": "Whether you attached your own draft; GET /orders/{id}/briefing downloads it.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "LinkAdditionOrderBriefing": {
        "description": "The briefing of a link addition (`type` `link_addition`).",
        "required": [
          "linkingFrom",
          "link",
          "additionalInfo"
        ],
        "properties": {
          "linkingFrom": {
            "description": "The existing article of the media the link goes into.",
            "type": "string"
          },
          "link": {
            "$ref": "#/components/schemas/OrderLink"
          },
          "additionalInfo": {
            "type": "string",
            "nullable": true
          }
        },
        "type": "object"
      },
      "Order": {
        "required": [
          "id",
          "reference",
          "type",
          "state",
          "pendingAction",
          "price",
          "project",
          "media",
          "createdAt",
          "updatedAt",
          "scheduledPublicationDate",
          "delivery",
          "briefing",
          "draft",
          "stateHistory",
          "channel"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "post",
              "link_addition"
            ]
          },
          "state": {
            "description": "The raw state name. GET /orders documents the values its `state` filter takes.",
            "type": "string"
          },
          "pendingAction": {
            "description": "Who the order is waiting on, or null when it waits on no one.",
            "type": "string",
            "nullable": true,
            "enum": [
              "buyer",
              "seller",
              "growwer",
              null
            ]
          },
          "price": {
            "description": "What you pay for the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "project": {
            "required": [
              "id",
              "url"
            ],
            "properties": {
              "id": {
                "description": "Null once the project is deleted.",
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "url": {
                "description": "The project's URL when the order was placed.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "media": {
            "required": [
              "id",
              "url"
            ],
            "properties": {
              "id": {
                "description": "Null once the media is deleted.",
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "url": {
                "description": "The media's URL when the order was placed.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "When the order last changed state. It changes on state changes only, so poll with GET /orders?updatedSince= on it.",
            "type": "string",
            "format": "date-time"
          },
          "scheduledPublicationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "delivery": {
            "description": "Where the order was published, once it is.",
            "required": [
              "url",
              "publishedAt"
            ],
            "properties": {
              "url": {
                "description": "The published article, or for a link addition the article the link went into.",
                "type": "string"
              },
              "publishedAt": {
                "description": "When the post was published; null for a link addition.",
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            },
            "type": "object",
            "nullable": true
          },
          "briefing": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PostOrderBriefing"
              },
              {
                "$ref": "#/components/schemas/LinkAdditionOrderBriefing"
              }
            ]
          },
          "draft": {
            "description": "The draft of a post order that has one; null otherwise, and always for a link addition.",
            "required": [
              "authoredByBuyer",
              "reviewable",
              "hasFile"
            ],
            "properties": {
              "authoredByBuyer": {
                "description": "Whether you write the draft.",
                "type": "boolean"
              },
              "reviewable": {
                "description": "Whether you review the draft before it is published.",
                "type": "boolean"
              },
              "hasFile": {
                "description": "Whether the current draft has a file; GET /orders/{id}/draft downloads it.",
                "type": "boolean"
              }
            },
            "type": "object",
            "nullable": true
          },
          "stateHistory": {
            "description": "Every state change, oldest first.",
            "type": "array",
            "items": {
              "required": [
                "state",
                "date",
                "reason"
              ],
              "properties": {
                "state": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "reason": {
                  "required": [
                    "code",
                    "additionalInfo"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "other_reasons",
                        "media_is_competition",
                        "media_has_exclusivity",
                        "forbidden_topic",
                        "no_seller_response",
                        "not_available_media"
                      ]
                    },
                    "additionalInfo": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "type": "object",
                  "nullable": true
                }
              },
              "type": "object"
            }
          },
          "channel": {
            "required": [
              "created"
            ],
            "properties": {
              "created": {
                "description": "Whether the order was placed through this API (`api`), through its MCP server (`mcp`) or on the web.",
                "type": "string",
                "enum": [
                  "api",
                  "mcp",
                  "web"
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "SellerPostOrderBriefing": {
        "description": "The briefing of a post order (`type` `post`), as you, the seller, receive it.",
        "required": [
          "title",
          "language",
          "links",
          "extraServices",
          "additionalInfo",
          "writtenBy",
          "hasProposedDraft"
        ],
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "description": "The language code of the article.",
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLink"
            }
          },
          "extraServices": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "list_on_homepage",
                "extra_charge_for_sensitive_topic"
              ]
            }
          },
          "additionalInfo": {
            "type": "string",
            "nullable": true
          },
          "writtenBy": {
            "description": "Who writes the article; `seller` means you do.",
            "type": "string",
            "enum": [
              "seller",
              "buyer",
              "growwer"
            ]
          },
          "hasProposedDraft": {
            "description": "Whether the buyer attached a draft; GET /seller/orders/{id}/briefing downloads it.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SellerOrder": {
        "description": "An order placed on one of your medias, as its seller sees it.",
        "required": [
          "id",
          "reference",
          "type",
          "state",
          "requiresYourAction",
          "availableActions",
          "earnings",
          "project",
          "media",
          "createdAt",
          "updatedAt",
          "scheduledPublicationDate",
          "delivery",
          "briefing",
          "draft",
          "stateHistory",
          "channel"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "post",
              "link_addition"
            ]
          },
          "state": {
            "description": "The raw state name. GET /seller/orders documents the values its `state` filter takes.",
            "type": "string"
          },
          "requiresYourAction": {
            "description": "Whether the order waits on you, as the seller order list marks it.",
            "type": "boolean"
          },
          "availableActions": {
            "description": "The seller actions the order allows now.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "accept",
                "reject",
                "deliver",
                "deliver-update",
                "refute-update",
                "deliver-draft",
                "deliver-draft-update",
                "refute-draft-update"
              ]
            }
          },
          "earnings": {
            "description": "What you are paid for the order, credited to your seller wallet once it settles.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "project": {
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "description": "The URL the buyer promotes, as recorded when the order was placed.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "media": {
            "required": [
              "id",
              "url"
            ],
            "properties": {
              "id": {
                "description": "Null once the media is deleted.",
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "url": {
                "description": "The media's URL when the order was placed.",
                "type": "string"
              }
            },
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "When the order last changed state. It changes on state changes only, so poll with GET /seller/orders?updatedSince= on it.",
            "type": "string",
            "format": "date-time"
          },
          "scheduledPublicationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "delivery": {
            "description": "Where the order was published, once it is.",
            "required": [
              "url",
              "publishedAt"
            ],
            "properties": {
              "url": {
                "description": "The published article, or for a link addition the article the link went into.",
                "type": "string"
              },
              "publishedAt": {
                "description": "When the post was published; null for a link addition.",
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            },
            "type": "object",
            "nullable": true
          },
          "briefing": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SellerPostOrderBriefing"
              },
              {
                "$ref": "#/components/schemas/LinkAdditionOrderBriefing"
              }
            ]
          },
          "draft": {
            "description": "The draft of a post order that has one; null otherwise, and always for a link addition.",
            "required": [
              "reviewable",
              "hasFile"
            ],
            "properties": {
              "reviewable": {
                "description": "Whether the buyer reviews the draft before it is published.",
                "type": "boolean"
              },
              "hasFile": {
                "description": "Whether the current draft has a file; GET /seller/orders/{id}/draft downloads it.",
                "type": "boolean"
              }
            },
            "type": "object",
            "nullable": true
          },
          "stateHistory": {
            "description": "Every state change, oldest first.",
            "type": "array",
            "items": {
              "required": [
                "state",
                "date",
                "reason"
              ],
              "properties": {
                "state": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "reason": {
                  "required": [
                    "code",
                    "additionalInfo"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "other_reasons",
                        "media_is_competition",
                        "media_has_exclusivity",
                        "forbidden_topic",
                        "no_seller_response",
                        "not_available_media"
                      ]
                    },
                    "additionalInfo": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "type": "object",
                  "nullable": true
                }
              },
              "type": "object"
            }
          },
          "channel": {
            "required": [
              "created",
              "accepted"
            ],
            "properties": {
              "created": {
                "description": "Whether the order was placed through this API (`api`), through its MCP server (`mcp`) or on the web.",
                "type": "string",
                "enum": [
                  "api",
                  "mcp",
                  "web"
                ]
              },
              "accepted": {
                "description": "Whether you accepted the order through this API (`api`), through its MCP server (`mcp`) or elsewhere (`web`), or null while it is not accepted.",
                "type": "string",
                "nullable": true,
                "enum": [
                  "api",
                  "mcp",
                  "web",
                  null
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "OrderLinkRequest": {
        "required": [
          "type"
        ],
        "properties": {
          "targetUrl": {
            "description": "Where the link points; leave it out for a citation.",
            "type": "string"
          },
          "anchor": {
            "description": "The anchor text; leave it out to let the media choose it. A citation needs one.",
            "type": "string"
          },
          "type": {
            "description": "A link type the media offers for this type of order (CatalogueOffer `linkTypes`).",
            "type": "string",
            "enum": [
              "dofollow",
              "nofollow",
              "citation"
            ]
          }
        },
        "type": "object"
      },
      "PostOrderBriefingRequest": {
        "description": "The briefing of a post order (`type` `post`), checked against the media's post offer as the web checks it.",
        "required": [
          "links"
        ],
        "properties": {
          "links": {
            "description": "No more links than the offer allows.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLinkRequest"
            }
          },
          "extraServices": {
            "description": "Extra services the offer has, added to the ones the web selects for your project by default. A project with a sensitive topic always carries `extra_charge_for_sensitive_topic` when the media charges it.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "list_on_homepage",
                "extra_charge_for_sensitive_topic"
              ]
            }
          },
          "title": {
            "type": "string"
          },
          "additionalInfo": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "LinkAdditionOrderBriefingRequest": {
        "description": "The briefing of a link addition (`type` `link_addition`), checked against the media's link addition offer as the web checks it.",
        "required": [
          "linkingFrom",
          "link"
        ],
        "properties": {
          "linkingFrom": {
            "description": "The URL of an existing article on the media's domain that the link goes into, without `<` or `>`.",
            "type": "string"
          },
          "link": {
            "$ref": "#/components/schemas/OrderLinkRequest"
          },
          "additionalInfo": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderEstimateRequest": {
        "description": "An order to price. `scheduledPublicationDate`, `draftReviewable` and `proposedDraftFileId` apply to a post order only.",
        "required": [
          "type",
          "projectId",
          "mediaId",
          "briefing"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "post",
              "link_addition"
            ]
          },
          "projectId": {
            "description": "One of your projects.",
            "type": "string",
            "format": "uuid"
          },
          "mediaId": {
            "description": "A media you can order for the project (GET /projects/{id}/medias).",
            "type": "string",
            "format": "uuid"
          },
          "briefing": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PostOrderBriefingRequest"
              },
              {
                "$ref": "#/components/schemas/LinkAdditionOrderBriefingRequest"
              }
            ]
          },
          "scheduledPublicationDate": {
            "description": "The day to publish on, at least a few days ahead as the web requires.",
            "type": "string",
            "format": "date"
          },
          "draftReviewable": {
            "description": "Whether you review the draft before it is published. Defaults to false.",
            "type": "boolean"
          },
          "proposedDraftFileId": {
            "description": "A file uploaded with POST /files to propose your own draft. The estimate checks it without using it up.",
            "type": "string",
            "format": "uuid"
          }
        },
        "type": "object"
      },
      "OrderCreateRequest": {
        "description": "An order to place, with the price you expect to pay.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderEstimateRequest"
          },
          {
            "required": [
              "expectedPrice"
            ],
            "properties": {
              "expectedPrice": {
                "description": "The `price` POST /orders/estimate answered. Only EUR is accepted. In cents, as the estimate answered it: 1800 is 18.00 EUR.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  }
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "OrderEstimate": {
        "required": [
          "price",
          "availableBalance",
          "missing",
          "sufficientBalance"
        ],
        "properties": {
          "price": {
            "description": "What the order costs you. Send it as `expectedPrice`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "availableBalance": {
            "description": "Your wallet's available balance.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "missing": {
            "description": "How much the available balance falls short of the price; zero when it covers it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "sufficientBalance": {
            "description": "Whether the available balance covers the price.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "OrderActionReason": {
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "description": "What the seller is told, 10 to 2000 characters once trimmed.",
            "type": "string",
            "maxLength": 2000,
            "minLength": 10
          }
        },
        "type": "object"
      },
      "SellerOrderRefutation": {
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "description": "Why you refuse the buyer's request, which the buyer is told, 10 to 2000 characters once trimmed.",
            "type": "string",
            "maxLength": 2000,
            "minLength": 10
          }
        },
        "type": "object"
      },
      "SellerOrderRejection": {
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "description": "Why you reject the order, as the seller order page offers it.",
                "type": "string",
                "enum": [
                  "media_is_competition",
                  "media_has_exclusivity",
                  "forbidden_topic",
                  "other_reasons"
                ]
              },
              "additionalInfo": {
                "description": "More about the reason, which the buyer is told, 10 to 2000 characters. Required with `other_reasons`.",
                "type": "string",
                "nullable": true,
                "maxLength": 2000,
                "minLength": 10
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "SellerOrderPostDelivery": {
        "description": "The published post of a post order. A link addition order takes no body.",
        "required": [
          "url",
          "publicationDateConfirmed"
        ],
        "properties": {
          "url": {
            "description": "The URL of the published post. It is checked to be a URL without `<` or `>`, as the web does; whether the post carries the links is not checked here.",
            "type": "string",
            "format": "uri"
          },
          "publicationDateConfirmed": {
            "description": "Must be true. Confirms the post is live, or for an order with a scheduled publication date, that it will be published on that date.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SellerOrderDraftFile": {
        "required": [
          "fileId"
        ],
        "properties": {
          "fileId": {
            "description": "A file you uploaded with POST /files and have not used yet. It must be an odt, doc, docx or txt file of up to 8 MB. It is used up once the draft is delivered.",
            "type": "string",
            "format": "uuid"
          }
        },
        "type": "object"
      },
      "Transaction": {
        "required": [
          "id",
          "type",
          "state",
          "direction",
          "amount",
          "description",
          "descriptionCode",
          "orderId",
          "invoiceId",
          "hasDocument",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "description": "What moved the money, for example `deposit` (a top-up), `debit_from_order` (an order), `gift` or `manual_charge`.",
            "type": "string"
          },
          "state": {
            "description": "An order's debit stays `pending_confirmation` until the order settles, and is `cancelled` when the order is refunded.",
            "type": "string",
            "enum": [
              "pending_confirmation",
              "confirmed",
              "cancelled"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "credit",
              "debit"
            ]
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "description": {
            "description": "The text the wallet page prints as it is, or null where it prints a translated label instead (then see `descriptionCode`).",
            "type": "string",
            "nullable": true
          },
          "descriptionCode": {
            "description": "A stable code for the label the wallet page translates: a payment method for a top-up, or `affiliate_promo`. Null otherwise.",
            "type": "string",
            "nullable": true
          },
          "orderId": {
            "description": "The order this transaction paid for or refunded, while it exists.",
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "invoiceId": {
            "description": "The invoice of this transaction, if any; GET /invoices/{id}/pdf downloads it.",
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "hasDocument": {
            "description": "Whether GET /wallets/buyer/transactions/{id}/document downloads a document for it.",
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "SellerTransaction": {
        "description": "A movement of your seller wallet.",
        "required": [
          "id",
          "type",
          "state",
          "direction",
          "amount",
          "description",
          "orderId",
          "withdrawalId",
          "hasDocument",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "description": "What moved the money, for example `credit_from_order` (an order you delivered), `credit_from_writing`, `withdrawal`, `manual_deposit` or `manual_charge`.",
            "type": "string"
          },
          "state": {
            "description": "An order's earning stays `pending_confirmation` until the order settles.",
            "type": "string",
            "enum": [
              "pending_confirmation",
              "confirmed",
              "cancelled"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "credit",
              "debit"
            ]
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "description": {
            "description": "The text the wallet page prints, or null when the movement points to an order or a withdrawal instead, or has no text.",
            "type": "string",
            "nullable": true
          },
          "orderId": {
            "description": "Your order this earning came from, while it exists; GET /seller/orders/{id} reads it.",
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "withdrawalId": {
            "description": "Your withdrawal this debit paid; GET /withdrawals lists it.",
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "hasDocument": {
            "description": "Whether GET /wallets/seller/transactions/{id}/document downloads a document for it.",
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Withdrawal": {
        "required": [
          "id",
          "state",
          "amount",
          "method",
          "hasInvoice",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "started",
              "approved",
              "rejected"
            ]
          },
          "amount": {
            "description": "What you withdraw.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "bank_transfer",
              "paypal"
            ]
          },
          "hasInvoice": {
            "description": "Whether you uploaded an invoice; GET /withdrawals/{id}/invoice downloads it.",
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Invoice": {
        "required": [
          "id",
          "number",
          "issuedAt",
          "total"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "description": "The invoice total, taxes included.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          }
        },
        "type": "object"
      },
      "ManagedServiceCampaign": {
        "description": "A campaign your managed service runs for you. Every figure about proposals counts only those you can see (not the ones the team is still preparing).",
        "required": [
          "id",
          "name",
          "state",
          "deadline",
          "budget",
          "project",
          "strategy",
          "proposalCounts",
          "proposalsTotal",
          "budgetExceededBy",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "description": "`proposal_delivered`: proposals await your review. `proposal_changes_requested`: you rejected some and the team is preparing others. `proposal_accepted`: none awaits your review and the team is placing the orders.",
            "type": "string",
            "enum": [
              "pending_proposal_delivery",
              "proposal_delivered",
              "proposal_changes_requested",
              "proposal_accepted",
              "finished"
            ]
          },
          "deadline": {
            "type": "string",
            "format": "date-time"
          },
          "budget": {
            "$ref": "#/components/schemas/Money"
          },
          "project": {
            "required": [
              "id",
              "url"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object",
            "nullable": true
          },
          "strategy": {
            "required": [
              "goal",
              "countries",
              "languages",
              "topics",
              "definition"
            ],
            "properties": {
              "goal": {
                "type": "string",
                "enum": [
                  "link_building",
                  "branding",
                  "reputation",
                  "other"
                ]
              },
              "countries": {
                "description": "ISO 3166-1 alpha-2 codes.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "languages": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "topics": {
                "description": "Topic ids, as GET /vocabulary lists them.",
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "definition": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "proposalCounts": {
            "description": "How many of the campaign's proposals are in each state.",
            "required": [
              "proposed",
              "accepted",
              "cancelled",
              "purchase_started",
              "purchase_finished"
            ],
            "properties": {
              "proposed": {
                "type": "integer"
              },
              "accepted": {
                "type": "integer"
              },
              "cancelled": {
                "type": "integer"
              },
              "purchase_started": {
                "type": "integer"
              },
              "purchase_finished": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "proposalsTotal": {
            "description": "The current price of every proposal not cancelled, as the campaign page totals it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "budgetExceededBy": {
            "description": "How far `proposalsTotal` goes beyond the budget; null within it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "When the campaign last changed state.",
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "ManagedServiceProposal": {
        "description": "A media the team proposes for a campaign, with the publication it would get.",
        "required": [
          "id",
          "state",
          "media",
          "service",
          "proposedPrice",
          "currentPrice",
          "briefing",
          "stateReason",
          "orderId",
          "orderState",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "description": "`proposed` awaits your review. `accepted` awaits the order the team places for you. `purchase_started` and `purchase_finished` follow that order.",
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "cancelled",
              "purchase_started",
              "purchase_finished"
            ]
          },
          "media": {
            "required": [
              "id",
              "domain",
              "language",
              "country"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "domain": {
                "type": "string"
              },
              "language": {
                "type": "string",
                "nullable": true
              },
              "country": {
                "type": "string",
                "nullable": true
              }
            },
            "type": "object"
          },
          "service": {
            "type": "string",
            "enum": [
              "post",
              "link_addition"
            ]
          },
          "proposedPrice": {
            "description": "The price the proposal was made at, the one the summary PDF shows.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "currentPrice": {
            "description": "What the media charges for the service today; null when it no longer offers it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyOrNull"
              }
            ]
          },
          "briefing": {
            "required": [
              "mainInfo",
              "links",
              "additionalInfo",
              "requiresDraft"
            ],
            "properties": {
              "mainInfo": {
                "type": "string"
              },
              "links": {
                "type": "array",
                "items": {
                  "required": [
                    "targetUrl",
                    "anchor",
                    "type"
                  ],
                  "properties": {
                    "targetUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "anchor": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "dofollow",
                        "nofollow",
                        "citation"
                      ]
                    }
                  },
                  "type": "object"
                }
              },
              "additionalInfo": {
                "type": "string"
              },
              "requiresDraft": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "stateReason": {
            "description": "Why the proposal reached its state, in your language, such as your comment when you rejected it.",
            "type": "string",
            "nullable": true
          },
          "orderId": {
            "description": "The order placed for the proposal (GET /orders/{id}).",
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "orderState": {
            "description": "The state of that order while its purchase is in progress.",
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "When the proposal last changed state.",
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "ManagedServiceProposalReviewRequest": {
        "required": [
          "reviews"
        ],
        "properties": {
          "reviews": {
            "description": "One decision on each proposal of the campaign that is `proposed`, each named once. Their order does not matter.",
            "type": "array",
            "items": {
              "required": [
                "proposalId",
                "decision"
              ],
              "properties": {
                "proposalId": {
                  "type": "string",
                  "format": "uuid"
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "accept",
                    "reject"
                  ]
                },
                "comment": {
                  "description": "Required to reject, at most 2000 characters once trimmed; the team reads it.",
                  "type": "string",
                  "nullable": true,
                  "maxLength": 2000
                }
              },
              "type": "object"
            },
            "minItems": 1
          }
        },
        "type": "object"
      },
      "ManagedServiceProposalReview": {
        "required": [
          "campaign",
          "proposals"
        ],
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/ManagedServiceCampaign"
          },
          "proposals": {
            "description": "The proposals you reviewed, newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManagedServiceProposal"
            }
          }
        },
        "type": "object"
      },
      "ManagedServiceProposalsEstimateRequest": {
        "properties": {
          "accept": {
            "description": "The `proposed` proposals you would accept, each once. Leave it out to price only the accepted ones.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "type": "object"
      },
      "ManagedServiceProposalsEstimate": {
        "required": [
          "acceptedTotal",
          "selectedTotal",
          "total",
          "availableBalance",
          "missing",
          "sufficientBalance"
        ],
        "properties": {
          "acceptedTotal": {
            "description": "The proposals already accepted and still awaiting their order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "selectedTotal": {
            "description": "The proposals named in `accept`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "total": {
            "description": "`acceptedTotal` plus `selectedTotal`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "availableBalance": {
            "description": "Your wallet's available balance.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "missing": {
            "description": "How much the available balance falls short of `total`; zero when it covers it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "sufficientBalance": {
            "description": "Whether the available balance covers `total`.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ManagedServiceRequest": {
        "required": [
          "projectUrl",
          "goal",
          "country",
          "duration",
          "estimatedBudget"
        ],
        "properties": {
          "projectUrl": {
            "description": "The website the campaign is for.",
            "type": "string"
          },
          "goal": {
            "type": "string",
            "enum": [
              "link_building",
              "branding",
              "reputation",
              "ai_visibility"
            ]
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 code of the target country.",
            "type": "string"
          },
          "duration": {
            "type": "string",
            "enum": [
              "one_time",
              "monthly"
            ]
          },
          "estimatedBudget": {
            "description": "At least 500 EUR. Only EUR is accepted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "additionalInfo": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000,
            "minLength": 10
          }
        },
        "type": "object"
      },
      "ManagedServiceRequestSent": {
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "sent"
            ]
          }
        },
        "type": "object"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The API key is missing, malformed, unknown, revoked or expired, or its account cannot sign in (code `unauthorized`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key lacks the capability the operation needs (code `insufficient_capability`), or the account may not perform it (code `forbidden`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "CatalogueForbidden": {
        "description": "The catalogue is open to accounts with recent orders delivered and approved on Growwer, as buyer or as seller, and to other accounts within a daily trial quota; this account has too few such orders and the trial quota is off (code `catalogue_requires_recent_order`). The message names the threshold, which `details.minOrders` (how many orders) and `details.windowDays` (within how many days) repeat; an order counts only once it is delivered and approved. GET /me reports `catalogue.eligible` and `catalogue.dailyCap`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Over the rate limit (code `rate_limit_exceeded`), or too many failed authentications (code `too_many_failed_authentications`): with this key from this address, or from this address with any key; a valid key is never refused for it. On the catalogue operations, also when the response would take the account beyond the units of the catalogue it may spend per UTC day (code `catalogue_daily_cap_reached`): each new media costs one unit and a response that holds no new media, an empty one or a count included, costs one unless the same request was answered today while the media lists, topics and language of its project stayed as they were, which is free; `details.remaining` says how many units still fit today, `details.limit` is the daily cap that applies and `details.tier` is `full`, or `trial` for an account without enough recent orders delivered and approved, whose quota rises to the full cap once it has them: a trial refusal's message names that threshold, which `details.minOrders` (how many orders) and `details.windowDays` (within how many days) repeat, and an order lifts the quota only once it is delivered and approved, so one placed today usually does not lift today's quota; `Retry-After` is the time to the next UTC midnight, and a request already answered today stays readable. On the managed service requests, also when you sent as many requests of that kind as you may per UTC day (code `managed_service_request_limit_reached`): `Retry-After` is the time to the next UTC midnight. On POST /seller/medias, also when you sent as many medias that are already registered as you may per UTC day (code `media_duplicate_limit_reached`): `Retry-After` is the time to the next UTC midnight, and medias not registered yet are still accepted. On POST /webhooks/{id}/test and POST /webhooks/{id}/deliveries/{deliveryId}/redeliver, also when the subscription took 10 test events and redeliveries in the last hour (code `webhook_send_limit_reached`): `details.limit` is that limit and `Retry-After` the time until the next one fits.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The rate limiter cannot be reached, so the call is refused (code `rate_limit_unavailable`), or a stored file cannot be read right now (code `storage_unavailable`). On POST /webhooks/{id}/test, also when the test event cannot be recorded, so nothing was sent (code `webhook_test_unavailable`): the attempt still counts toward the 10 test events and redeliveries an hour, and a retry needs a new `Idempotency-Key`. Retry later.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalError": {
        "description": "An unexpected error (code `internal_error`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The write has no `Idempotency-Key` header (code `idempotency_key_required`), the header is not 1 to 255 printable ASCII characters without spaces (code `invalid_idempotency_key`), or the body is not a JSON object (code `invalid_json`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist, or it is not yours (code `not_found`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "IdempotencyConflict": {
        "description": "The `Idempotency-Key` was used for a different request (code `idempotency_key_reused`), its first request is still running (code `idempotency_request_in_progress`), or its first request failed and may have taken effect (code `idempotency_outcome_unknown`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "The request is not valid (code `validation_failed`). `details.fields` holds the messages for each invalid field, by field name.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "code": "validation_failed",
              "message": "The request is not valid. See details for each field.",
              "requestId": "9b2f6c1e-4d7a-4e3b-8a5f-2c1d0e9f7a64",
              "details": {
                "fields": {
                  "promotedProducts": [
                    "This collection should contain 5 elements or more."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "description": "A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 255
        }
      },
      "CatalogueSource": {
        "name": "source",
        "in": "query",
        "description": "Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "all",
            "recommended",
            "favourite",
            "discarded",
            "requested",
            "bought"
          ]
        }
      },
      "CatalogueSort": {
        "name": "sort",
        "in": "query",
        "description": "The order. Without it, the web's default order: medias on the project's topic and language first, then best sellers and medias with more published orders. Ties are always broken by media id, so pages never overlap. `-growwerRank`: best match first; `postPrice`, `linkAdditionPrice`: cheapest first; `matchedAt`, `-matchedAt`: when Growwer matched the media with the project; `-traffic`, `-domainRating`, `-referringDomains`: highest first; `linkedToReferringRatio`: lowest first.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "-growwerRank",
            "postPrice",
            "linkAdditionPrice",
            "matchedAt",
            "-matchedAt",
            "-traffic",
            "-domainRating",
            "linkedToReferringRatio",
            "-referringDomains"
          ]
        }
      },
      "CatalogueDomain": {
        "name": "domain",
        "in": "query",
        "description": "Medias whose domain contains this text, 1 to 255 characters.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueWebsiteType": {
        "name": "websiteType",
        "in": "query",
        "description": "A comma-separated list of website types: `blog`, `press`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueLanguage": {
        "name": "language",
        "in": "query",
        "description": "A comma-separated list of language codes, as in GET /vocabulary.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueCountry": {
        "name": "country",
        "in": "query",
        "description": "A comma-separated list of country codes, as in GET /vocabulary.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueTopics": {
        "name": "topics",
        "in": "query",
        "description": "A comma-separated list of topic ids, as in GET /vocabulary: medias on any of them.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueNotBannedTopics": {
        "name": "notBannedTopics",
        "in": "query",
        "description": "Leave out medias that refuse the topic of the project. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueMinTraffic": {
        "name": "minTraffic",
        "in": "query",
        "description": "Minimum monthly organic traffic.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueMaxTraffic": {
        "name": "maxTraffic",
        "in": "query",
        "description": "Maximum monthly organic traffic.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueTrafficTrendUpward": {
        "name": "trafficTrendUpward",
        "in": "query",
        "description": "Medias whose traffic is growing. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueMinDomainRating": {
        "name": "minDomainRating",
        "in": "query",
        "description": "Minimum domain rating, 0 to 100.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueMaxDomainRating": {
        "name": "maxDomainRating",
        "in": "query",
        "description": "Maximum domain rating, 0 to 100.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueMinLinkedToReferringRatio": {
        "name": "minLinkedToReferringRatio",
        "in": "query",
        "description": "Minimum ratio of linked domains to referring domains, such as 0.5.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "CatalogueMaxLinkedToReferringRatio": {
        "name": "maxLinkedToReferringRatio",
        "in": "query",
        "description": "Maximum ratio of linked domains to referring domains, such as 1.5.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "CatalogueMinPostPrice": {
        "name": "minPostPrice",
        "in": "query",
        "description": "Minimum post price, in cents.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueMaxPostPrice": {
        "name": "maxPostPrice",
        "in": "query",
        "description": "Maximum post price, in cents.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CataloguePostLinkType": {
        "name": "postLinkType",
        "in": "query",
        "description": "A comma-separated list of link types the post offer gives: `dofollow`, `nofollow`, `citation`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CataloguePromotedSocialNetwork": {
        "name": "promotedSocialNetwork",
        "in": "query",
        "description": "A comma-separated list of social networks the media promotes posts on: `twitter`, `instagram`, `facebook`, `pinterest`, `tumblr`, `newsletter`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueWithoutAdvertisingLabel": {
        "name": "withoutAdvertisingLabel",
        "in": "query",
        "description": "Medias that never label posts as advertising. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueHomepageListing": {
        "name": "homepageListing",
        "in": "query",
        "description": "Medias that offer listing the post on their homepage. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueHasLinkAddition": {
        "name": "hasLinkAddition",
        "in": "query",
        "description": "Medias that offer adding a link to an existing article. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueMinLinkAdditionPrice": {
        "name": "minLinkAdditionPrice",
        "in": "query",
        "description": "Minimum link addition price, in cents.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueMaxLinkAdditionPrice": {
        "name": "maxLinkAdditionPrice",
        "in": "query",
        "description": "Maximum link addition price, in cents.",
        "required": false,
        "schema": {
          "type": "integer"
        }
      },
      "CatalogueLinkAdditionLinkType": {
        "name": "linkAdditionLinkType",
        "in": "query",
        "description": "A comma-separated list of link types the link addition offer gives: `dofollow`, `nofollow`, `citation`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueBestPrice": {
        "name": "bestPrice",
        "in": "query",
        "description": "Medias with a best-price badge (`bestPrice` not null), of either claim. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueRecommended": {
        "name": "recommended",
        "in": "query",
        "description": "`true`: only the medias Growwer recommends for the project; `false`: only the others.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueFavourite": {
        "name": "favourite",
        "in": "query",
        "description": "`true`: only your favourites for the project; `false`: leave them out.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueRequested": {
        "name": "requested",
        "in": "query",
        "description": "`true`: only the medias you requested for the project; `false`: leave them out.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueFlashOffer": {
        "name": "flashOffer",
        "in": "query",
        "description": "`true`: only medias with a flash offer running; `false`: leave them out.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueBought": {
        "name": "bought",
        "in": "query",
        "description": "`true`: only medias you bought for the project; `false`: leave them out.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueDiscarded": {
        "name": "discarded",
        "in": "query",
        "description": "`true`: only the medias you discarded for the project; `false`: leave them out.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueNew": {
        "name": "new",
        "in": "query",
        "description": "Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      },
      "CatalogueRanksGoalKeyword": {
        "name": "ranksGoalKeyword",
        "in": "query",
        "description": "A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. `user`: your keywords; `publicGenerated`: keywords Growwer found for the project.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "CatalogueRanksAiKeyword": {
        "name": "ranksAiKeyword",
        "in": "query",
        "description": "A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "RetryAfter": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitLimit": {
        "description": "Requests allowed in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Seconds until the current window resets.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "description": "An API key from your profile page.",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Your profile, balances and catalogue quota, and the codes and names the API uses."
    },
    {
      "name": "Files",
      "description": "Upload the documents that a later write, such as an order's briefing, references."
    },
    {
      "name": "Webhooks",
      "description": "Subscribe your endpoints to events, rotate their secrets and follow their deliveries."
    },
    {
      "name": "Projects",
      "description": "Create, edit and delete the projects you buy for."
    },
    {
      "name": "Catalogue",
      "description": "Search the medias of a project, its flash offers, favourites and discards."
    },
    {
      "name": "Saved filters",
      "description": "Save catalogue searches of a project and count their medias."
    },
    {
      "name": "Buyer orders",
      "description": "Estimate, place and follow the orders you buy, and act on them."
    },
    {
      "name": "Buyer wallet",
      "description": "Your buyer balance, its movements and documents, and your invoices."
    },
    {
      "name": "Managed services",
      "description": "Your managed service campaigns, their proposals, and requests to Growwer."
    },
    {
      "name": "Seller account",
      "description": "Your seller holiday, during which your medias take no orders."
    },
    {
      "name": "Seller medias",
      "description": "The medias you sell on and their fees."
    },
    {
      "name": "Seller orders",
      "description": "The orders placed on your medias, and accepting, delivering or refusing them."
    },
    {
      "name": "Seller wallet",
      "description": "Your seller balance, its movements and documents, and your withdrawals."
    },
    {
      "name": "Test helpers",
      "description": "Test keys only. Top up your test wallet and reset your test data."
    }
  ],
  "x-tagGroups": [
    {
      "name": "General",
      "tags": [
        "Account",
        "Files",
        "Webhooks"
      ]
    },
    {
      "name": "Buyer",
      "tags": [
        "Projects",
        "Catalogue",
        "Saved filters",
        "Buyer orders",
        "Buyer wallet",
        "Managed services"
      ]
    },
    {
      "name": "Seller",
      "tags": [
        "Seller account",
        "Seller medias",
        "Seller orders",
        "Seller wallet"
      ]
    },
    {
      "name": "Testing",
      "tags": [
        "Test helpers"
      ]
    }
  ],
  "x-webhooks": {
    "order.created": {
      "post": {
        "summary": "order.created",
        "description": "An order of yours was created, from any channel.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.created"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.accepted": {
      "post": {
        "summary": "order.accepted",
        "description": "The seller accepted an order of yours.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.accepted"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.rejected": {
      "post": {
        "summary": "order.rejected",
        "description": "The seller rejected an order of yours.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.rejected"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.published": {
      "post": {
        "summary": "order.published",
        "description": "The seller delivered an order of yours, first or after an update you requested: it is `pending_order_delivery_review`, waiting for your review. It also fires when the seller refuses an update you requested and the order is back in `pending_order_delivery_review`.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.published"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.update_requested": {
      "post": {
        "summary": "order.update_requested",
        "description": "An update was requested on the delivery of an order of yours.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.update_requested"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.completed": {
      "post": {
        "summary": "order.completed",
        "description": "The delivery of an order of yours was approved: the order is complete.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.completed"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "summary": "order.cancelled",
        "description": "An order of yours was cancelled, by you or by Growwer.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "order.cancelled"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/OrderEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "balance.low": {
      "post": {
        "summary": "balance.low",
        "description": "A debit took your available buyer balance from at or above the subscription's `lowBalanceThreshold` to below it. It fires again only after the balance was back at or above the threshold.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "balance.low"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/BalanceLowEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "summary": "webhook.test",
        "description": "Sent only by POST /webhooks/{id}/test, to that subscription, whatever it lists.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "webhook.test"
                        ]
                      },
                      "data": {
                        "$ref": "#/components/schemas/WebhookTestEventData"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 15 seconds acknowledges the event; anything else is retried."
          }
        }
      }
    }
  }
}
