{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://theartillerist.com/api/v1/commission-quotes/output-schema.json",
    "title": "Commission Quote API paid response",
    "type": "object",
    "properties": {
        "quote_id": {
            "type": "string"
        },
        "currency": {
            "const": "USD"
        },
        "commission_type": {
            "type": "object",
            "properties": {
                "quote_key": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "category": {
                    "type": "string"
                }
            },
            "required": [
                "quote_key",
                "name",
                "category"
            ],
            "additionalProperties": false
        },
        "estimate": {
            "type": "object",
            "properties": {
                "low": {
                    "type": "number"
                },
                "recommended": {
                    "type": "number"
                },
                "high": {
                    "type": "number"
                },
                "confidence": {
                    "type": "string",
                    "enum": [
                        "moderate",
                        "broad"
                    ]
                }
            },
            "required": [
                "low",
                "recommended",
                "high",
                "confidence"
            ],
            "additionalProperties": false
        },
        "breakdown": {
            "type": "array",
            "items": {
                "type": "object"
            }
        },
        "assumptions": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "dataset": {
            "type": "object",
            "properties": {
                "version": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "last_reviewed_at": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "format": "date"
                },
                "method": {
                    "type": "string"
                },
                "sources": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "label": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string",
                                "format": "uri"
                            }
                        },
                        "required": [
                            "label",
                            "url"
                        ],
                        "additionalProperties": false
                    }
                }
            },
            "required": [
                "version",
                "last_reviewed_at",
                "method",
                "sources"
            ],
            "additionalProperties": false
        },
        "inputs": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
                "commission_type": {
                    "type": "string",
                    "description": "A quote_key returned by the free catalog endpoint.",
                    "pattern": "^[a-z0-9-]{2,120}$"
                },
                "experience": {
                    "type": "string",
                    "enum": [
                        "emerging",
                        "established",
                        "expert"
                    ],
                    "default": "established"
                },
                "complexity": {
                    "type": "string",
                    "enum": [
                        "simple",
                        "standard",
                        "complex"
                    ],
                    "default": "standard"
                },
                "finish": {
                    "type": "string",
                    "enum": [
                        "sketch",
                        "polished",
                        "rendered"
                    ],
                    "default": "polished"
                },
                "subjects": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20,
                    "default": 1
                },
                "usage": {
                    "type": "string",
                    "enum": [
                        "personal",
                        "editorial",
                        "commercial_small",
                        "commercial_large",
                        "full_buyout"
                    ],
                    "default": "personal"
                },
                "revisions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10,
                    "default": 2
                },
                "rush": {
                    "type": "string",
                    "enum": [
                        "none",
                        "within_14_days",
                        "within_7_days",
                        "within_3_days"
                    ],
                    "default": "none"
                },
                "expenses_usd": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000,
                    "multipleOf": 0.01,
                    "default": 0
                }
            },
            "required": [
                "commission_type"
            ],
            "additionalProperties": false
        },
        "license": {
            "type": "object"
        },
        "payment": {
            "type": "object",
            "properties": {
                "status": {
                    "const": "settled"
                },
                "amount_usdc": {
                    "type": "string",
                    "pattern": "^[0-9]+\\.[0-9]{6}$"
                },
                "network": {
                    "const": "eip155:8453"
                },
                "transaction_reference": {
                    "type": "string"
                }
            },
            "required": [
                "status",
                "amount_usdc",
                "network",
                "transaction_reference"
            ],
            "additionalProperties": false
        },
        "disclaimer": {
            "type": "string"
        }
    },
    "required": [
        "quote_id",
        "currency",
        "commission_type",
        "estimate",
        "breakdown",
        "assumptions",
        "dataset",
        "inputs",
        "license",
        "payment",
        "disclaimer"
    ],
    "additionalProperties": false
}
