{
  "openapi": "3.1.0",
  "info": {
    "title": "Burgundy physical artwork API",
    "description": "Submit an image made anywhere for a private, reviewed hand-painted canvas request. Submission never charges a card or sends a supplier order.",
    "version": "1.0.0"
  },
  "paths": {
    "/api/v1/production-capabilities": {
      "get": {
        "summary": "Production Capabilities",
        "operationId": "production_capabilities_api_v1_production_capabilities_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "physical_intake_enabled": {
                      "type": "boolean"
                    },
                    "product": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "artist_application_required": {
                      "type": "boolean"
                    },
                    "submission_visibility": {
                      "type": "string"
                    },
                    "public_listing_gate": {
                      "type": "string"
                    },
                    "max_new_requests_per_24_hours": {
                      "type": "integer"
                    },
                    "max_open_requests": {
                      "type": "integer"
                    },
                    "size_request_inches": {
                      "type": "object"
                    },
                    "medium_selection": {
                      "type": "string"
                    },
                    "finish_preferences": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "frame_style_preferences": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "source_mime_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "max_source_bytes": {
                      "type": "integer"
                    },
                    "pricing": {
                      "type": "string"
                    },
                    "payment": {
                      "type": "string"
                    },
                    "production": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/physical-projects": {
      "post": {
        "summary": "Create Physical Project",
        "operationId": "create_physical_project_api_v1_physical_projects_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhysicalProjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "status",
                    "new"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "description": "Studio review or order state"
                    },
                    "new": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "The account has reached its new-request or open-request limit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      },
      "get": {
        "summary": "List Physical Projects",
        "operationId": "list_physical_projects_api_v1_physical_projects_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string",
                        "description": "Studio review or order state"
                      },
                      "title": {
                        "type": "string"
                      },
                      "canvas_size": {
                        "type": "string"
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      }
    },
    "/api/v1/physical-projects/{order_id}": {
      "get": {
        "summary": "Get Physical Project",
        "operationId": "get_physical_project_api_v1_physical_projects__order_id__get",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Order Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "description": "Studio review or order state"
                    },
                    "title": {
                      "type": "string"
                    },
                    "canvas_size": {
                      "type": "string"
                    },
                    "medium_preference": {
                      "type": "string"
                    },
                    "finish_preference": {
                      "type": "string"
                    },
                    "approved_proof_asset_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "frame_style_preference": {
                      "type": "string"
                    },
                    "artwork_price_cents": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shipping_cents": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkout_available": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      }
    },
    "/api/v1/physical-projects/{order_id}/source-uploads": {
      "post": {
        "summary": "Physical Source Upload",
        "operationId": "physical_source_upload_api_v1_physical_projects__order_id__source_uploads_post",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Order Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "asset_id",
                    "upload_url",
                    "expires_in_seconds"
                  ],
                  "properties": {
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_in_seconds": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      }
    },
    "/api/v1/physical-projects/{order_id}/source-uploads/{asset_id}/complete": {
      "post": {
        "summary": "Complete Physical Source Upload",
        "operationId": "complete_physical_source_upload_api_v1_physical_projects__order_id__source_uploads__asset_id__complete_post",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Order Id"
            }
          },
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Asset Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      }
    },
    "/api/assets/{asset_id}/read-url": {
      "get": {
        "summary": "Asset Read Url",
        "operationId": "asset_read_url_api_assets__asset_id__read_url_get",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Asset Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_in_seconds": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ]
      }
    },
    "/api/checkout": {
      "post": {
        "summary": "Checkout",
        "operationId": "checkout_api_checkout_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "CustomerSession": []
          }
        ],
        "x-burgundy-human-confirmation-required": true,
        "description": "Create a hosted payment link only after the customer has reviewed the proof and quote. This does not itself charge a card or release manufacturing."
      }
    }
  },
  "components": {
    "schemas": {
      "CheckoutRequest": {
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "title": "Order Id"
          }
        },
        "type": "object",
        "required": [
          "order_id"
        ],
        "title": "CheckoutRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "PhysicalProjectRequest": {
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "title": "Request Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "canvas_size": {
            "type": "string",
            "title": "Canvas Size"
          },
          "medium_preference": {
            "type": "string",
            "title": "Medium Preference",
            "default": "studio_recommendation"
          },
          "finish_preference": {
            "type": "string",
            "title": "Finish Preference",
            "default": "stretched"
          },
          "frame_style_preference": {
            "type": "string",
            "title": "Frame Style Preference",
            "default": "none"
          },
          "rights_confirmed": {
            "type": "boolean",
            "title": "Rights Confirmed"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "title",
          "canvas_size",
          "rights_confirmed"
        ],
        "title": "PhysicalProjectRequest"
      },
      "UploadRequest": {
        "properties": {
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "byte_size": {
            "type": "integer",
            "title": "Byte Size"
          }
        },
        "type": "object",
        "required": [
          "mime_type",
          "byte_size"
        ],
        "title": "UploadRequest"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "CustomerSession": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A short-lived access token for the signed-in Burgundy customer. Third-party OAuth connection is not yet available."
      }
    }
  },
  "servers": [
    {
      "url": "https://burgundy.app"
    }
  ]
}
