{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.g2a.com"
    },
    {
      "url": "https://sandboxapi.g2a.com"
    }
  ],
  "info": {
    "version": "0.1.0",
    "title": "Export Api"
  },
  "tags": [
    {
      "name": "authentication",
      "description": "OAuth2 authentication endpoints"
    },
    {
      "name": "order",
      "description": "Order-related operations"
    },
    {
      "name": "product",
      "description": "Product-related endpoints"
    }
  ],
  "components": {
    "schemas": {
      "BaseResponse": {
        "type": "object",
        "properties": {
          "traceId": {
            "$ref": "#/components/schemas/ErrorResponse/properties/traceId"
          }
        }
      },
      "ProductCatalogId": {
        "type": "string",
        "minLength": 14,
        "maxLength": 14,
        "pattern": "^[1-9][0-9]{13}$",
        "description": "Must be exactly 14 digits and numeric (e.g. 10000004439009).",
        "example": "10000004439009",
        "x-validation": [
          {
            "values": [
              "numeric"
            ]
          }
        ]
      },
      "Date": {
        "type": "string",
        "format": "date",
        "description": "ISO 8601 calendar date (`YYYY-MM-DD` only; no clock time).",
        "example": "2024-01-01"
      },
      "DateTime": {
        "type": "string",
        "format": "date-time",
        "description": "ISO 8601 instant in time (RFC 3339; date and time of day, typically with time zone).",
        "example": "2018-07-09T14:40:39.851Z"
      },
      "CreateOrderRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "example": [
              {
                "auto": {
                  "productId": "10000004439009",
                  "quantity": 2,
                  "maxPrice": "29.99"
                }
              },
              {
                "manual": {
                  "offerId": "660e8400-e29b-41d4-a716-446655440001",
                  "quantity": 1,
                  "maxPrice": "19.99"
                }
              }
            ],
            "items": {
              "$ref": "#/components/schemas/OrderItemRequest"
            }
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR"
            ],
            "description": "Transaction currency",
            "example": "EUR"
          }
        }
      },
      "MaxPrice": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PriceType"
          },
          {
            "description": "Maximum price willing to pay (must be greater than 0)",
            "x-validation": [
              {
                "name": "gtdecimal",
                "values": [
                  0
                ]
              },
              {
                "name": "ltdecimal",
                "values": [
                  100000000000
                ]
              },
              {
                "name": "maxdecimalplaces",
                "values": [
                  2
                ]
              }
            ]
          }
        ]
      },
      "OrderItemRequest": {
        "oneOf": [
          {
            "type": "object",
            "title": "Auto",
            "required": [
              "auto"
            ],
            "properties": {
              "auto": {
                "type": "object",
                "required": [
                  "productId",
                  "quantity",
                  "maxPrice"
                ],
                "properties": {
                  "productId": {
                    "$ref": "#/components/schemas/ProductCatalogId"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25,
                    "description": "Number of items to purchase"
                  },
                  "maxPrice": {
                    "$ref": "#/components/schemas/MaxPrice"
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "title": "Manual",
            "required": [
              "manual"
            ],
            "properties": {
              "manual": {
                "type": "object",
                "required": [
                  "offerId",
                  "quantity",
                  "maxPrice"
                ],
                "properties": {
                  "offerId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Specific offer ID",
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25,
                    "description": "Number of items to purchase"
                  },
                  "maxPrice": {
                    "$ref": "#/components/schemas/MaxPrice"
                  }
                }
              }
            }
          }
        ]
      },
      "PriceType": {
        "type": "string",
        "description": "Dot separated, arbitrarily precise unsigned decimal number.",
        "format": "decimal",
        "x-format": "price",
        "pattern": "^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,12})?$",
        "example": 1234567890123456.0
      },
      "CreateOrderResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Order"
              }
            }
          }
        ]
      },
      "GetOrdersResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data",
              "meta"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "meta": {
                "$ref": "#/components/schemas/Pagination"
              }
            }
          }
        ]
      },
      "Pagination": {
        "type": "object",
        "required": [
          "page",
          "itemsPerPage",
          "totalResults",
          "hasNext",
          "hasPrevious"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "description": "Current page number"
          },
          "itemsPerPage": {
            "type": "integer",
            "description": "Number of items per page"
          },
          "totalResults": {
            "type": "integer",
            "description": "Total number of results"
          },
          "hasNext": {
            "type": "boolean",
            "description": "Whether there is a next page"
          },
          "hasPrevious": {
            "type": "boolean",
            "description": "Whether there is a previous page"
          }
        }
      },
      "Order": {
        "type": "object",
        "required": [
          "id",
          "status",
          "createdAt",
          "discount",
          "totalPrice",
          "currency",
          "items"
        ],
        "properties": {
          "id": {
            "allOf": [
              {
                "description": "Order increment identifier",
                "type": "string",
                "example": 90200000092092
              },
              {
                "minLength": 14,
                "maxLength": 16,
                "x-validation": [
                  {
                    "values": [
                      "numeric"
                    ]
                  }
                ]
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "Order status in Export API vocabulary",
            "enum": [
              "pending",
              "processing",
              "held",
              "complete",
              "canceled",
              "closed",
              "pending_payment"
            ]
          },
          "createdAt": {
            "description": "Order creation date in UTC format",
            "type": "string",
            "format": "date-time",
            "example": "2019-08-08T11:12:59Z"
          },
          "discount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceType"
              },
              {
                "description": "Discount amount in order currency"
              }
            ]
          },
          "totalPrice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceType"
              },
              {
                "description": "Total order amount in order currency"
              }
            ]
          },
          "currency": {
            "description": "Currency code in which the order was placed (ISO 4217)",
            "type": "string",
            "example": "PLN",
            "pattern": "^([A-Z]{3})$"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          }
        }
      },
      "Transaction": {
        "type": "object",
        "required": [
          "id",
          "seller",
          "items"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Transaction ID"
          },
          "seller": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Seller ID"
              },
              "name": {
                "type": "string",
                "description": "Seller name"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionItem"
            }
          }
        }
      },
      "TransactionItem": {
        "type": "object",
        "required": [
          "id",
          "product",
          "offer",
          "quantity",
          "price",
          "totalPrice",
          "seller"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Order item ID"
          },
          "product": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "description": "Product identifier",
                "type": "string",
                "example": "10000176447001"
              },
              "name": {
                "description": "Product name",
                "type": "string",
                "example": "Lost Ember Steam Key EUROPE"
              }
            }
          },
          "offer": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "A unique offer identifier",
                "type": "string",
                "example": "bdce3648-2f8b-4d54-bf0c-9675f5977b53",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              }
            }
          },
          "quantity": {
            "type": "object",
            "required": [
              "ordered",
              "invoiced",
              "shipped",
              "refunded"
            ],
            "properties": {
              "ordered": {
                "description": "Ordered quantity of selected item",
                "type": "integer",
                "pattern": "^([0-9]+)$",
                "example": 2
              },
              "invoiced": {
                "description": "Invoiced quantity of selected item",
                "type": "integer",
                "pattern": "^([0-9]+)$",
                "example": 2
              },
              "shipped": {
                "description": "Shipped quantity of selected item",
                "type": "integer",
                "pattern": "^([0-9]+)$",
                "example": 2
              },
              "refunded": {
                "description": "Refunded quantity of selected item",
                "type": "integer",
                "pattern": "^([0-9]+)$",
                "example": 2
              }
            }
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceType"
              },
              {
                "description": "Unit price in order currency"
              }
            ]
          },
          "totalPrice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceType"
              },
              {
                "description": "Line total in order currency"
              }
            ]
          }
        }
      },
      "GetOrderKeysResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrderKeys"
                }
              }
            }
          }
        ]
      },
      "GetProductsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data",
              "meta"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Products"
              },
              "meta": {
                "$ref": "#/components/schemas/Pagination"
              }
            }
          }
        ]
      },
      "Products": {
        "type": "array",
        "description": "Products",
        "items": {
          "$ref": "#/components/schemas/Product"
        }
      },
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "totalQuantity",
          "minPrice",
          "updatedAt",
          "offers",
          "currency"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProductCatalogId"
          },
          "name": {
            "type": "string",
            "description": "Product name",
            "example": "Diablo"
          },
          "totalQuantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "description": "Number of all available items",
            "example": 321
          },
          "minPrice": {
            "type": "string",
            "description": "Minimal offer price",
            "example": "4.12"
          },
          "updatedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "Last offer update instant (UTC, RFC 3339)."
              }
            ]
          },
          "offers": {
            "type": "array",
            "description": "Up to 3 cheapest offers, sorted by price ascending",
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/ProductOffer"
            }
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR"
            ],
            "description": "Currency code of all prices",
            "example": "EUR"
          }
        }
      },
      "MetaPagination": {
        "type": "object",
        "required": [
          "page",
          "itemsPerPage",
          "totalResults"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of current page",
            "example": 1
          },
          "itemsPerPage": {
            "type": "integer",
            "description": "Number of items per page",
            "example": 20
          },
          "totalResults": {
            "type": "integer",
            "description": "Numbers of all items in total",
            "example": 27
          }
        }
      },
      "OrderKeys": {
        "type": "object",
        "required": [
          "item",
          "keys"
        ],
        "properties": {
          "item": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Order item identifier",
                "example": 120023
              }
            }
          },
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemKey"
            }
          }
        }
      },
      "OrderItemKey": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Item key"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "traceId": {
            "type": "string",
            "description": "OpenTelemetry trace ID for request tracking and debugging",
            "example": "0af7651916cd43dd8448eb211c80319c"
          },
          "error": {
            "type": "object",
            "description": "Error object containing information about the error occurrence",
            "required": [
              "code",
              "status",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "String based error identification code",
                "example": "invalid_data"
              },
              "message": {
                "type": "string",
                "description": "Human readable error message",
                "example": "Here is an error message in human friendly form"
              },
              "status": {
                "type": "integer",
                "description": "Status code matching HTTP status",
                "example": 400
              },
              "data": {
                "type": "object",
                "description": "Object containing any additional data that accompany error",
                "additionalProperties": true
              },
              "privateDebug": {
                "type": "object",
                "description": "Object containing private debug information that CANNOT be exposed publicly",
                "additionalProperties": true
              },
              "errors": {
                "type": "array",
                "nullable": true,
                "description": "Additional sub-errors exposing more details about the issue",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "String based error identification code",
                      "example": "invalid_characters"
                    },
                    "field": {
                      "type": "string",
                      "description": "Dot separated path reference to original payload",
                      "example": "user.firstName"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human readable error message",
                      "example": "First name cannot have fancy characters"
                    }
                  }
                }
              },
              "doc_url": {
                "type": "string",
                "description": "URL pointing to documentation that is related to this error",
                "example": "https://example.com/"
              }
            }
          }
        }
      },
      "ProductOffer": {
        "type": "object",
        "required": [
          "id",
          "price",
          "quantity"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Offer ID",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "price": {
            "type": "string",
            "pattern": "^[0-9]+(\\.[0-9]{0,2})?$",
            "description": "Price for offer",
            "example": "12.20"
          },
          "quantity": {
            "type": "integer",
            "description": "Number of available items",
            "example": 3
          }
        }
      },
      "ProductWithOffers": {
        "type": "object",
        "required": [
          "id",
          "name",
          "totalQuantity",
          "offers",
          "updatedAt",
          "currency"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProductCatalogId"
          },
          "name": {
            "type": "string",
            "description": "Product name",
            "example": "Diablo"
          },
          "totalQuantity": {
            "$ref": "#/components/schemas/Product/properties/totalQuantity"
          },
          "offers": {
            "type": "array",
            "description": "Up to 3 cheapest offers, sorted by price ascending",
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/ProductOffer"
            }
          },
          "updatedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "Last offer update instant (UTC, RFC 3339)."
              }
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR"
            ],
            "description": "Currency code of all prices",
            "example": "EUR"
          }
        }
      },
      "GetProductResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ProductWithOffers"
              }
            }
          }
        ]
      },
      "ProductDetail": {
        "type": "object",
        "required": [
          "id",
          "name",
          "totalQuantity",
          "minPrice",
          "slug",
          "region",
          "developer",
          "publisher",
          "releaseDate",
          "platform",
          "categories",
          "requirements",
          "restrictions",
          "thumbnail",
          "portraitImage",
          "coverImage",
          "images",
          "videos",
          "updatedAt",
          "currency"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProductCatalogId"
          },
          "name": {
            "type": "string",
            "description": "Name of the product",
            "example": "Resident Evil Requiem Deluxe Edition PC"
          },
          "totalQuantity": {
            "$ref": "#/components/schemas/Product/properties/totalQuantity"
          },
          "minPrice": {
            "type": "string",
            "format": "float64",
            "description": "Minimal offer price",
            "example": "4.12",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "description": "Slug of the product",
            "example": "Games"
          },
          "region": {
            "type": "string",
            "description": "Region of the product (GLOBAL, EUROPE, AMERICA, NORTH AMERICA, RU/CIS, SOUTH EASTERN ASIA, WESTERN ASIA, GERMANY, INDIA, POLAND, UNITED KINGDOM etc.)",
            "example": "GLOBAL",
            "nullable": true
          },
          "developer": {
            "type": "string",
            "description": "Name of the product's developer",
            "example": "Sandfall Interactive",
            "nullable": true
          },
          "publisher": {
            "type": "string",
            "description": "Name of the product's publisher",
            "example": "Kepler Interactive",
            "nullable": true
          },
          "releaseDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Date"
              },
              {
                "description": "Release date of the product (calendar date only).",
                "example": "2017-09-29",
                "nullable": true
              }
            ]
          },
          "platform": {
            "type": "string",
            "description": "Platform where the product can be accessed or played (e.g., Steam, Origin, Uplay, GOG, Xbox, Apple, Gameforge, Oculus Rift, HTC Vive, PSN, Blizzard)",
            "example": "Steam",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "description": "Categories list",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ProductCategory"
            }
          },
          "requirements": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProductRequirements"
              },
              {
                "nullable": true
              }
            ]
          },
          "restrictions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProductRestrictions"
              },
              {
                "nullable": true
              }
            ]
          },
          "thumbnail": {
            "type": "string",
            "description": "URL of the product thumbnail image. Square crop (58×58 px), suitable for compact listings and icon-sized display.",
            "example": "https://images.g2a.com/g2a/58x58/0x1x1/351c02779637/59e62297ae653a34fe0e963c",
            "nullable": true
          },
          "portraitImage": {
            "type": "string",
            "description": "URL of the product portrait image. Vertical crop (230×336 px), used for product cards in category listings.",
            "example": "https://images.g2a.com/g2a/230x336/0x1x1/4869500b08da/59e62297ae653a34fe0e963c",
            "nullable": true
          },
          "coverImage": {
            "type": "string",
            "description": "URL of the product cover image at original resolution. Full-size vertical image, intended for product detail pages.",
            "example": "https://images.g2a.com/g2a/0x0/1x1x1/6414c300f0af/59e62297ae653a34fe0e963c",
            "nullable": true
          },
          "images": {
            "type": "array",
            "description": "Array of product image URLs",
            "nullable": true,
            "items": {
              "type": "string",
              "example": "https://images.g2a.com/g2a/0x0/1x1x1/ef5064778be1/59e62297ae653a32296b06a9"
            }
          },
          "videos": {
            "type": "array",
            "description": "Video URLs of the product",
            "nullable": true,
            "items": {
              "type": "string"
            },
            "example": [
              "https://www.youtube.com/watch?v=BXk6AZEysGY"
            ]
          },
          "updatedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "Last catalog update instant (UTC, RFC 3339).",
                "example": "2018-07-09T14:40:39.851Z",
                "nullable": true
              }
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR"
            ],
            "description": "Currency code of all prices",
            "example": "EUR"
          }
        }
      },
      "ProductCategory": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the category",
            "example": "1545"
          },
          "name": {
            "type": "string",
            "description": "Name of the category",
            "example": "Adventure"
          }
        }
      },
      "ProductRequirements": {
        "type": "object",
        "description": "Requirements of the product",
        "properties": {
          "minimal": {
            "$ref": "#/components/schemas/MinimalRequirements"
          },
          "recommended": {
            "$ref": "#/components/schemas/RecommendedRequirements"
          }
        }
      },
      "RequirementsFields": {
        "type": "object",
        "required": [
          "processor",
          "graphics",
          "memory",
          "diskSpace",
          "system",
          "other"
        ],
        "properties": {
          "processor": {
            "type": "string",
            "nullable": true,
            "description": "CPU processor",
            "example": "Intel Core i5-8400"
          },
          "graphics": {
            "type": "string",
            "nullable": true,
            "description": "Graphics card",
            "example": "NVIDIA GTX 1060"
          },
          "memory": {
            "type": "string",
            "nullable": true,
            "description": "System memory (RAM)",
            "example": "8 GB RAM"
          },
          "diskSpace": {
            "type": "string",
            "nullable": true,
            "description": "Available storage space needed for installation and product files",
            "example": "50 GB"
          },
          "system": {
            "type": "string",
            "nullable": true,
            "description": "Operating system version and architecture",
            "example": "Windows 10 64-bit"
          },
          "other": {
            "type": "string",
            "nullable": true,
            "description": "Additional requirements such as DirectX, internet connection, or special hardware",
            "example": "DirectX 12"
          }
        }
      },
      "MinimalRequirements": {
        "type": "object",
        "description": "Minimal requirements of the product",
        "allOf": [
          {
            "$ref": "#/components/schemas/RequirementsFields"
          },
          {
            "type": "object",
            "example": {
              "processor": "2.4 Ghz Intel Core 2 Duo / AMD Phenom X2",
              "graphics": "NVidia Geforce 460GTX / AMD Radeon HD5850",
              "memory": "4 GB RAM",
              "diskSpace": "20 GB HD",
              "system": "Windows 7",
              "other": "Broadband Internet connection"
            }
          }
        ]
      },
      "RecommendedRequirements": {
        "type": "object",
        "description": "Recommended requirements of the product",
        "allOf": [
          {
            "$ref": "#/components/schemas/RequirementsFields"
          },
          {
            "type": "object",
            "example": {
              "processor": "Intel i5 2500 / i7 2600 / 2700",
              "graphics": "NVidia Geforce GTX 670",
              "memory": "6 GB RAM",
              "diskSpace": "30 GB HD",
              "system": "Windows 7",
              "other": ""
            }
          }
        ]
      },
      "ProductRestrictions": {
        "type": "object",
        "required": [
          "rating",
          "descriptors"
        ],
        "description": "Age and content restrictions of the product",
        "properties": {
          "rating": {
            "type": "string",
            "description": "PEGI age rating",
            "example": "PEGI 16"
          },
          "descriptors": {
            "type": "array",
            "description": "PEGI content descriptors",
            "items": {
              "type": "string"
            },
            "example": [
              "Violence",
              "Online"
            ]
          }
        }
      },
      "GetProductDetailsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductDetail"
                }
              }
            }
          }
        ]
      }
    },
    "requestBodies": {
      "CreateOrder": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreateOrderRequest"
            }
          }
        }
      }
    },
    "responses": {
      "CreateOrder201": {
        "description": "Order created successfully",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreateOrderResponse"
            }
          }
        }
      },
      "GetOrders200": {
        "description": "Get orders history",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetOrdersResponse"
            }
          }
        }
      },
      "GetOrderKeys200": {
        "description": "Get order keys",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetOrderKeysResponse"
            }
          }
        }
      },
      "GetProduct200": {
        "description": "Get product with offers",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetProductResponse"
            }
          }
        }
      },
      "GetProducts200": {
        "description": "Get products",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetProductsResponse"
            }
          }
        }
      },
      "BadRequest400": {
        "description": "Bad Request - invalid input data",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "validation-error",
                            "validation-failed",
                            "cart-validation-error",
                            "offer-not-available",
                            "order-not-complete",
                            "order-expired",
                            "max-price-exceeded",
                            "product-excluded",
                            "length-out-of-range",
                            "int-out-of-range",
                            "order-not-found",
                            "product-not-found"
                          ]
                        },
                        "status": {
                          "enum": [
                            400
                          ]
                        },
                        "errors": {
                          "type": "array",
                          "nullable": true,
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "validation-error",
                                  "validation-failed",
                                  "cart-validation-error",
                                  "offer-not-available",
                                  "order-not-complete",
                                  "order-expired",
                                  "max-price-exceeded",
                                  "product-excluded",
                                  "length-out-of-range",
                                  "int-out-of-range",
                                  "order-not-found",
                                  "product-not-found"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "validation-error",
                "validation-failed",
                "cart-validation-error",
                "offer-not-available",
                "order-not-complete",
                "order-expired",
                "max-price-exceeded",
                "product-excluded",
                "length-out-of-range",
                "int-out-of-range",
                "order-not-found",
                "product-not-found"
              ],
              "title": "BadRequest400Response"
            }
          }
        }
      },
      "GetProductDetails200": {
        "description": "Successfully retrieved product details",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetProductDetailsResponse"
            }
          }
        }
      },
      "Unauthorized401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "unauthorized"
                          ]
                        },
                        "status": {
                          "enum": [
                            401
                          ]
                        },
                        "errors": {
                          "type": "array",
                          "nullable": true,
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "unauthorized"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "unauthorized"
              ],
              "title": "Unauthorized401Response"
            }
          }
        }
      },
      "PaymentRequired402": {
        "description": "Payment Required",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "insufficient-funds",
                            "payment-went-wrong",
                            "payment-not-configured",
                            "order-not-paid"
                          ]
                        },
                        "status": {
                          "enum": [
                            402
                          ]
                        },
                        "errors": {
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "enum": [
                                  "insufficient-funds",
                                  "payment-went-wrong",
                                  "payment-not-configured",
                                  "order-not-paid"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "insufficient-funds",
                "payment-went-wrong",
                "payment-not-configured",
                "order-not-paid"
              ],
              "title": "PaymentRequired402Response"
            }
          }
        }
      },
      "Conflict409": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "idempotency-key-processing"
                          ]
                        },
                        "status": {
                          "enum": [
                            409
                          ]
                        },
                        "errors": {
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "enum": [
                                  "idempotency-key-processing"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "idempotency-key-processing"
              ],
              "title": "Conflict409Response"
            }
          }
        }
      },
      "UnprocessableEntity422": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "idempotency-key-already-used"
                          ]
                        },
                        "status": {
                          "enum": [
                            422
                          ]
                        },
                        "errors": {
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "enum": [
                                  "idempotency-key-already-used"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "idempotency-key-already-used"
              ],
              "title": "UnprocessableEntity422Response"
            }
          }
        }
      },
      "Gone410": {
        "description": "Gone",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "order-auto-refund-image-keys"
                          ]
                        },
                        "status": {
                          "enum": [
                            410
                          ]
                        },
                        "errors": {
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "enum": [
                                  "order-auto-refund-image-keys"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "order-auto-refund-image-keys"
              ],
              "title": "Gone410Response"
            }
          }
        }
      },
      "InternalServerError500": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "enum": [
                            "internal-server-error"
                          ]
                        },
                        "status": {
                          "enum": [
                            500
                          ]
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "required": [
                              "code",
                              "message"
                            ],
                            "properties": {
                              "code": {
                                "enum": [
                                  "internal-server-error"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              ],
              "x-code": [
                "internal-server-error"
              ],
              "title": "InternalServerError500Response"
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      },
      "OrderIdPathParam": {
        "in": "path",
        "name": "orderId",
        "description": "Order ID",
        "example": 92000000289147,
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/Order/properties/id"
        }
      },
      "OrderIdQueryParam": {
        "in": "query",
        "name": "orderId",
        "description": "Order ID",
        "example": 92000000289147,
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Order/properties/id"
        }
      },
      "OrderStatusQueryParam": {
        "in": "query",
        "name": "status",
        "description": "Filter by order status",
        "example": "HELD",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Order/properties/status"
        }
      },
      "ProductIdsQueryParam": {
        "in": "query",
        "name": "productIds[]",
        "description": "Array of product catalog IDs (same format as `productId` in GET /export/v1/products/{productId}). Each value must be exactly 14 digits and numeric (e.g. 10000004439009).",
        "required": true,
        "schema": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "$ref": "#/components/schemas/ProductCatalogId"
          }
        }
      },
      "ProductIdsOptionalQueryParam": {
        "in": "query",
        "name": "productIds[]",
        "description": "Array of product IDs",
        "required": false,
        "schema": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "$ref": "#/components/schemas/ProductCatalogId"
          }
        }
      },
      "ProductIdPathParam": {
        "in": "path",
        "name": "productId",
        "description": "Product catalog ID. Must be exactly 14 digits and numeric (e.g. 10000004439009).",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ProductCatalogId"
        }
      },
      "TotalQuantityQueryParam": {
        "in": "query",
        "name": "totalQuantity",
        "description": "Filter offers by minimum total quantity",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Product/properties/totalQuantity"
        }
      },
      "MaxPriceQueryParam": {
        "in": "query",
        "name": "maxPrice",
        "description": "Filter offers by maximum price",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/MaxPrice"
        }
      },
      "OrderDateFrom": {
        "in": "query",
        "name": "dateFrom",
        "required": false,
        "description": "Inclusive lower bound on order **creation date** as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-01-01T09:53:00Z`. This is a **date-time** filter (instant in time with time zone).\n",
        "schema": {
          "$ref": "#/components/schemas/DateTime"
        }
      },
      "OrderDateTo": {
        "in": "query",
        "name": "dateTo",
        "required": false,
        "description": "Inclusive upper bound on order **creation date** as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-01-01T23:59:59Z`. Must be on or after `dateFrom` when both are set.\n",
        "schema": {
          "allOf": [
            {
              "$ref": "#/components/schemas/DateTime"
            },
            {
              "x-validation": [
                {
                  "values": [
                    "gtefieldomitempty=DateFrom"
                  ]
                }
              ]
            }
          ]
        }
      },
      "UpdatedAtFrom": {
        "in": "query",
        "name": "updatedAtFrom",
        "required": false,
        "description": "Inclusive lower bound on last offer update as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-03-01T00:00:00Z`. This is a **date-time** filter (instant in time), not a calendar-only `YYYY-MM-DD` field—use `dateFrom` / `dateTo` on order history for plain dates.",
        "schema": {
          "$ref": "#/components/schemas/DateTime"
        }
      },
      "UpdatedAtTo": {
        "in": "query",
        "name": "updatedAtTo",
        "required": false,
        "description": "Inclusive upper bound on last offer update as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-03-31T23:59:59Z`. Must be on or after `updatedAtFrom` when both are set.",
        "schema": {
          "allOf": [
            {
              "$ref": "#/components/schemas/DateTime"
            },
            {
              "x-validation": [
                {
                  "values": [
                    "gtfieldomitempty=UpdatedAtFrom"
                  ]
                }
              ]
            }
          ]
        }
      },
      "Page": {
        "in": "query",
        "name": "page",
        "required": false,
        "description": "Page number starting with 1",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100000
        }
      },
      "ItemsPerPage": {
        "in": "query",
        "name": "itemsPerPage",
        "required": false,
        "description": "Items per page (10, 20, 50, 100). Default is 100.",
        "schema": {
          "type": "integer",
          "default": 100,
          "enum": [
            10,
            20,
            50,
            100
          ]
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 client credentials flow. Use the /oauth/token endpoint to obtain an access token, then include it in the Authorization header as 'Bearer {token}'",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.g2a.com/oauth/token",
            "scopes": {}
          }
        }
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token obtained from /oauth/token endpoint. Include in Authorization header as 'Bearer {token}'"
      }
    }
  },
  "paths": {
    "/export/v1/orders": {
      "get": {
        "summary": "Get customer orders",
        "tags": [
          "order"
        ],
        "description": "Get customer orders",
        "operationId": "getCustomerOrders",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "description": "Filter by order status",
            "example": "HELD",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Order/properties/status"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "required": false,
            "description": "Inclusive lower bound on order **creation date** as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-01-01T09:53:00Z`. This is a **date-time** filter (instant in time with time zone).\n",
            "schema": {
              "$ref": "#/components/schemas/DateTime"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "required": false,
            "description": "Inclusive upper bound on order **creation date** as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-01-01T23:59:59Z`. Must be on or after `dateFrom` when both are set.\n",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DateTime"
                },
                {
                  "x-validation": [
                    {
                      "values": [
                        "gtefieldomitempty=DateFrom"
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "orderId",
            "description": "Order ID",
            "example": 92000000289147,
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Order/properties/id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number starting with 1",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "in": "query",
            "name": "itemsPerPage",
            "required": false,
            "description": "Items per page (10, 20, 50, 100). Default is 100.",
            "schema": {
              "type": "integer",
              "default": 100,
              "enum": [
                10,
                20,
                50,
                100
              ]
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "description": "Sort order by created date: ASC (ascending - oldest first), DESC (descending - newest first). Default: DESC",
            "schema": {
              "type": "string",
              "enum": [
                "DESC",
                "ASC"
              ],
              "example": "DESC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get orders history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "validation-error",
                                "validation-failed",
                                "cart-validation-error",
                                "offer-not-available",
                                "order-not-complete",
                                "order-expired",
                                "max-price-exceeded",
                                "product-excluded",
                                "length-out-of-range",
                                "int-out-of-range",
                                "order-not-found",
                                "product-not-found"
                              ]
                            },
                            "status": {
                              "enum": [
                                400
                              ]
                            },
                            "errors": {
                              "type": "array",
                              "nullable": true,
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "validation-error",
                                      "validation-failed",
                                      "cart-validation-error",
                                      "offer-not-available",
                                      "order-not-complete",
                                      "order-expired",
                                      "max-price-exceeded",
                                      "product-excluded",
                                      "length-out-of-range",
                                      "int-out-of-range",
                                      "order-not-found",
                                      "product-not-found"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "validation-error",
                    "validation-failed",
                    "cart-validation-error",
                    "offer-not-available",
                    "order-not-complete",
                    "order-expired",
                    "max-price-exceeded",
                    "product-excluded",
                    "length-out-of-range",
                    "int-out-of-range",
                    "order-not-found",
                    "product-not-found"
                  ],
                  "title": "BadRequest400Response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "unauthorized"
                              ]
                            },
                            "status": {
                              "enum": [
                                401
                              ]
                            },
                            "errors": {
                              "type": "array",
                              "nullable": true,
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "unauthorized"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "unauthorized"
                  ],
                  "title": "Unauthorized401Response"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "internal-server-error"
                              ]
                            },
                            "status": {
                              "enum": [
                                500
                              ]
                            },
                            "errors": {
                              "type": "array",
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "enum": [
                                      "internal-server-error"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "internal-server-error"
                  ],
                  "title": "InternalServerError500Response"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create order",
        "tags": [
          "order"
        ],
        "description": "Creates order with multiple products",
        "operationId": "createOrder",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "550e8400-e29b-41d4-a716-446655440000"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateOrderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/401"
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "insufficient-funds",
                                "payment-went-wrong",
                                "payment-not-configured",
                                "order-not-paid"
                              ]
                            },
                            "status": {
                              "enum": [
                                402
                              ]
                            },
                            "errors": {
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "enum": [
                                      "insufficient-funds",
                                      "payment-went-wrong",
                                      "payment-not-configured",
                                      "order-not-paid"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "insufficient-funds",
                    "payment-went-wrong",
                    "payment-not-configured",
                    "order-not-paid"
                  ],
                  "title": "PaymentRequired402Response"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "idempotency-key-processing"
                              ]
                            },
                            "status": {
                              "enum": [
                                409
                              ]
                            },
                            "errors": {
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "enum": [
                                      "idempotency-key-processing"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "idempotency-key-processing"
                  ],
                  "title": "Conflict409Response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "idempotency-key-already-used"
                              ]
                            },
                            "status": {
                              "enum": [
                                422
                              ]
                            },
                            "errors": {
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "enum": [
                                      "idempotency-key-already-used"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "idempotency-key-already-used"
                  ],
                  "title": "UnprocessableEntity422Response"
                }
              }
            }
          },
          "500": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/500"
          }
        }
      }
    },
    "/export/v1/orders/{orderId}/keys": {
      "get": {
        "summary": "Get order keys",
        "tags": [
          "order"
        ],
        "description": "Get all keys",
        "operationId": "getOrderKeys",
        "parameters": [
          {
            "in": "path",
            "name": "orderId",
            "description": "Order ID",
            "example": 92000000289147,
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Order/properties/id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get order keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrderKeysResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/401"
          },
          "402": {
            "$ref": "#/paths/~1export~1v1~1orders/post/responses/402"
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "order-auto-refund-image-keys"
                              ]
                            },
                            "status": {
                              "enum": [
                                410
                              ]
                            },
                            "errors": {
                              "items": {
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "properties": {
                                  "code": {
                                    "enum": [
                                      "order-auto-refund-image-keys"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ],
                  "x-code": [
                    "order-auto-refund-image-keys"
                  ],
                  "title": "Gone410Response"
                }
              }
            }
          },
          "500": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/500"
          }
        }
      }
    },
    "/export/v1/product-offers": {
      "get": {
        "summary": "Get products offers",
        "tags": [
          "product"
        ],
        "description": "Returns a paginated list of product offers with pricing and availability",
        "operationId": "getProductOffers",
        "parameters": [
          {
            "in": "query",
            "name": "productIds[]",
            "description": "Array of product IDs",
            "required": false,
            "schema": {
              "type": "array",
              "minItems": 1,
              "maxItems": 20,
              "items": {
                "$ref": "#/components/schemas/ProductCatalogId"
              }
            }
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "required": false,
            "description": "Inclusive lower bound on last offer update as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-03-01T00:00:00Z`. This is a **date-time** filter (instant in time), not a calendar-only `YYYY-MM-DD` field—use `dateFrom` / `dateTo` on order history for plain dates.",
            "schema": {
              "$ref": "#/components/schemas/DateTime"
            }
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "required": false,
            "description": "Inclusive upper bound on last offer update as an ISO 8601 **date-time** (RFC 3339, OpenAPI `format: date-time`), e.g. `2026-03-31T23:59:59Z`. Must be on or after `updatedAtFrom` when both are set.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DateTime"
                },
                {
                  "x-validation": [
                    {
                      "values": [
                        "gtfieldomitempty=UpdatedAtFrom"
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "$ref": "#/paths/~1export~1v1~1orders/get/parameters/4"
          },
          {
            "$ref": "#/paths/~1export~1v1~1orders/get/parameters/5"
          }
        ],
        "responses": {
          "200": {
            "description": "Get products",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProductsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/500"
          }
        }
      }
    },
    "/export/v1/product-offers/{productId}": {
      "get": {
        "summary": "Get product offers",
        "tags": [
          "product"
        ],
        "description": "Returns up to 3 cheapest offers for a specific product, optionally filtered by minimum total quantity and maximum price",
        "operationId": "getProductOffer",
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "description": "Product catalog ID. Must be exactly 14 digits and numeric (e.g. 10000004439009).",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ProductCatalogId"
            }
          },
          {
            "in": "query",
            "name": "totalQuantity",
            "description": "Filter offers by minimum total quantity",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Product/properties/totalQuantity"
            }
          },
          {
            "in": "query",
            "name": "maxPrice",
            "description": "Filter offers by maximum price",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MaxPrice"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get product with offers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProductResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/500"
          }
        }
      }
    },
    "/export/v1/products": {
      "get": {
        "summary": "Get products",
        "tags": [
          "product"
        ],
        "description": "Returns detailed information for up to 20 products identified by their IDs, including metadata, images, requirements, restrictions and offer summary",
        "operationId": "getProducts",
        "parameters": [
          {
            "in": "query",
            "name": "productIds[]",
            "description": "Array of product catalog IDs (same format as `productId` in GET /export/v1/products/{productId}). Each value must be exactly 14 digits and numeric (e.g. 10000004439009).",
            "required": true,
            "schema": {
              "type": "array",
              "minItems": 1,
              "maxItems": 20,
              "items": {
                "$ref": "#/components/schemas/ProductCatalogId"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved product details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProductDetailsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1export~1v1~1orders/get/responses/500"
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "summary": "Generate OAuth2 access token",
        "tags": [
          "authentication"
        ],
        "description": "Obtain an access token using client credentials. Send grant_type, client_id, and client_secret in the form-urlencoded body (not in the query string). The token should be included in subsequent requests in the Authorization header as 'Bearer {token}'",
        "operationId": "getOAuth2Token",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials"
                    ],
                    "description": "OAuth2 grant type",
                    "example": "client_credentials"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Client identifier",
                    "example": "your_client_id"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Client secret",
                    "example": "your_client_secret"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully generated access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "access_token",
                    "token_type",
                    "expires_in"
                  ],
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "description": "Bearer token to use in Authorization header",
                      "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                    },
                    "token_type": {
                      "type": "string",
                      "enum": [
                        "Bearer"
                      ],
                      "description": "Token type",
                      "example": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Token lifetime in seconds",
                      "example": 3600
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest400"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized401"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError500"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}