{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapeatlas/json-schema/scrapeatlas-depop-shop-response-schema-schema.json",
  "title": "depopShopResponseSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapeatlas-depop-api-openapi.yml#/components/schemas/depopShopResponseSchema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "accounting": {
          "type": "object",
          "properties": {
            "upstreamRequests": {
              "type": "integer",
              "minimum": 0
            },
            "responseBytes": {
              "type": "integer",
              "minimum": 0
            },
            "durationMs": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "upstreamRequests",
            "responseBytes",
            "durationMs"
          ],
          "additionalProperties": false
        },
        "success": {
          "type": "boolean",
          "const": true
        },
        "status": {
          "type": "string",
          "enum": [
            "success",
            "partial"
          ]
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "fetchedAt": {
          "type": "string",
          "format": "date-time"
        },
        "coverage": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "const": "public_api"
            },
            "complete": {
              "type": "boolean"
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "malformed_items_omitted",
                  "items_truncated",
                  "review_offset_limit",
                  "inventory_unavailable",
                  "catalog_details_unavailable",
                  "extended_details_unavailable",
                  "total_count_unknown"
                ]
              }
            }
          },
          "required": [
            "source",
            "complete",
            "warnings"
          ],
          "additionalProperties": false
        },
        "shop": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "minimum": 0
            },
            "username": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "firstName": {
              "type": [
                "string",
                "null"
              ]
            },
            "lastName": {
              "type": [
                "string",
                "null"
              ]
            },
            "initials": {
              "type": [
                "string",
                "null"
              ]
            },
            "bio": {
              "type": [
                "string",
                "null"
              ]
            },
            "verified": {
              "type": "boolean"
            },
            "website": {
              "type": [
                "string",
                "null"
              ]
            },
            "picture": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri"
            },
            "pictureSizes": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string",
                "format": "uri"
              }
            },
            "followers": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "following": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "reviews": {
              "type": "object",
              "properties": {
                "average": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 5
                },
                "count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                }
              },
              "required": [
                "average",
                "count"
              ],
              "additionalProperties": false
            },
            "sellerRatings": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "buyerRatings": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "lastSeen": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "itemsSold": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "inventory": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "departments": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "categoryBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "minItems": 1,
                            "maxItems": 6
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "path",
                          "count"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 500
                    },
                    "brands": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "colours": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "conditions": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "sizes": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "required": [
                    "total",
                    "departments",
                    "categoryBreakdown",
                    "brands",
                    "colours",
                    "conditions",
                    "sizes"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "username",
            "url",
            "name",
            "firstName",
            "lastName",
            "initials",
            "bio",
            "verified",
            "website",
            "picture",
            "pictureSizes",
            "followers",
            "following",
            "reviews",
            "sellerRatings",
            "buyerRatings",
            "lastSeen",
            "itemsSold",
            "inventory"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "requestId",
        "accounting",
        "success",
        "status",
        "sourceUrl",
        "fetchedAt",
        "coverage",
        "shop"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "accounting": {
          "type": "object",
          "properties": {
            "upstreamRequests": {
              "type": "integer",
              "minimum": 0
            },
            "responseBytes": {
              "type": "integer",
              "minimum": 0
            },
            "durationMs": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "upstreamRequests",
            "responseBytes",
            "durationMs"
          ],
          "additionalProperties": false
        },
        "success": {
          "type": "boolean",
          "const": false
        },
        "status": {
          "type": "string",
          "enum": [
            "failed",
            "challenged"
          ]
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "invalid_request",
                "unauthorized",
                "not_found",
                "restricted",
                "upstream_challenged",
                "upstream_rate_limited",
                "upstream_error",
                "unsupported_page",
                "response_too_large",
                "request_limit",
                "timeout",
                "busy"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "requestId",
        "accounting",
        "success",
        "status",
        "failure"
      ],
      "additionalProperties": false
    }
  ]
}