{
  "openapi": "3.0.0",
  "info": {
    "title": "Grail Network API for consignment partners",
    "description": "The routes that a consignment partner calls, with the partner's API key.",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api-stg.grailnetwork.com",
      "description": "Staging"
    }
  ],
  "security": [
    {
      "partnerApiKey": []
    }
  ],
  "paths": {
    "/partner/intakes": {
      "get": {
        "description": "The intakes of one of your slips that ended, the newest end first. A parcel comes with a slip, and the slip code is `<your code>:<reference>`, such as `PRT:7K3M9QX2G`. Send only the reference. Each intake gives how many cards the warehouse took in (`itemCount`), and each refused card with its reason as a text. A refused card comes with no picture, and its `id` is no card of yours.\n\nWhen to read it: at the webhook `intake.ended`, which names the intake and the reference. Then read the cards that the warehouse took in with `GET /partner/items?reference=`: they are there before the webhook goes.\n\nAn empty list: no intake of this reference has ended yet, or the reference names no slip of yours. The last character of a reference is the check character of the whole slip code, so a typo, or another partner's reference, names no slip of yours and gives an empty list too.\n\nErrors:\n- 400 `VALIDATION_FAILED` at `reference`: not 6 to 20 characters of the digits 0 to 9 and the capital letters A to Z without I, L, O and U.\n- 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.",
        "operationId": "Partner_listIntakes",
        "parameters": [
          {
            "name": "reference",
            "required": true,
            "in": "query",
            "description": "The slip's reference, such as 7K3M9QX2G",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{6,20}$",
              "description": "The slip's reference, such as 7K3M9QX2G"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerIntakeList"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "List the intakes of a slip",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/items": {
      "get": {
        "description": "Your cards, sorted by the time of their last change (`changedAt`), the oldest first: all of them, or those that changed after `changedAfter`, of one slip `reference` when you give it. After the webhook `intake.ended`, `GET /partner/items?reference=7K3M9QX2G` gives every card of that intake at once.\n\nHow to read the list to its end:\n- The page has `limit` cards, and the `changedAt` of its last card is not later than the time in `nextCursor`: read the next page at once with `changedAfter=<nextCursor>`.\n- The page has `limit` cards, and its last card is newer than `nextCursor`: the page holds the newest changes, and the cursor waits 60 seconds behind now. Wait 60 seconds before the next read: a read before that gives the same page again.\n- The page has fewer than `limit` cards: you have every change to now. Read again with `nextCursor` at your own pace, or at the next webhook.\n\nYou can see a card of the last 60 seconds again at your next read. Keep the answer with the newest `changedAt`: a repeat changes nothing.\n\nErrors:\n- 400 `VALIDATION_FAILED`: `changedAfter` is neither a `nextCursor` nor an RFC 3339 time, `reference` is not a slip reference, or `limit` is not from 1 to 500.\n- 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.",
        "operationId": "Partner_listItems",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "changedAfter",
            "required": false,
            "in": "query",
            "description": "The nextCursor of your last page, or any RFC 3339 time such as 2026-11-20T00:00:00Z (\"at or after this time\"). Leave it out to read from the first item",
            "schema": {
              "description": "The nextCursor of your last page, or any RFC 3339 time such as 2026-11-20T00:00:00Z (\"at or after this time\"). Leave it out to read from the first item",
              "type": "string"
            }
          },
          {
            "name": "reference",
            "required": false,
            "in": "query",
            "description": "Only the cards of this slip reference, such as 7K3M9QX2G",
            "schema": {
              "description": "Only the cards of this slip reference, such as 7K3M9QX2G",
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{6,20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPageOfPartnerItems"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "List your cards that changed",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/items/{itemId}": {
      "get": {
        "description": "One card with its state, its prices, its buyer facts while a buyer holds it, its sale and its take-back request.\n\nErrors:\n- 404 `PARTNER_ITEM_NOT_FOUND`: you have no card with this id.\n- 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.",
        "operationId": "Partner_getItem",
        "parameters": [
          {
            "name": "itemId",
            "required": true,
            "in": "path",
            "description": "The card's id at Grail Network",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "The card's id at Grail Network"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND, PARTNER_ITEM_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RouteNotFoundError"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerItemNotFoundError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Read one of your cards",
        "tags": [
          "Partner"
        ]
      },
      "patch": {
        "description": "Sets the price of the card in relation to its market price: from \"-0.10\" (10% below) to \"0.10\" (10% above), with at most four decimals. A card goes on sale in packs when it has a price adjustment and a market price. The same value again changes nothing. No money moves.\n\nErrors:\n- 400 `VALIDATION_FAILED` at `priceAdjustment`: not a decimal with at most four decimals, or outside the range.\n- 404 `PARTNER_ITEM_NOT_FOUND`: you have no card with this id.\n- 409 `PARTNER_ITEM_TAKEN_BACK`: the card has a take-back request, so its price stays as it is.\n- 409 `PARTNER_ITEM_SOLD`: the card is sold.\n- 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.",
        "operationId": "Partner_setPriceAdjustment",
        "parameters": [
          {
            "name": "itemId",
            "required": true,
            "in": "path",
            "description": "The card's id at Grail Network",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "The card's id at Grail Network"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPriceAdjustmentBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND, PARTNER_ITEM_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RouteNotFoundError"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerItemNotFoundError"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_ITEM_TAKEN_BACK, PARTNER_ITEM_SOLD",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PartnerItemTakenBackError"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerItemSoldError"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Set the price adjustment of a card",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/items/{itemId}/take-back": {
      "post": {
        "description": "Asks to take the card back. The card stays on sale for the whole notice (`takeBackNoticeHours` of `GET /partner/me`). At the end of the notice it leaves sale for good: an available card at once, a card that a buyer holds when the buyer sells it back. Then `takeBack.state` is `completed`, and the card waits for its return. If a buyer keeps the card first, `takeBack.state` is `sold`. A second request answers the first one. You get the webhook `partner-item.changed` at the request and at its completion.\n\nErrors:\n- 404 `PARTNER_ITEM_NOT_FOUND`: you have no card with this id.\n- 409 `PARTNER_ITEM_SOLD`: the card is sold.\n- 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.",
        "operationId": "Partner_takeBack",
        "parameters": [
          {
            "name": "itemId",
            "required": true,
            "in": "path",
            "description": "The card's id at Grail Network",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "The card's id at Grail Network"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND, PARTNER_ITEM_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RouteNotFoundError"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerItemNotFoundError"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_ITEM_SOLD",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerItemSoldError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Take a card back",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/me": {
      "get": {
        "description": "Your id, name and code at Grail Network, your webhook address, the notice of a take-back request today, and the range of the price adjustment that you may set on a card.",
        "operationId": "Partner_me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerMe"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Read your partner record",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/report-lines": {
      "get": {
        "description": "What you earned, line by line, sorted by the time when Grail Network recorded each line (`recordedAt`), the oldest first. A line never changes and is never deleted. Two kinds of line:\n- `sale`: a card of yours was sold. The line comes when the buyer keeps the card: when the Buyback offer ends (`buybackOfferEndsAt` of the card), or when the card leaves the warehouse to its buyer. `amount` is the price of the card when the buyer got it.\n- `pool_share`: a share of the daily pool for a card of yours that was on sale. The day's pool is made once, usually at 01:00 UTC of the next day; then the webhook `pool.created` names the day (`poolDay`).\n\nOnly lines older than 60 seconds are listed, so a line never appears behind your cursor. Credit each line once by its `id`, and store `nextCursor` after you credited the whole page.\n\nHow to read the list to its end:\n- Start with no `after`, or with `after=` an RFC 3339 time (\"at or after this time\").\n- A full page (`limit` lines, 100 by default, 500 at most): read the next page at once with `after=<nextCursor>`.\n- A page with fewer lines than `limit`: you have every line to now. Read again later with the same `nextCursor`: at the next webhook, or at your own pace. An empty page gives back the cursor that you sent.\n- After an outage of any length, read from your last stored cursor: you get every line of that time, once. Nobody runs a command or types a date.\n\nThe statements (`GET /partner/statements`) sum the same lines by the UTC day of `recordedAt`.\n\nErrors:\n- 400 `VALIDATION_FAILED`: `after` is neither a `nextCursor` nor an RFC 3339 time, or `limit` is not from 1 to 500.",
        "operationId": "Partner_listReportLines",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "after",
            "required": false,
            "in": "query",
            "description": "The nextCursor of your last page, or any RFC 3339 time such as 2026-11-20T00:00:00Z (\"at or after this time\"). Leave it out to read from the first line",
            "schema": {
              "description": "The nextCursor of your last page, or any RFC 3339 time such as 2026-11-20T00:00:00Z (\"at or after this time\"). Leave it out to read from the first line",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPageOfReportLines"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "List your report lines",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/statements": {
      "get": {
        "description": "One statement for each closed UTC day from `from` to `to`, both included, the newest first, also the days with no line. A statement sums the lines recorded on its day. A day is closed at 00:01 UTC of the next day. With neither end: the last 30 closed days. With `from` only: from `from` to the last closed day. With `to` only: the 30 days that end on `to`.\n\nErrors:\n- 400 `VALIDATION_FAILED`: `from` is after `to`, or the range has more than 31 days.\n- 409 `PARTNER_STATEMENT_DAY_NOT_CLOSED`: a day of the range is not closed yet.",
        "operationId": "Partner_listStatements",
        "parameters": [
          {
            "name": "from",
            "required": false,
            "in": "query",
            "description": "The first day, such as \"2026-11-01\". Alone: from this day to the last closed day",
            "schema": {
              "description": "The first day, such as \"2026-11-01\". Alone: from this day to the last closed day",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "required": false,
            "in": "query",
            "description": "The last day, such as \"2026-11-23\". It must be closed. Alone: the 30 days that end on it",
            "schema": {
              "description": "The last day, such as \"2026-11-23\". It must be closed. Alone: the 30 days that end on it",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatementList"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_STATEMENT_DAY_NOT_CLOSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStatementDayNotClosedError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "List your statements",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/statements/{day}": {
      "get": {
        "description": "The totals of your lines recorded on one closed UTC day, from 00:00 UTC, included, to 00:00 UTC of the next day. They equal the sum of the report lines of that day, at every read.\n\nErrors:\n- 400 `VALIDATION_FAILED` at `day`: not a day such as 2026-11-23.\n- 409 `PARTNER_STATEMENT_DAY_NOT_CLOSED`: the day is not closed yet.",
        "operationId": "Partner_getStatement",
        "parameters": [
          {
            "name": "day",
            "required": true,
            "in": "path",
            "description": "The UTC day, such as \"2026-11-23\". It must be closed",
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "The UTC day, such as \"2026-11-23\". It must be closed"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Statement"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_STATEMENT_DAY_NOT_CLOSED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStatementDayNotClosedError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Read the statement of a day",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/webhook": {
      "get": {
        "description": "Your webhook address and the time of its secret. The secret itself is always null here: it shows only in the answer of the call that made it.",
        "operationId": "Partner_getWebhook",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhook"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Read your webhook",
        "tags": [
          "Partner"
        ]
      },
      "put": {
        "description": "Sets the address that gets your webhooks. The first address makes a secret, and this answer shows it once: keep it, because no later answer shows it. A new address keeps the secret. `null` removes the address and the secret, and the webhooks that wait end with no delivery. Grail Network checks the address again before each try.\n\n**What arrives at the address.** Grail Network posts one JSON body for each fact, signed by the rules of the Standard Webhooks specification (standardwebhooks.com). A webhook is thin: it names the fact, and you read the API for the facts themselves.\n\nThe body: `{ \"id\": \"<uuid>\", \"type\": \"<type>\", \"createdAt\": \"2026-11-24T10:00:00.000Z\", \"data\": { … } }`. `id` is the same at each try of one webhook: keep it, and handle an `id` once.\n\nThe types and their `data`:\n- `partner-item.changed`: `{ \"itemId\": \"<uuid>\", \"reference\": \"7K3M9QX2G\" }`. One of your cards changed: a buyer got it, its price, its sale, a take-back request or its completion. Read `GET /partner/items/{itemId}`.\n- `intake.ended`: `{ \"intakeId\": \"<uuid>\", \"reference\": \"7K3M9QX2G\" }`. The warehouse ended the intake of one of your slips. Read `GET /partner/intakes?reference=` and `GET /partner/items?reference=`.\n- `pool.created`: `{ \"poolDay\": \"2026-11-23\" }`. The pool of that UTC day gave you at least one share. Read `GET /partner/report-lines` from your last cursor.\n\n**The check of the signature.** The headers: `webhook-id` (the body's `id`), `webhook-timestamp` (Unix seconds), and `webhook-signature`: `v1,<signature>`, where the signature is the base64 of HMAC-SHA256 over the text `<webhook-id>.<webhook-timestamp>.<the raw body>`. The key of the HMAC is the bytes of the base64 after `whsec_` in your secret. Compare the signatures in constant time, and refuse a timestamp more than 5 minutes from your clock. After a new secret, the next try of every webhook is signed with the new one.\n\n**Your answer and the tries.** Answer 2xx within 10 seconds, after the check of the signature, also for a fact that you cannot place yet: keep it in a place of your own and read the API. Any other answer, or no answer, is a failed try. Grail Network tries 8 times, with these waits after a failed try: 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 10 hours. So the last try is about 27.6 hours after the first, and then the webhook has failed for good. No route sends a webhook again: a webhook is a nudge, and `GET /partner/items?changedAfter=` and `GET /partner/report-lines?after=` from your last cursors give you everything that you missed.\n\nErrors:\n- 400 `VALIDATION_FAILED` at `url`: the address is not `https://`, or it has more than 2,000 characters.\n- 409 `PARTNER_WEBHOOK_URL_INVALID`: the host of the address is a private address, or it is not found.",
        "operationId": "Partner_setWebhook",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPartnerWebhookBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhook"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_WEBHOOK_URL_INVALID",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerWebhookUrlInvalidError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Set your webhook address",
        "tags": [
          "Partner"
        ]
      }
    },
    "/partner/webhook/secret": {
      "post": {
        "description": "Makes a new secret that signs your webhooks, and shows it in this answer once. The old secret stops at once: Grail Network signs the next try of every webhook with the new one.\n\nErrors:\n- 409 `PARTNER_WEBHOOK_NOT_SET`: you have no webhook address. Set one first: it makes a secret.",
        "operationId": "Partner_makeWebhookSecret",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhook"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION_FAILED, MALFORMED_REQUEST",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationFailedError"
                    },
                    {
                      "$ref": "#/components/schemas/MalformedRequestError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthenticatedError"
                }
              }
            }
          },
          "403": {
            "description": "FORBIDDEN",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          },
          "404": {
            "description": "ROUTE_NOT_FOUND",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteNotFoundError"
                }
              }
            }
          },
          "409": {
            "description": "PARTNER_WEBHOOK_NOT_SET",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerWebhookNotSetError"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PayloadTooLargeError"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalError"
                }
              }
            }
          },
          "503": {
            "description": "SERVICE_UNAVAILABLE",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableError"
                }
              }
            }
          }
        },
        "summary": "Make a new webhook secret",
        "tags": [
          "Partner"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partnerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "The partner's API key."
      }
    },
    "schemas": {
      "CursorPageMeta": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "nextCursor"
        ]
      },
      "CursorPageOfPartnerItems": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerItem"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/CursorPageMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "CursorPageOfReportLines": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportLine"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/CursorPageMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ForbiddenError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              403
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "FORBIDDEN"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "InternalError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              500
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "INTERNAL_ERROR"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "MalformedRequestError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "MALFORMED_REQUEST"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "Money": {
        "type": "object",
        "properties": {
          "amountAtomic": {
            "type": "string",
            "pattern": "^(0|-?[1-9]\\d*)$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "amountAtomic",
          "currency"
        ],
        "additionalProperties": false
      },
      "PartnerIntake": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The intake"
          },
          "reference": {
            "type": "string",
            "description": "The slip's reference, such as 7K3M9QX2G"
          },
          "state": {
            "type": "string",
            "enum": [
              "ended"
            ],
            "description": "ended: the warehouse finished the intake. Grail Network lists an intake when it ends"
          },
          "startedAt": {
            "description": "When the warehouse opened the parcel",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "endedAt": {
            "description": "When the warehouse ended the intake",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "itemCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The cards that the warehouse took in. GET /partner/items?reference= lists them"
          },
          "refusedCards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "The warehouse's note of the refused card. It is no card of yours: GET /partner/items/{itemId} does not know it"
                },
                "note": {
                  "type": "string",
                  "description": "The warehouse's reason, such as \"The card is a fake\""
                }
              },
              "required": [
                "id",
                "note"
              ]
            },
            "description": "The cards of the parcel that the warehouse refused, each with its reason as a text. A refused card comes with no picture"
          }
        },
        "required": [
          "id",
          "reference",
          "state",
          "startedAt",
          "endedAt",
          "itemCount",
          "refusedCards"
        ]
      },
      "PartnerIntakeList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PartnerIntake"
        }
      },
      "PartnerItem": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The card's id at Grail Network"
          },
          "reference": {
            "type": "string",
            "description": "The reference of the slip that the card came with, such as 7K3M9QX2G"
          },
          "receivedAt": {
            "description": "When the warehouse took the card in",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "card": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the card, such as \"Lacey\""
              },
              "setName": {
                "type": "string",
                "description": "The name of its set, such as \"Stellar Crown\""
              },
              "categoryName": {
                "type": "string",
                "description": "The name of its category, such as \"Pokémon\""
              },
              "number": {
                "nullable": true,
                "description": "The number as printed, such as \"166/142\". Null: none",
                "type": "string"
              },
              "gradeName": {
                "nullable": true,
                "description": "The grade of a graded card, such as \"PSA 10\", else the condition, such as \"Near Mint\". Null: neither is known",
                "type": "string"
              }
            },
            "required": [
              "name",
              "setName",
              "categoryName",
              "number",
              "gradeName"
            ],
            "description": "The card"
          },
          "frontPictureUrl": {
            "nullable": true,
            "description": "The address of the warehouse's picture of the card's front. Null: no picture of the card itself; show your own default picture",
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "held",
              "sold",
              "gone"
            ],
            "description": "available: on sale in packs. unavailable: not on sale (no price adjustment yet, no market price, or taken back). held: a buyer has the card, and the Buyback offer runs until buybackOfferEndsAt. sold: the card is sold and its earning exists; it waits in the warehouse for its shipment. gone: the card has left the warehouse to its buyer"
          },
          "marketPrice": {
            "nullable": true,
            "description": "The card's market price today. Null: the card has no market price yet",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "priceAdjustment": {
            "nullable": true,
            "description": "Your price adjustment, from \"-0.10\" to \"0.10\": \"0.05\" is 5% above the market price. Null: not set yet, so the card is not on sale",
            "type": "string"
          },
          "price": {
            "nullable": true,
            "description": "The price of the card: the market price times (1 + the price adjustment). Null when one of the two is null",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "pulledAt": {
            "nullable": true,
            "description": "When a buyer got the card. Null: no buyer has it",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "priceAtPull": {
            "nullable": true,
            "description": "The card's price when the buyer got it: what you earn when it is sold. Null: no buyer has it",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "buybackOfferEndsAt": {
            "nullable": true,
            "description": "When the Buyback offer of the buyer ends. The card is sold at that time if the buyer keeps it. Null: no buyer has it",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "soldAt": {
            "nullable": true,
            "description": "When the card was sold, and its earning made. Null: not sold",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "takeBack": {
            "nullable": true,
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "requested",
                  "completed",
                  "sold",
                  "failed"
                ],
                "description": "requested: the notice runs, or a buyer still holds the card after it. completed: the card is out of sale for good and waits for its return to you. sold: the card was sold first, so nothing goes back. failed: Grail Network could not take the card back, and its staff look at it. The state only moves forward"
              },
              "requestedAt": {
                "description": "When you asked to take the card back",
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              "noticeEndsAt": {
                "description": "When the notice ends: the card stays on sale until then, then it leaves sale",
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              "completedAt": {
                "nullable": true,
                "description": "When the card left sale for good. Null: not completed",
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              }
            },
            "required": [
              "state",
              "requestedAt",
              "noticeEndsAt",
              "completedAt"
            ],
            "description": "Your request to take the card back. Null: no request"
          },
          "changedAt": {
            "description": "The time of the last change of the card or of its take-back request. Keep the answer with the newest changedAt",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          }
        },
        "required": [
          "itemId",
          "reference",
          "receivedAt",
          "card",
          "frontPictureUrl",
          "state",
          "marketPrice",
          "priceAdjustment",
          "price",
          "pulledAt",
          "priceAtPull",
          "buybackOfferEndsAt",
          "soldAt",
          "takeBack",
          "changedAt"
        ]
      },
      "PartnerItemNotFoundError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_ITEM_NOT_FOUND"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PartnerItemSoldError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_ITEM_SOLD"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PartnerItemTakenBackError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_ITEM_TAKEN_BACK"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PartnerMe": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The partner's id at Grail Network"
          },
          "name": {
            "type": "string",
            "description": "The partner's name at Grail Network"
          },
          "code": {
            "type": "string",
            "description": "The first part of each of your slip codes, such as PRT. It never changes"
          },
          "webhookUrl": {
            "nullable": true,
            "description": "The address that gets your webhooks. Null: you get no webhook",
            "type": "string"
          },
          "takeBackNoticeHours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The notice of a take-back request today, in hours. The card stays on sale for the whole notice. A request keeps the notice of its creation"
          },
          "priceAdjustment": {
            "type": "object",
            "properties": {
              "min": {
                "type": "string",
                "description": "The lowest price adjustment, \"-0.10\": 10% below the market price"
              },
              "max": {
                "type": "string",
                "description": "The highest price adjustment, \"0.10\": 10% above the market price"
              }
            },
            "required": [
              "min",
              "max"
            ],
            "description": "The range of the price adjustment that you may set on a card, both ends included"
          }
        },
        "required": [
          "id",
          "name",
          "code",
          "webhookUrl",
          "takeBackNoticeHours",
          "priceAdjustment"
        ]
      },
      "PartnerStatementDayNotClosedError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_STATEMENT_DAY_NOT_CLOSED"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PartnerWebhook": {
        "type": "object",
        "properties": {
          "url": {
            "nullable": true,
            "description": "The address that gets the webhooks. Null: the partner gets no webhook",
            "type": "string"
          },
          "secretMadeAt": {
            "nullable": true,
            "description": "When the secret was made. Null: no address, so no secret",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "secret": {
            "nullable": true,
            "description": "The secret that signs each webhook (`whsec_` and 32 bytes in base64). It shows only in the answer of the call that made it, and is null in every other answer: keep it when you get it",
            "type": "string"
          }
        },
        "required": [
          "url",
          "secretMadeAt",
          "secret"
        ]
      },
      "PartnerWebhookNotSetError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_WEBHOOK_NOT_SET"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PartnerWebhookUrlInvalidError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PARTNER_WEBHOOK_URL_INVALID"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "PayloadTooLargeError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              413
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "PAYLOAD_TOO_LARGE"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "ReportLine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The id of the line. Credit each line once by its id: a line never shows twice"
          },
          "kind": {
            "type": "string",
            "enum": [
              "sale",
              "pool_share"
            ],
            "description": "sale: a card was sold. pool_share: a share of the daily pool for a card on sale"
          },
          "itemId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The card"
          },
          "reference": {
            "type": "string",
            "description": "The slip reference of the card"
          },
          "amount": {
            "description": "What you earned: the price of the card when the buyer got it (a sale), or the share (a pool share)",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "recordedAt": {
            "description": "When Grail Network recorded the line. The statement of a day sums the lines recorded on that UTC day",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "soldAt": {
            "nullable": true,
            "description": "The time of the sale. Null for a pool share",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "poolDay": {
            "nullable": true,
            "description": "The UTC day of the pool, such as \"2026-11-23\". Its shares are recorded at the pool's run, usually at 01:00 UTC of the next day. Null for a sale",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "itemPrice": {
            "nullable": true,
            "description": "The card's price that the share used. Null for a sale",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "itemId",
          "reference",
          "amount",
          "recordedAt",
          "soldAt",
          "poolDay",
          "itemPrice"
        ]
      },
      "RouteNotFoundError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "ROUTE_NOT_FOUND"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "ServiceUnavailableError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "SERVICE_UNAVAILABLE"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "SetPartnerWebhookBody": {
        "type": "object",
        "properties": {
          "url": {
            "nullable": true,
            "description": "The new address, `https://`, at most 2,000 characters. Null removes the address and the secret, and the waiting webhooks end",
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "SetPriceAdjustmentBody": {
        "type": "object",
        "properties": {
          "priceAdjustment": {
            "type": "string",
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d{1,4})?$",
            "description": "A decimal text from \"-0.10\" to \"0.10\", with at most four decimals: \"0.05\" sets the price 5% above the market price, \"-0.025\" 2.5% below it"
          }
        },
        "required": [
          "priceAdjustment"
        ],
        "additionalProperties": false
      },
      "Statement": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "The UTC day, such as \"2026-11-23\": from 00:00 UTC, included, to 00:00 UTC of the next day"
          },
          "lineCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The lines recorded on the day"
          },
          "salesCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The sales of the day"
          },
          "salesTotal": {
            "description": "The sum of the sales of the day",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "poolSharesCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "The pool shares recorded on the day"
          },
          "poolSharesTotal": {
            "description": "The sum of the pool shares recorded on the day",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          },
          "total": {
            "description": "salesTotal plus poolSharesTotal: the sum of the lines of the day",
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ]
          }
        },
        "required": [
          "day",
          "lineCount",
          "salesCount",
          "salesTotal",
          "poolSharesCount",
          "poolSharesTotal",
          "total"
        ]
      },
      "StatementList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Statement"
        }
      },
      "UnauthenticatedError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              401
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "UNAUTHENTICATED"
            ]
          },
          "detail": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "traceId"
        ]
      },
      "ValidationFailedError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "VALIDATION_FAILED"
            ]
          },
          "detail": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ]
            }
          },
          "traceId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "errors",
          "traceId"
        ]
      }
    }
  }
}
