{
  "openapi": "3.1.0",
  "info": {
    "title": "ChicksGold Seller API",
    "version": "1.0.0",
    "summary": "Manage your currency offers and prices from your own systems.",
    "contact": {
      "name": "ChicksGold Support"
    },
    "license": {
      "name": "Proprietary",
      "identifier": "Proprietary"
    },
    "description": "# Overview\n\nThe ChicksGold API lets you manage your **Currency** offers from your own systems. With it you can:\n\n- read your seller account and the current price update cooldown;\n- list your offers and read one offer;\n- pause and activate offers;\n- update prices, one offer at a time or in batches of up to 100.\n\nAccess is granted by ChicksGold to approved sellers only.\nRequests without a valid key are rejected.\n\n# Authentication\n\nSend your API key in the `x-api-key` header on every request. Your API key is provided to you by ChicksGold when your access is enabled.\n\n```\nx-api-key: <your API key>\n```\n\n- Keep your key secret. Never put it in a browser, a mobile app or public code. If it is exposed, contact ChicksGold Support so it can be replaced.\n- **Production and staging keys are different and not interchangeable.** A key only works on the environment it was issued for.\n- A missing or invalid key returns `401 INVALID_API_KEY`. A key that is valid but not registered for your account, or that has been disabled, returns `403 API_KEY_NOT_REGISTERED` or `403 API_KEY_DISABLED`.\n\n# Environments\n\n| Environment | Base URL |\n|---|---|\n| Production | `https://api.chicksgold.com/v1` |\n| Staging | `https://staging-api.chicksgold.com/v1` |\n\nBoth environments require an API key issued by ChicksGold, and the keys are different. Staging is for testing your integration\nbefore you go live. It is **not** open access and not a public sandbox: it is available only to approved sellers. Staging is\nseparate from production.\n\n# Prices and units\n\nEach offer is sold per **unit** of the game currency (`unit`, for example `M` for millions). `price` is in USD per 1 `unit`, a\nJSON number with at most 5 decimal places. `quantity` and `minimum` are expressed in `unit`. For example, 376 `M` at a price of\n0.26650 is 376 × 0.26650 = 100.20 USD. Stock and minimum order are managed on the ChicksGold website; the API does not change them.\n\n# Rate limits\n\nWhen you exceed a limit you get `429`. Read the `Retry-After` header (seconds), wait that long and retry with backoff. Do not retry in a tight loop.\n\n| Code | Status | Meaning |\n|---|---|---|\n| `RATE_LIMITED` | 429 | You are sending requests too fast. Slow down and retry after `Retry-After`. |\n| `QUOTA_EXCEEDED` | 429 | You used the daily request quota for your key. |\n| `PRICE_UPDATE_COOLDOWN` | 429 | A business rule, not a rate limit: this offer's price was changed too recently. See **Price update cooldown**. |\n\n# Price update cooldown\n\nThe price of each offer can be changed at most once per cooldown window. The window is **15 minutes** for now and might\nbe shorten in the future. Do not hard-code it: read `priceCooldownSeconds` from `GET /me` and `priceUpdatableAt` from each offer.\n\n- A price change inside the window is rejected with `429 PRICE_UPDATE_COOLDOWN`. The response carries `Retry-After` (seconds until the price can change again) and `details.priceUpdatableAt`.\n- In a batch, an offer inside its window is reported as `cooldown` for that item and the rest of the batch still succeeds.\n- Sending the price the offer already has succeeds with `changed: false` and does **not** start a new window.\n- The cooldown is per offer: changing one offer's price does not delay another offer.\n\n# Pagination\n\n`GET /offers` returns offers newest first, in pages. Use `limit` (1 to 100, default 50) to set the page size.\nA page has `data`, `hasMore` and `nextAfter`. While `hasMore` is `true`, call the endpoint again with `after` set to the previous\npage's `nextAfter`, keeping the same filters. On the last page `hasMore` is `false` and `nextAfter` is `null`.\n\n# Errors\n\nEvery error uses the same envelope:\n\n```json\n{\n  \"error\": {\n    \"code\": \"OFFER_NOT_FOUND\",\n    \"message\": \"Offer not found.\",\n    \"requestId\": \"3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b\",\n    \"details\": {}\n  }\n}\n```\n\n- `code` is stable and machine-readable: branch on it, not on `message`, which may change.\n- `message` is a human-readable explanation.\n- `requestId` identifies the request and is also returned in the `x-request-id` header. **Include it when you contact ChicksGold Support.**\n- `details` is optional and depends on the code.\n\n| Status | Code | When |\n|---|---|---|\n| 400 | `VALIDATION_FAILED` | The request is malformed, has unknown fields or invalid values. `details.errors` lists each problem. |\n| 400, 413, 415 | `BAD_REQUEST` | The request was rejected before it was processed. |\n| 401 | `INVALID_API_KEY` | The `x-api-key` header is missing or the key is invalid. |\n| 403 | `API_KEY_NOT_REGISTERED` | The key is valid but is not registered for a seller account. |\n| 403 | `API_KEY_DISABLED` | The key has been disabled. |\n| 403 | `SELLER_API_DISABLED` | API access is not enabled for your account. |\n| 403 | `SELLER_RESTRICTED` | Activating a paused offer while your seller account is restricted. Contact support and quote the `Ref` in the message. |\n| 403 | `FORBIDDEN` | The request could not be authorized. Contact support with the `requestId`. |\n| 404 | `NOT_FOUND` | The path or method does not exist. |\n| 404 | `OFFER_NOT_FOUND` | The offer does not exist or is not yours. |\n| 409 | `OFFER_OUT_OF_STOCK` | The offer cannot be activated because it has no stock. |\n| 409 | `OFFER_NOT_ACTIVATABLE` | The offer's status (`unavailable`) cannot be changed through the API. |\n| 413 | `BATCH_TOO_LARGE` | A batch has more than 100 items. |\n| 413 | `PAYLOAD_TOO_LARGE` | The request body is larger than 1 MiB. |\n| 429 | `RATE_LIMITED` | Too many requests per second. |\n| 429 | `QUOTA_EXCEEDED` | The daily quota was used. |\n| 429 | `PRICE_UPDATE_COOLDOWN` | The offer's price was changed too recently. |\n| 500 | `INTERNAL_ERROR` | Unexpected error. |\n| 502 and other 5xx | `UPSTREAM_ERROR` | A temporary problem on our side. **Retry with exponential backoff.** |\n\nA `5xx` response is temporary: wait, then retry with backoff (for example 1 s, 2 s, 4 s, up to a few attempts). Retries are safe by design:\nsending the price an offer already has returns `changed: false`, and pause and activate can be repeated safely. If the problem\ncontinues, contact support with the `requestId`.\n"
  },
  "servers": [
    {
      "url": "https://api.chicksgold.com/v1",
      "description": "Production"
    },
    {
      "url": "https://staging-api.chicksgold.com/v1",
      "description": "Staging"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "The authenticated seller and the current limits."
    },
    {
      "name": "Offers",
      "description": "List, read, pause and activate your Currency offers."
    },
    {
      "name": "Pricing",
      "description": "Update offer prices, one at a time or in batches. Subject to the per-offer price update cooldown."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Seller API",
      "tags": [
        "Account",
        "Offers",
        "Pricing"
      ]
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "getMe",
        "summary": "Get the authenticated seller",
        "description": "Returns the seller your API key belongs to and the current price update cooldown. Use `priceCooldownSeconds`\nto plan your price updates (see **Price update cooldown**).\n",
        "responses": {
          "200": {
            "description": "The seller and the current limits.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                },
                "example": {
                  "sellerId": 4821,
                  "username": "GoldForge",
                  "priceCooldownSeconds": 900
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X GET \"https://api.chicksgold.com/v1/me\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\"\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/me\", {\n  method: \"GET\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n  },\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.chicksgold.com/v1/me\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers": {
      "get": {
        "tags": [
          "Offers"
        ],
        "operationId": "listOffers",
        "summary": "List your currency offers",
        "description": "Returns only the offers that belong to you, newest first, in pages. Pass `nextAfter` from a page as `after` to get the\nnext page (see **Pagination**).\n",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only offers with this status.",
            "schema": {
              "$ref": "#/components/schemas/OfferStatus"
            }
          },
          {
            "name": "gameId",
            "in": "query",
            "description": "Only offers for this game.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 12
          },
          {
            "name": "updatedSince",
            "in": "query",
            "description": "Only offers updated at or after this instant (ISO 8601, UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-06T00:00:00Z"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "example": 50
          },
          {
            "name": "after",
            "in": "query",
            "description": "Offer id to continue after. Pass `nextAfter` from the previous page. Omit it for the first page.",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "example": 55123
          }
        ],
        "responses": {
          "200": {
            "description": "A page of offers.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferPage"
                },
                "examples": {
                  "firstPage": {
                    "summary": "First page, more offers follow",
                    "value": {
                      "data": [
                        {
                          "id": 55123,
                          "gameId": 12,
                          "gameName": "WoW Classic",
                          "name": "Firemaw - Horde",
                          "status": "active",
                          "price": 0.0425,
                          "currency": "USD",
                          "unit": "G",
                          "quantity": 120000,
                          "minimum": 1000,
                          "deliveryTime": 30,
                          "deliveryPeriod": "Minutes",
                          "expiresAt": "2026-12-01T10:00:00Z",
                          "priceUpdatableAt": "2026-11-06T14:18:22Z",
                          "updatedAt": "2026-11-06T14:03:22Z"
                        }
                      ],
                      "hasMore": true,
                      "nextAfter": 55123
                    }
                  },
                  "lastPage": {
                    "summary": "Last page",
                    "value": {
                      "data": [
                        {
                          "id": 55090,
                          "gameId": 12,
                          "gameName": "WoW Classic",
                          "name": "Firemaw - Alliance",
                          "status": "paused",
                          "price": 0.0399,
                          "currency": "USD",
                          "unit": "G",
                          "quantity": 80000,
                          "minimum": 1000,
                          "deliveryTime": 30,
                          "deliveryPeriod": "Minutes",
                          "expiresAt": null,
                          "priceUpdatableAt": "2026-11-06T13:40:10Z",
                          "updatedAt": "2026-11-06T13:25:10Z"
                        }
                      ],
                      "hasMore": false,
                      "nextAfter": null
                    }
                  },
                  "empty": {
                    "summary": "No offers match",
                    "value": {
                      "data": [],
                      "hasMore": false,
                      "nextAfter": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X GET \"https://api.chicksgold.com/v1/offers?status=active&limit=50\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\"\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers?status=active&limit=50\", {\n  method: \"GET\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n  },\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.chicksgold.com/v1/offers?status=active&limit=50\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers/{offerId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/OfferId"
        }
      ],
      "get": {
        "tags": [
          "Offers"
        ],
        "operationId": "getOffer",
        "summary": "Get one of your offers",
        "description": "Returns one offer. An offer that does not exist or is not yours returns `404 OFFER_NOT_FOUND`.\n",
        "responses": {
          "200": {
            "description": "The offer.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Offer"
                },
                "examples": {
                  "active": {
                    "$ref": "#/components/examples/OfferActive"
                  },
                  "ffxiv": {
                    "$ref": "#/components/examples/OfferFfxiv"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X GET \"https://api.chicksgold.com/v1/offers/55123\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\"\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers/55123\", {\n  method: \"GET\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n  },\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.chicksgold.com/v1/offers/55123\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers/{offerId}/pause": {
      "parameters": [
        {
          "$ref": "#/components/parameters/OfferId"
        }
      ],
      "post": {
        "tags": [
          "Offers"
        ],
        "operationId": "pauseOffer",
        "summary": "Pause (unlist) an offer",
        "description": "The offer stops being shown to buyers. Pausing an offer that is already paused succeeds with `changed: false`.\nOffers with status `unavailable` cannot be paused (`409 OFFER_NOT_ACTIVATABLE`).\n",
        "responses": {
          "200": {
            "description": "The offer after the change. `changed` is `false` when the offer was already paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferChangeResult"
                },
                "examples": {
                  "paused": {
                    "summary": "The offer was paused",
                    "value": {
                      "changed": true,
                      "offer": {
                        "id": 55123,
                        "gameId": 12,
                        "gameName": "WoW Classic",
                        "name": "Firemaw - Horde",
                        "status": "paused",
                        "price": 0.0425,
                        "currency": "USD",
                        "unit": "G",
                        "quantity": 120000,
                        "minimum": 1000,
                        "deliveryTime": 30,
                        "deliveryPeriod": "Minutes",
                        "expiresAt": "2026-12-01T10:00:00Z",
                        "priceUpdatableAt": "2026-11-06T14:18:22Z",
                        "updatedAt": "2026-11-06T14:20:01Z"
                      }
                    }
                  },
                  "alreadyPaused": {
                    "summary": "The offer was already paused",
                    "value": {
                      "changed": false,
                      "offer": {
                        "id": 55123,
                        "gameId": 12,
                        "gameName": "WoW Classic",
                        "name": "Firemaw - Horde",
                        "status": "paused",
                        "price": 0.0425,
                        "currency": "USD",
                        "unit": "G",
                        "quantity": 120000,
                        "minimum": 1000,
                        "deliveryTime": 30,
                        "deliveryPeriod": "Minutes",
                        "expiresAt": "2026-12-01T10:00:00Z",
                        "priceUpdatableAt": "2026-11-06T14:18:22Z",
                        "updatedAt": "2026-11-06T14:20:01Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ConflictNotActivatable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X POST \"https://api.chicksgold.com/v1/offers/55123/pause\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\"\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers/55123/pause\", {\n  method: \"POST\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n  },\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.chicksgold.com/v1/offers/55123/pause\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers/{offerId}/activate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/OfferId"
        }
      ],
      "post": {
        "tags": [
          "Offers"
        ],
        "operationId": "activateOffer",
        "summary": "Activate (list) an offer",
        "description": "Makes the offer visible to buyers. Activating an offer that is already active succeeds with `changed: false`.\nFails with `409 OFFER_OUT_OF_STOCK` when the offer has no stock, with `409 OFFER_NOT_ACTIVATABLE` when its status is\n`unavailable`, and with `403 SELLER_RESTRICTED` when you try to activate a paused offer while your seller account is restricted.\n",
        "responses": {
          "200": {
            "description": "The offer after the change. `changed` is `false` when the offer was already active.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferChangeResult"
                },
                "example": {
                  "changed": true,
                  "offer": {
                    "id": 55123,
                    "gameId": 12,
                    "gameName": "WoW Classic",
                    "name": "Firemaw - Horde",
                    "status": "active",
                    "price": 0.0425,
                    "currency": "USD",
                    "unit": "G",
                    "quantity": 120000,
                    "minimum": 1000,
                    "deliveryTime": 30,
                    "deliveryPeriod": "Minutes",
                    "expiresAt": "2026-12-01T10:00:00Z",
                    "priceUpdatableAt": "2026-11-06T14:18:22Z",
                    "updatedAt": "2026-11-06T14:25:40Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenActivate"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ConflictActivate"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X POST \"https://api.chicksgold.com/v1/offers/55123/activate\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\"\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers/55123/activate\", {\n  method: \"POST\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n  },\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.chicksgold.com/v1/offers/55123/activate\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers/{offerId}/price": {
      "parameters": [
        {
          "$ref": "#/components/parameters/OfferId"
        }
      ],
      "put": {
        "tags": [
          "Pricing"
        ],
        "operationId": "setOfferPrice",
        "summary": "Set an offer's price",
        "description": "Sets the price of one offer, in USD per 1 `unit` (see **Prices and units**). The price must be between 0.00001 and 10000\nwith at most 5 decimal places; more decimals are rejected, never rounded. Each offer's price can change at most once per\ncooldown window (see **Price update cooldown**). Sending the price the offer already has succeeds with `changed: false`\nand does not start a new window.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPriceRequest"
              },
              "example": {
                "price": 0.0425
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Price applied, or unchanged when the offer already had that price.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferChangeResult"
                },
                "examples": {
                  "changed": {
                    "summary": "Price changed",
                    "value": {
                      "changed": true,
                      "offer": {
                        "id": 55123,
                        "gameId": 12,
                        "gameName": "WoW Classic",
                        "name": "Firemaw - Horde",
                        "status": "active",
                        "price": 0.0425,
                        "currency": "USD",
                        "unit": "G",
                        "quantity": 120000,
                        "minimum": 1000,
                        "deliveryTime": 30,
                        "deliveryPeriod": "Minutes",
                        "expiresAt": "2026-12-01T10:00:00Z",
                        "priceUpdatableAt": "2026-11-06T14:18:22Z",
                        "updatedAt": "2026-11-06T14:03:22Z"
                      }
                    }
                  },
                  "unchanged": {
                    "summary": "The offer already had this price",
                    "value": {
                      "changed": false,
                      "offer": {
                        "id": 55123,
                        "gameId": 12,
                        "gameName": "WoW Classic",
                        "name": "Firemaw - Horde",
                        "status": "active",
                        "price": 0.0425,
                        "currency": "USD",
                        "unit": "G",
                        "quantity": 120000,
                        "minimum": 1000,
                        "deliveryTime": 30,
                        "deliveryPeriod": "Minutes",
                        "expiresAt": "2026-12-01T10:00:00Z",
                        "priceUpdatableAt": "2026-11-06T14:18:22Z",
                        "updatedAt": "2026-11-06T14:03:22Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/OfferNotFound"
          },
          "429": {
            "$ref": "#/components/responses/PriceCooldown"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X PUT \"https://api.chicksgold.com/v1/offers/55123/price\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"price\": 0.0425}'\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers/55123/price\", {\n  method: \"PUT\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\"price\": 0.0425}),\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://api.chicksgold.com/v1/offers/55123/price\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    json={\"price\": 0.0425},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    },
    "/offers/prices:batch": {
      "post": {
        "tags": [
          "Pricing"
        ],
        "operationId": "setOfferPricesBatch",
        "summary": "Set prices for up to 100 offers",
        "description": "Changes the price of up to 100 offers in one call. Each item is processed independently: the response is `200` with one\nresult per item, in request order, even if some items fail. Offers that are not yours report `not_found`, and an offer\nthat is still in its cooldown window reports `cooldown` with `retryAfterSeconds`. An offer may appear only once per batch.\nMore than 100 items returns `413 BATCH_TOO_LARGE`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPriceRequest"
              },
              "example": {
                "items": [
                  {
                    "offerId": 55123,
                    "price": 0.0425
                  },
                  {
                    "offerId": 55124,
                    "price": 0.0399
                  },
                  {
                    "offerId": 99999,
                    "price": 0.05
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per item, in request order.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchPriceResponse"
                },
                "example": {
                  "summary": {
                    "updated": 1,
                    "unchanged": 0,
                    "cooldown": 1,
                    "notFound": 1,
                    "invalid": 0
                  },
                  "results": [
                    {
                      "offerId": 55123,
                      "status": "updated",
                      "price": 0.0425
                    },
                    {
                      "offerId": 55124,
                      "status": "cooldown",
                      "price": 0.0399,
                      "retryAfterSeconds": 312,
                      "priceUpdatableAt": "2026-11-06T14:08:34Z"
                    },
                    {
                      "offerId": 99999,
                      "status": "not_found",
                      "price": 0.05
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "413": {
            "$ref": "#/components/responses/BatchTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "502": {
            "$ref": "#/components/responses/TemporaryError"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl -X POST \"https://api.chicksgold.com/v1/offers/prices:batch\" \\\n  -H \"x-api-key: $CHICKSGOLD_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"items\": [{\"offerId\": 55123, \"price\": 0.0425}, {\"offerId\": 55124, \"price\": 0.0399}]}'\n"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (fetch)",
            "source": "const response = await fetch(\"https://api.chicksgold.com/v1/offers/prices:batch\", {\n  method: \"POST\",\n  headers: {\n    \"x-api-key\": process.env.CHICKSGOLD_API_KEY,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\"items\": [{\"offerId\": 55123, \"price\": 0.0425}, {\"offerId\": 55124, \"price\": 0.0399}]}),\n});\nconsole.log(response.status, await response.json());\n"
          },
          {
            "lang": "Python",
            "label": "Python (requests)",
            "source": "import os\nimport requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.chicksgold.com/v1/offers/prices:batch\",\n    headers={\"x-api-key\": os.environ[\"CHICKSGOLD_API_KEY\"]},\n    json={\"items\": [{\"offerId\": 55123, \"price\": 0.0425}, {\"offerId\": 55124, \"price\": 0.0399}]},\n    timeout=10,\n)\nprint(response.status_code, response.json())\n"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Send your API key in the `x-api-key` header. Your API key is provided to you by ChicksGold when your access is enabled.\nProduction and staging keys are different and not interchangeable. A missing or invalid key returns `401 INVALID_API_KEY`.\n"
      }
    },
    "parameters": {
      "OfferId": {
        "name": "offerId",
        "in": "path",
        "required": true,
        "description": "The offer id.",
        "schema": {
          "type": "integer",
          "format": "int64",
          "minimum": 1
        },
        "example": 55123
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "Unique id of this request. Include it when you contact support.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "RateLimit-Limit": {
        "description": "Price updates allowed per offer per window (always 1).",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "Price updates left for this offer in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until this offer's price can change again.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed, has unknown fields or has invalid values. `details.errors` lists each problem.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "VALIDATION_FAILED",
                "message": "The request is not valid.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b",
                "details": {
                  "errors": [
                    {
                      "field": "price",
                      "message": "price must be between 0.00001 and 10000."
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The `x-api-key` header is missing or the key is invalid.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "INVALID_API_KEY",
                "message": "The API key is missing or invalid.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "The request is understood but not allowed. `code` tells you why: `API_KEY_NOT_REGISTERED`, `API_KEY_DISABLED`,\n`SELLER_API_DISABLED` or `FORBIDDEN`.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "apiKeyNotRegistered": {
                "summary": "Key not registered",
                "value": {
                  "error": {
                    "code": "API_KEY_NOT_REGISTERED",
                    "message": "The API key is not registered for the Seller API.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              },
              "apiKeyDisabled": {
                "summary": "Key disabled",
                "value": {
                  "error": {
                    "code": "API_KEY_DISABLED",
                    "message": "Seller API access is disabled for this API key.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              },
              "sellerApiDisabled": {
                "summary": "Access not enabled for the account",
                "value": {
                  "error": {
                    "code": "SELLER_API_DISABLED",
                    "message": "Seller API access is not enabled for this account.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "ForbiddenActivate": {
        "description": "The request is not allowed. In addition to the codes listed for the other endpoints (`API_KEY_NOT_REGISTERED`,\n`API_KEY_DISABLED`, `SELLER_API_DISABLED`), activating a paused offer returns `SELLER_RESTRICTED`\nwhen your seller account is restricted. The `Ref` at the end of the message identifies the restriction for support; its value varies.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "sellerRestricted": {
                "summary": "Account restricted",
                "value": {
                  "error": {
                    "code": "SELLER_RESTRICTED",
                    "message": "We're unable to process this request. Contact support. Ref: IBLv1",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "OfferNotFound": {
        "description": "The offer does not exist or is not yours.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "OFFER_NOT_FOUND",
                "message": "Offer not found.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
              }
            }
          }
        }
      },
      "ConflictNotActivatable": {
        "description": "The offer's status (`unavailable`) cannot be changed through the API.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "OFFER_NOT_ACTIVATABLE",
                "message": "This offer's status cannot be changed through the API.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
              }
            }
          }
        }
      },
      "ConflictActivate": {
        "description": "The offer cannot be activated in its current state.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "outOfStock": {
                "summary": "The offer has no stock",
                "value": {
                  "error": {
                    "code": "OFFER_OUT_OF_STOCK",
                    "message": "This offer cannot be activated while it is out of stock.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              },
              "notActivatable": {
                "summary": "The offer's status cannot be changed",
                "value": {
                  "error": {
                    "code": "OFFER_NOT_ACTIVATABLE",
                    "message": "This offer's status cannot be changed through the API.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "BatchTooLarge": {
        "description": "The batch has more than 100 items (`BATCH_TOO_LARGE`), or the request body is larger than 1 MiB (`PAYLOAD_TOO_LARGE`).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "batchTooLarge": {
                "summary": "More than 100 items",
                "value": {
                  "error": {
                    "code": "BATCH_TOO_LARGE",
                    "message": "A batch holds at most 100 items.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              },
              "payloadTooLarge": {
                "summary": "Request body too large",
                "value": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "The request body is too large. The maximum is 1 MiB.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests (`RATE_LIMITED`) or the daily quota is used (`QUOTA_EXCEEDED`). Wait for `Retry-After` seconds and retry with backoff.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "rateLimited": {
                "summary": "Too many requests per second",
                "value": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many requests. Slow down.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              },
              "quotaExceeded": {
                "summary": "Daily quota used",
                "value": {
                  "error": {
                    "code": "QUOTA_EXCEEDED",
                    "message": "The daily request quota for this API key was exceeded.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "PriceCooldown": {
        "description": "Either this offer's price was changed too recently (`PRICE_UPDATE_COOLDOWN`, a business rule, with the cooldown headers),\nor a request limit was hit (`RATE_LIMITED` or `QUOTA_EXCEEDED`). Read `Retry-After` and retry after that many seconds.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "cooldown": {
                "summary": "Price changed too recently",
                "value": {
                  "error": {
                    "code": "PRICE_UPDATE_COOLDOWN",
                    "message": "This offer's price was changed too recently.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b",
                    "details": {
                      "priceUpdatableAt": "2026-11-06T14:08:34Z"
                    }
                  }
                }
              },
              "rateLimited": {
                "summary": "Too many requests per second",
                "value": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many requests. Slow down.",
                    "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
                  }
                }
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected error. Contact support with the `requestId` if it persists.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "INTERNAL_ERROR",
                "message": "Internal error.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
              }
            }
          }
        }
      },
      "TemporaryError": {
        "description": "A temporary problem on our side. Retry with exponential backoff. Other `5xx` statuses use the same envelope.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "UPSTREAM_ERROR",
                "message": "The service is temporarily unavailable. Try again later.",
                "requestId": "3f0c2a8e-6d7b-4b1e-9b0a-2e1f4c5d6a7b"
              }
            }
          }
        }
      }
    },
    "examples": {
      "OfferActive": {
        "summary": "An active offer",
        "value": {
          "id": 55123,
          "gameId": 12,
          "gameName": "WoW Classic",
          "name": "Firemaw - Horde",
          "status": "active",
          "price": 0.0425,
          "currency": "USD",
          "unit": "G",
          "quantity": 120000,
          "minimum": 1000,
          "deliveryTime": 30,
          "deliveryPeriod": "Minutes",
          "expiresAt": "2026-12-01T10:00:00Z",
          "priceUpdatableAt": "2026-11-06T14:18:22Z",
          "updatedAt": "2026-11-06T14:03:22Z"
        }
      },
      "OfferFfxiv": {
        "summary": "An offer sold in millions",
        "value": {
          "id": 55201,
          "gameId": 31,
          "gameName": "Final Fantasy XIV",
          "name": "Gilgamesh",
          "status": "active",
          "price": 0.2665,
          "currency": "USD",
          "unit": "M",
          "quantity": 5000,
          "minimum": 10,
          "deliveryTime": 1,
          "deliveryPeriod": "Hours",
          "expiresAt": null,
          "priceUpdatableAt": "2026-11-06T14:18:22Z",
          "updatedAt": "2026-11-06T14:03:22Z"
        }
      }
    },
    "schemas": {
      "OfferStatus": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "unavailable"
        ],
        "description": "`active` = visible to buyers; `paused` = unlisted; `unavailable` = in any other state. An `unavailable` offer is read-only:\nit cannot be activated or paused (`409 OFFER_NOT_ACTIVATABLE`).\n"
      },
      "Price": {
        "type": "number",
        "minimum": 0.00001,
        "maximum": 10000,
        "description": "USD per 1 `unit` of the offer's game currency. A JSON number with at most 5 decimal places; more decimals are rejected, never rounded."
      },
      "Offer": {
        "type": "object",
        "required": [
          "id",
          "gameId",
          "name",
          "status",
          "price",
          "currency",
          "unit",
          "quantity",
          "minimum",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "The offer id."
          },
          "gameId": {
            "type": "integer",
            "format": "int64",
            "description": "The game the offer belongs to."
          },
          "gameName": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Variant of the offer, for example server and faction."
          },
          "status": {
            "$ref": "#/components/schemas/OfferStatus"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "currency": {
            "type": "string",
            "const": "USD"
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Unit symbol of the game currency, for example `M`, `K` or `G`."
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "readOnly": true,
            "description": "Units available, in `unit`. Managed on the ChicksGold website."
          },
          "minimum": {
            "type": "number",
            "minimum": 0,
            "readOnly": true,
            "description": "Minimum units per order, in `unit`. Managed on the ChicksGold website."
          },
          "deliveryTime": {
            "type": "integer"
          },
          "deliveryPeriod": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Instant",
              "Minutes",
              "Hours",
              "Days",
              "Weeks",
              "Months",
              null
            ],
            "description": "The period `deliveryTime` is expressed in. Returned exactly as written here, with an initial capital letter (for example `Minutes`), or null."
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "priceUpdatableAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Earliest instant the price can change again."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OfferPage": {
        "type": "object",
        "required": [
          "data",
          "hasMore",
          "nextAfter"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Offer"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when more offers follow this page."
          },
          "nextAfter": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Id of the last offer on this page, to send as `after`. Null on the last page."
          }
        }
      },
      "OfferChangeResult": {
        "type": "object",
        "required": [
          "changed",
          "offer"
        ],
        "properties": {
          "changed": {
            "type": "boolean",
            "description": "False when nothing needed changing (already paused, already active, or the price was already this value). No cooldown started in that case."
          },
          "offer": {
            "$ref": "#/components/schemas/Offer"
          }
        }
      },
      "SetPriceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "price"
        ],
        "properties": {
          "price": {
            "$ref": "#/components/schemas/Price"
          }
        }
      },
      "BatchPriceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "offerId",
                "price"
              ],
              "properties": {
                "offerId": {
                  "type": "integer",
                  "format": "int64",
                  "minimum": 1
                },
                "price": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            }
          }
        }
      },
      "BatchPriceResponse": {
        "type": "object",
        "required": [
          "summary",
          "results"
        ],
        "properties": {
          "summary": {
            "type": "object",
            "properties": {
              "updated": {
                "type": "integer"
              },
              "unchanged": {
                "type": "integer"
              },
              "cooldown": {
                "type": "integer"
              },
              "notFound": {
                "type": "integer"
              },
              "invalid": {
                "type": "integer"
              }
            }
          },
          "results": {
            "type": "array",
            "description": "One result per request item, in request order.",
            "items": {
              "type": "object",
              "required": [
                "offerId",
                "status"
              ],
              "properties": {
                "offerId": {
                  "type": "integer",
                  "format": "int64"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "updated",
                    "unchanged",
                    "cooldown",
                    "not_found",
                    "invalid"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The price sent for this item."
                },
                "retryAfterSeconds": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Seconds until the price can change again. Present when `status` is `cooldown`."
                },
                "priceUpdatableAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Present when `status` is `cooldown`."
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Why the item is `invalid`."
                }
              }
            }
          }
        }
      },
      "Me": {
        "type": "object",
        "required": [
          "sellerId",
          "priceCooldownSeconds"
        ],
        "properties": {
          "sellerId": {
            "type": "integer",
            "format": "int64"
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "priceCooldownSeconds": {
            "type": "integer",
            "description": "Current per-offer price cooldown, in seconds."
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine-readable code. See the table in **Errors**.",
            "enum": [
              "VALIDATION_FAILED",
              "BAD_REQUEST",
              "INVALID_API_KEY",
              "API_KEY_NOT_REGISTERED",
              "API_KEY_DISABLED",
              "SELLER_API_DISABLED",
              "SELLER_RESTRICTED",
              "FORBIDDEN",
              "NOT_FOUND",
              "OFFER_NOT_FOUND",
              "OFFER_OUT_OF_STOCK",
              "OFFER_NOT_ACTIVATABLE",
              "BATCH_TOO_LARGE",
              "PAYLOAD_TOO_LARGE",
              "RATE_LIMITED",
              "QUOTA_EXCEEDED",
              "PRICE_UPDATE_COOLDOWN",
              "INTERNAL_ERROR",
              "UPSTREAM_ERROR"
            ]
          },
          "message": {
            "type": "string",
            "description": "A human-readable explanation. Do not parse it."
          },
          "requestId": {
            "type": "string",
            "description": "Identifies the request. Include it when you contact support."
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Extra information that depends on the code."
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        }
      }
    }
  }
}