{
  "openapi": "3.0.3",
  "info": {
    "title": "ProxyPics API",
    "version": "1.0.0",
    "description": "The ProxyPics API allows you to programatically manage your photo requests inside ProxyPics.\n\nThe API exposes REST endpoints that exclusively speak JSON format.\n\n## API Endpoints\n\nLive API: `https://api.proxypics.com/api/v3`\n\nFor testing your integration, we have a sandbox environment, it is another instance of ProxyPics platform. All requests created under the sandbox aren't available for anyone to complete them, so we have some tools that will allow you to simulate photos submission, photos approval or rejection.\n\nSandbox endpoint: `https://sandbox.proxypics.com/api/v3`\n\nSandbox web app: `https://sandbox-app.proxypics.com`\n\n## Authentication\n\nEvery request to ProxyPics API is authenticated with an API Key.\n\nYou can generate an API Key by going to your Profile page, Integrations left tab here: `https://app.proxypics.com/profile`.\nIn this page you can generate new API Keys as well as configure your webhooks.\n\nYou can pass the API Key either in a header property called `x-api-key` or by the query parameter `api_key`.\n\n## Testing your integration\n\nAs said before we have a sandbox instance of ProxyPics platform running on `https://sandbox-app.proxypics.com`.\n\nTo start testing your integration create an account at https://sandbox-app.proxypics.com, setup an API Key and start integrating against the sandbox endpoint (`https://sandbox.proxypics.com`).\n\nIn order to successfuly create requests, you'll need to add a credit card. You can use the number `4111 1111 1111 1111` with any CVV and a future expiration date.\n\n## Pagination\n\nEvery collection endpoints are paginated. The resources are returned inside a `data` key and the pagination meta data is returned inside the `meta.pagination` object.\n\nExample:\n```json\n{\n  \"data\": { \"...\": \"...\" },\n  \"meta\": {\n    \"pagination\": {\n      \"total\": 45,\n      \"current_page\": 1,\n      \"per_page\": 10\n    }\n  }\n}\n```\n\n## Content-Type\n\nAll requests made to the API should have the Content-Type equals to `application/json`.\n\n## Errors\n\nErrors will be returned with HTTP codes 400, 401, 404 and 422. The response has an `errors` key with a list of the errors occurred.\n\nExample:\n```json\n{\n  \"errors\": [ ... ]\n}\n```\n\n## Event Types\n\nEvery time you receive a webhook, there's a \"event_name\" attribute that identifies the event name.\n\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestAdded\"` -> Photo request created\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestUnassigned\"` -> Photo request unassigned, waiting for a data collector\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestAssigned\"` -> Photo request assigned to a Data Collector\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestUploadStarted\"` -> DC started to take pictures\n\n- `\"ProxyPicsEvents::PhotoDelivery::AppointmentScheduled\"` -> Appointment scheduled\n\n- `\"ProxyPicsEvents::PhotoDelivery::AwaitingSignatures\"` -> Awaiting signatures, 1004D Alternative\n\n- `\"ProxyPicsEvents::PhotoDelivery::SignatureCollected\"` -> Signature collected, 1004D Alternative\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestCanceled\"` -> Photo request canceled\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestCompleted\"` -> Photo request completed, still waiting for review.\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestExpired\"` -> Photo request expired, rarely happens\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestOnHold\"` -> Photo request put on hold\n\n- `\"ProxyPicsEvents::PaymentProcessing::PhotoRequestCostUpdated\"` -> Fee updated\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestReportGenerated\"` -> Sent with the “fulfilled” status, the report is ready to be downloaded\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestResumed\"` -> Removed from hold\n\n- `\"ProxyPicsEvents::PhotoDelivery::WebAppOpened\"` -> Web App opened by the POC, Direct orders\n\n- `\"ProxyPicsEvents::PhotoDelivery::PocTextMessageSent\"` -> Text message sent to the POC, Direct orders\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestTemplateChanged\"` -> When the template is changed in the order\n\n- `\"ProxyPicsEvents::PhotoDelivery::PhotoRequestExpirationChanged\"` -> When expiration time of the order is changed\n\n- `\"ProxyPicsEvents::Messaging::MessageAdded\"` -> Message added to an order by the ProxyPics team\n"
  },
  "servers": [
    {
      "url": "https://api.proxypics.com/api/v3",
      "description": "Live API"
    },
    {
      "url": "https://sandbox.proxypics.com/api/v3",
      "description": "Sandbox API"
    }
  ],
  "tags": [
    {
      "name": "Photo Requests",
      "description": "The photo request is the main object in the ProxyPics platform. It is created by you, the requester,\nand will have all the info that describes your request.\n\nBasically a photo task is made of an **Address**, **Tasks** (the defined photos the user should take),\n**Unlimited Tasks** (extra photos the user can freely take), **Question Groups**\n(groups of questions the user should answer).\n\nProxyPics has two different platforms: ProxyPics Crowdsource and ProxyPics Direct.\n\n#### ProxyPics Crowdsource\nPhoto requests in the Crowdsource platform will be available for any photo taker from our users base to pick up the request for completion.\n\n#### ProxyPics Direct\nDirect requests are directly assigned to someone by his phone number and then an SMS will be sent with instructions for completing the photo request.\n"
    },
    {
      "name": "UPD/PDR/PDC",
      "description": "To create a UPD order, use the /photo-requests POST endpoint and just provide the address and UPD fields\ninside \"uniform_property_dataset_report_attributes\".\n\nThe UPD template is automatically chosen by the system, you don't need to submit the \"template_token\" field for UPDs.\n"
    },
    {
      "name": "Photo Request Templates / Products",
      "description": "Photo Request Templates (Products) allows you to reuse the shape of a photo request across different photo requests."
    },
    {
      "name": "Appraisal Requests",
      "description": "Appraisal requests and photo requests are two different things. If you want an appraisal request with up to date photos,\nyou need to first create the appraisal request and later create the photo request passing the appraisal request id.\n\nThere are three different appraisal requests available through the API: AVMs, simple BPOs and BPOs with adjustments.\n"
    },
    {
      "name": "API Keys",
      "description": "You can manage your api keys within our API."
    },
    {
      "name": "Companies",
      "description": "Update company account and set notification types you want to subscribe."
    },
    {
      "name": "Webhooks",
      "description": "Whenever there are changes on any ProxyPics resource, it triggers a `GET` or `POST` request to an URL you've configured\nin the Integration section of your Company profile in the ProxyPics platform.\n\nIf you choose to create a `GET` Webhook, the query for this request will have two params, `resource_type`\n(PhotoRequest or AppraisalRequest) and `resource_id` and you can use it to fetch the resource from the API and act accordingly.\n\nIf you choose to create a `POST` Webhook, the body for this request will have all the resource attributes (PhotoRequest or AppraisalRequest).\n\nYou can also set a `username` and a `password` for HTTP Basic authentication.\n"
    },
    {
      "name": "Messages",
      "description": "You can send API notes (messages) to a Photo Request.\nA webhook will be triggered when ProxyPics sends a message to any of your Photo Requests.\n"
    },
    {
      "name": "CSV Uploads",
      "description": "You can list and get a single CSV Upload from your company."
    }
  ],
  "security": [
    {
      "ApiKeyHeader": []
    },
    {
      "ApiKeyQuery": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "API key authentication via `x-api-key` header."
      },
      "ApiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "API key authentication via `api_key` query parameter."
      }
    },
    "parameters": {
      "PageParam": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 1
        }
      },
      "PerPageParam": {
        "name": "per_page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 10
        }
      },
      "IdPathParamInteger": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "Error400": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Error401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Error404": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Error422": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "description": "Errors will be returned with HTTP codes 400, 401, 404 and 422. The response has an `errors` key with a list of the errors occurred.",
        "properties": {
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "errors"
        ]
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "current_page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          }
        }
      },
      "PhotoRequestsListMeta": {
        "type": "object",
        "properties": {
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "totals": {
            "type": "object",
            "properties": {
              "unassigned": {
                "type": "number",
                "nullable": true
              },
              "assigned": {
                "type": "number",
                "nullable": true
              },
              "completed": {
                "type": "number",
                "nullable": true
              },
              "fulfilled": {
                "type": "number",
                "nullable": true
              },
              "expired": {
                "type": "number",
                "nullable": true
              },
              "rejected": {
                "type": "number",
                "nullable": true
              }
            }
          }
        }
      },
      "AppraisalRequestsListMeta": {
        "type": "object",
        "properties": {
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "CSVUploadsListMeta": {
        "type": "object",
        "properties": {
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "AppraisalRequest": {
        "type": "object",
        "description": "AppraisalRequest",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "address": {
            "type": "string",
            "description": "Full address (street, city, state, zip and country)"
          },
          "type": {
            "type": "string",
            "enum": [
              "AutomatedValuationRequest",
              "EvaluationRequest",
              "AppraisalFormRequest"
            ],
            "description": "`AutomatedValuationRequest` - AVM\n`EvaluationRequest` - Simple BPO\n`AppraisalFormRequest` - BPO with adjustments\n"
          },
          "report_provider": {
            "type": "string",
            "enum": [
              "ca",
              "quantarium"
            ],
            "description": "`ca` - Collateral Analytics\n`quantarium` - Quantarium\n"
          },
          "occupancy": {
            "type": "string"
          },
          "borrower_name": {
            "type": "string"
          },
          "borrower_email": {
            "type": "string"
          },
          "borrower_phone": {
            "type": "string"
          },
          "borrower_optin": {
            "type": "boolean"
          },
          "second_borrower_name": {
            "type": "string"
          },
          "photo_request_status": {
            "type": "string",
            "enum": [
              "unassigned",
              "assigned",
              "completed",
              "rejected",
              "expired",
              "fulfilled"
            ]
          },
          "download_report_url": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Status",
            "enum": [
              "pending_data",
              "error",
              "unassigned",
              "assigned",
              "in_review",
              "quality_control",
              "completed",
              "client_request",
              "fulfilled",
              "canceled"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          }
        }
      },
      "PhotoRequest": {
        "type": "object",
        "description": "PhotoRequest",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "address": {
            "type": "string",
            "description": "Full address (street, city, state, zip and country)"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "appointment_scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format) of the appointment date, this value is set by the Data Collector."
          },
          "cost": {
            "type": "number",
            "description": "The photo request cost expressed in cents (it counts the price_boost)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "additional_notes": {
            "type": "string",
            "description": "Description/Guidelines provided with the photo request"
          },
          "download_url": {
            "type": "string",
            "description": "Download photos ZIP url. Available when Photo Request is Fulfilled (deprecated)"
          },
          "download_photos_url": {
            "type": "string",
            "description": "Download photos ZIP url. Available when Photo Request is Fulfilled"
          },
          "download_report_url": {
            "type": "string",
            "description": "Download photo request pdf report url. Available when Photo Request is Fulfilled"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "external_id": {
            "type": "string",
            "description": "External ID to associate with a photo request"
          },
          "latitude": {
            "type": "number",
            "description": "Latitude"
          },
          "loan_number": {
            "type": "string",
            "description": "External identifier defined by the requester"
          },
          "longitude": {
            "type": "number",
            "description": "Longitude"
          },
          "price_boost": {
            "type": "number",
            "description": "An amount, expressed in cents, added to the photo request to encourage photo takers to complete it"
          },
          "property_owner_phone": {
            "type": "string",
            "description": "Property Owner phone is required if `property_owner_only` is set to `true`"
          },
          "photo_request_platform": {
            "type": "string",
            "description": "ProxyPics Platform",
            "enum": [
              "crowdsource",
              "direct"
            ]
          },
          "small_address": {
            "type": "string",
            "description": "Address without city, state, zip and country"
          },
          "state": {
            "type": "string",
            "description": "State"
          },
          "status": {
            "type": "string",
            "description": "Status",
            "enum": [
              "unassigned",
              "assigned",
              "completed",
              "rejected",
              "expired",
              "fulfilled"
            ]
          },
          "unlimited_tasks": {
            "type": "boolean",
            "description": "The photo request allows the photo taker to take as many photo as he wants"
          },
          "unlimited_tasks_descriptions": {
            "type": "string",
            "description": "Guidelines provided to the photo taker when `unlimited_tasks` is `true`"
          },
          "zip": {
            "type": "string",
            "description": "Zip"
          },
          "tasks": {
            "type": "array",
            "description": "List of tasks",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "question_groups": {
            "type": "array",
            "description": "List of question groups",
            "items": {
              "$ref": "#/components/schemas/QuestionGroup"
            }
          },
          "lockbox": {
            "type": "string"
          },
          "borrower_name": {
            "type": "string"
          },
          "behalf_of": {
            "type": "string"
          },
          "condo_unit_number": {
            "type": "string"
          },
          "condo": {
            "type": "boolean"
          },
          "appointment": {
            "type": "boolean"
          },
          "report_for": {
            "type": "string"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format) of the scheduled date (UTC). The order will be moved from \"scheduled\" to an active status after that date."
          },
          "uniform_property_dataset_report_attributes": {
            "$ref": "#/components/schemas/UniformPropertyDatasetReport"
          }
        }
      },
      "UnlimitedSection": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title"
          },
          "tasks_attributes": {
            "type": "array",
            "description": "List of predefined tasks for the section",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "title": {
            "type": "string",
            "description": "Title (e.g. Front Photo)"
          },
          "description": {
            "type": "string",
            "description": "Description (e.g. Take a clear photo of the property without any blockers)"
          },
          "photo_map": {
            "type": "string",
            "description": "Integration mapping for the task"
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name"
          },
          "email": {
            "type": "string",
            "description": "Email"
          },
          "number": {
            "type": "string",
            "description": "Phone number"
          },
          "other_number": {
            "type": "string",
            "description": "Other phone number"
          }
        }
      },
      "QuestionGroup": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name"
          },
          "questions": {
            "type": "array",
            "description": "List of questions",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          }
        }
      },
      "Question": {
        "type": "object",
        "properties": {
          "question_group_id": {
            "type": "number",
            "description": "Question Group ID"
          },
          "value": {
            "type": "string",
            "description": "The question itself"
          },
          "choices": {
            "type": "array",
            "description": "The list of choices when the `question_type` is `choices` or `multiple_choices`",
            "items": {
              "type": "string"
            }
          },
          "appraisal_mapping": {
            "description": "The mapping attribute to find the question on your side"
          },
          "question_type": {
            "type": "string",
            "description": "The type of the question",
            "enum": [
              "text",
              "choices",
              "multiple_choices",
              "percentage"
            ]
          },
          "draw_progress_step": {
            "type": "number",
            "description": "The progress step for each line item. 1 will go from 1% to 2%. 25 will go from 0% to 25%, etc."
          },
          "budget": {
            "type": "string",
            "description": "The draw item budget in dollar format, example: '1452' for $1425.00"
          },
          "minimal_numeric_value": {
            "type": "number",
            "description": "Minimal value for the answer. To get values higher than 50% for example, use 50 on this field."
          },
          "requested_additional_percentage": {
            "type": "string",
            "description": "Requested percentage. 50% for example, our team will see this value during QA."
          },
          "default_answer": {
            "type": "string",
            "description": "The default answer for a question, it needs to be a text. If the question has an array of choices, this needs to be one of the provided choices."
          },
          "qa_only": {
            "type": "boolean",
            "description": "Determine if the question will be displayed to the Data Collector or not. True means that it is hidden for the Data Collector and only available for our QA team."
          }
        }
      },
      "PhotoRequestTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "name": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "description": "Unique token"
          },
          "photo_request_platform": {
            "type": "string",
            "description": "ProxyPics Platform",
            "enum": [
              "crowdsource",
              "direct"
            ]
          },
          "tasks": {
            "type": "array",
            "description": "An array of objects with `title` and `description` keys",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          }
        }
      },
      "UniformPropertyDatasetReport": {
        "type": "object",
        "description": "UniformPropertyDatasetReport",
        "properties": {
          "property_type": {
            "type": "string",
            "description": "property type \"single_family\" / \"condo\"",
            "enum": [
              "single_family",
              "condo"
            ]
          },
          "amc_id": {
            "type": "string",
            "nullable": true,
            "description": "AMC ID"
          },
          "amc_name": {
            "type": "string",
            "nullable": true,
            "description": "AMC Name"
          },
          "lpa_id": {
            "type": "string",
            "description": "LPA ID, only required if submitting to Freddie Mac's API"
          },
          "case_file_id": {
            "type": "string",
            "description": "Case File ID, only required if submitting to Fannie Mae's API"
          },
          "lender_id": {
            "type": "string",
            "description": "Lender ID"
          },
          "lender_loan_id": {
            "type": "string",
            "description": "Lender Loan ID"
          },
          "lender_name": {
            "type": "string",
            "description": "Lender name"
          },
          "lender_address": {
            "type": "string",
            "description": "Lender full address"
          },
          "lender_contact": {
            "type": "string",
            "description": "Lender contact (phone or e-mail)"
          }
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "text": {
            "type": "string",
            "description": "Message content"
          },
          "sender_id": {
            "type": "string",
            "description": "Sender identifier"
          },
          "sender_name": {
            "type": "string",
            "description": "Sender name"
          },
          "photo_request_id": {
            "type": "number",
            "description": "Photo Request identifier"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          }
        }
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "token": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "revoked_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          }
        }
      },
      "Endpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "url": {
            "type": "string",
            "description": "Url that will be requested"
          },
          "method": {
            "type": "string",
            "description": "the http method"
          },
          "username": {
            "type": "string",
            "description": "Username for authentication"
          },
          "password": {
            "type": "string",
            "description": "Password for authentication"
          }
        }
      },
      "Notification": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Notification name"
          },
          "value": {
            "type": "string",
            "description": "Notification value"
          }
        }
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier"
          },
          "name": {
            "type": "string",
            "description": "Company name"
          },
          "role": {
            "type": "string",
            "description": "Company role",
            "enum": [
              "admin",
              "client",
              "enterprise_client"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          },
          "automatic_approve": {
            "type": "boolean",
            "description": "Automatic approve photo requests"
          },
          "report_header_image_url": {
            "type": "string",
            "description": "Report header image url"
          },
          "report_footer_image_url": {
            "type": "string",
            "description": "Report footer image url"
          },
          "quality_assurance": {
            "type": "boolean",
            "description": "Quality assurance"
          },
          "pdr_enabled": {
            "type": "boolean",
            "description": "PDR enabled"
          },
          "direct_sms_content": {
            "type": "string",
            "description": "Direct SMS content"
          },
          "photo_request_report_disclaimer": {
            "type": "string",
            "description": "Photo request report disclaimer"
          },
          "amc_id": {
            "type": "string",
            "description": "AMC ID"
          },
          "amc_name": {
            "type": "string",
            "description": "AMC name"
          },
          "photo_datetime_label": {
            "type": "string",
            "description": "Photo datetime label"
          },
          "show_report_signature": {
            "type": "boolean",
            "description": "Show report signature"
          },
          "payments_report_token": {
            "type": "string",
            "description": "Payments report token"
          },
          "address": {
            "type": "string",
            "description": "Address"
          },
          "small_address": {
            "type": "string",
            "description": "Address without city, state, zip and country"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "state": {
            "type": "string",
            "description": "State"
          },
          "zip": {
            "type": "string",
            "description": "Zip"
          },
          "orders_never_expire": {
            "type": "boolean",
            "description": "Orders never expire"
          },
          "notify_webhook": {
            "type": "array",
            "description": "Webhook notifications",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          },
          "notify_email": {
            "type": "array",
            "description": "Email notifications",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          }
        }
      },
      "CSVUpload": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Title"
          },
          "status": {
            "type": "string",
            "description": "Status"
          },
          "file_url": {
            "type": "string",
            "description": "CSV file URL used to create the bulk request"
          },
          "total_photo_requests_created": {
            "type": "number",
            "description": "Total photo requests created"
          },
          "total_photo_requests_with_error": {
            "type": "number",
            "description": "Total photo requests with error"
          },
          "total_photo_requests": {
            "type": "number",
            "description": "Total photo requests defined in the CSV file"
          },
          "download_token": {
            "type": "string",
            "description": "A token to download the CSV Summary Output"
          },
          "created_at": {
            "type": "string",
            "description": "Creation date"
          },
          "total_completed_photo_requests": {
            "type": "number",
            "description": "Total completed photo requests"
          },
          "download_report_url": {
            "type": "string",
            "description": "CSV Summary Output download URL"
          }
        }
      },
      "PhotoRequestCreateRequest": {
        "type": "object",
        "description": "Create a Photo Request.\n\nWhen creating the photo request you can specifically define the Photo Request shape\n(Tasks, Unlimited Tasks, Question Groups) or you can previously create a *Photo Request Template*\nin the ProxyPics platform, then simply pass the provided token. The latter is highly advised.\n\nFields specific to Crowdsource platform:\n- `expires_at` - The time the photo request will be available for photo takers to pick it up\n- `price_boost` - An amount you may want to add to the request price to make it more appeal for photo takers\n\nFields specific to Direct platform:\n- `property_owner_phone` (required) - The phone number to directly assign the request\n- `direct_due_date` (required) - The time the assignment will be available for completion\n\nNote on templates:\n- `template_token` - NOT NEEDED IF PDR/UPD. When you use the template token all the fields below are not considered.\n  The template token is the \"Product\" token. So the photo request is created with all the tasks and questions defined\n  in the template (product)\n\nUPD:\n- If `uniform_property_dataset_report_attributes` is set, we'll ignore the template token and use our own UPD template\n  to create the PhotoRequest.\n",
        "required": [
          "address"
        ],
        "properties": {
          "address": {
            "type": "string",
            "description": "The photo request address (we'll run a geolocation lookup here)"
          },
          "latitude": {
            "type": "number",
            "description": "Latitude, optional"
          },
          "longitude": {
            "type": "number",
            "description": "Longitude, optional"
          },
          "city": {
            "type": "string",
            "description": "City, optional"
          },
          "state": {
            "type": "string",
            "description": "State, optional"
          },
          "zip": {
            "type": "string",
            "description": "Zip, optional"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "If not provided, the photo request will expire according to the company settings"
          },
          "loan_number": {
            "type": "string",
            "description": "An identifier number defined by you"
          },
          "borrower_name": {
            "type": "string",
            "description": "An identifier for the borrower name"
          },
          "price_boost": {
            "type": "number",
            "description": "Increase the amount paid to users, expressed in cents, only used when `photo request platform` is `crowdsource`"
          },
          "property_owner_phone": {
            "type": "string",
            "description": "Required if `photo_request_platform` is `direct`, it is used to send the SMS and create a temporary account for the photo taker to take the photos"
          },
          "template_token": {
            "type": "string",
            "description": "NOT NEEDED IF PDR/UPD.\nWhen you use the `template token`, the system fetches tasks, questions, etc. from the template.\n"
          },
          "direct_due_date": {
            "type": "string",
            "format": "date-time",
            "description": "Required when `photo_request_platform` is `direct`"
          },
          "photo_request_platform": {
            "type": "string",
            "description": "Required if you are creating a photo request without providing the template token",
            "enum": [
              "crowdsource",
              "direct"
            ]
          },
          "unlimited_tasks": {
            "type": "boolean",
            "description": "Allow extra photo tasks to be freely taken by the photo taker"
          },
          "unlimited_tasks_descriptions": {
            "type": "string",
            "description": "Guidelines for the photo taker on what extra photo tasks should looks like"
          },
          "unlimited_sections_attributes": {
            "type": "array",
            "description": "If `unlimited_tasks` is true you need to provide at least one `unlimited_section`. Unlimited sections are meant to request unlimited photos for a specific room/place e.g. \"Bathrooms\".",
            "items": {
              "$ref": "#/components/schemas/UnlimitedSection"
            }
          },
          "lockbox": {
            "type": "string",
            "description": "Lockbox number"
          },
          "external_id": {
            "type": "string",
            "description": "External ID to associate this photo request with"
          },
          "additional_notes": {
            "type": "string",
            "description": "Additional notes to Data Collector"
          },
          "behalf_of": {
            "type": "string",
            "description": "Job's behalf"
          },
          "appointment": {
            "type": "boolean",
            "description": "Set to `true` if this job needs an appointment schedule"
          },
          "condo_unit_number": {
            "type": "string",
            "description": "Condo unit number"
          },
          "condo": {
            "type": "boolean",
            "description": "Set this attribute to true if you're using Condo unit number and you need to share this information with the Data Collector"
          },
          "tasks": {
            "type": "array",
            "nullable": true,
            "description": "It should be `null` if you pass the `template_token` otherwise it is `required`",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "question_groups": {
            "type": "array",
            "nullable": true,
            "description": "Behaves the same as `tasks`",
            "items": {
              "$ref": "#/components/schemas/QuestionGroup"
            }
          },
          "contacts_attributes": {
            "type": "array",
            "description": "Attributes for Point of Contacts",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "appraisal_request_id": {
            "type": "number",
            "description": "The id of the appraisal request to associate this photo request with"
          },
          "report_for": {
            "type": "string",
            "description": "If provided, this value will be used inside the PDF report on 'For: ...' section."
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format) of the scheduled date (UTC). The order will be moved from \"scheduled\" to an active status after that date."
          },
          "uniform_property_dataset_report_attributes": {
            "$ref": "#/components/schemas/UniformPropertyDatasetReport"
          }
        }
      },
      "PhotoRequestExtendRequest": {
        "type": "object",
        "required": [
          "expires_at"
        ],
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The date/time (YYYY-MM-dd hh:mm:ss UTC format)"
          }
        }
      },
      "PhotoRequestRejectRequest": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for rejection.",
            "enum": [
              "unspecified",
              "blurry_photo",
              "wrong_direction",
              "incorrect_property",
              "people_in_photo",
              "property_not_visible",
              "other"
            ]
          },
          "clarification": {
            "type": "string",
            "nullable": true,
            "description": "Clarification for rejection. It helps reviewers to understand what went wrong. It's required only if `other` reason is specified."
          }
        }
      },
      "WebhookCreateRequest": {
        "type": "object",
        "required": [
          "url",
          "method"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "The url that will receive the request"
          },
          "method": {
            "type": "string",
            "enum": [
              "get",
              "post"
            ]
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "Username for basic authentication"
          },
          "password": {
            "type": "string",
            "nullable": true,
            "description": "Password for basic authentication"
          }
        }
      },
      "MessageCreateRequest": {
        "type": "object",
        "required": [
          "text",
          "photo_request_id"
        ],
        "properties": {
          "text": {
            "type": "string",
            "description": "Message content"
          },
          "photo_request_id": {
            "type": "number",
            "description": "Photo Request identifier"
          }
        }
      },
      "CompanyUpdateRequest": {
        "type": "object",
        "description": "Update your company account.\nSet notification types you want to subscribe.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "Company name"
          },
          "automatic_approve": {
            "type": "boolean",
            "description": "Automatic approve photo requests"
          },
          "direct_sms_content": {
            "type": "string",
            "description": "Direct SMS content"
          },
          "photo_request_report_disclaimer": {
            "type": "string",
            "description": "Photo request report disclaimer"
          },
          "amc_id": {
            "type": "string",
            "description": "AMC ID"
          },
          "amc_name": {
            "type": "string",
            "description": "AMC name"
          },
          "notify_webhook_photo_request_unassigned": {
            "type": "string",
            "description": "Notify webhook photo request unassigned ('true' or 'false')"
          },
          "notify_webhook_photo_request_assigned": {
            "type": "string",
            "description": "Notify webhook photo request assigned ('true' or 'false')"
          },
          "notify_webhook_photo_request_completed": {
            "type": "string",
            "description": "Notify webhook photo request completed ('true' or 'false')"
          },
          "notify_webhook_photo_request_expired": {
            "type": "string",
            "description": "Notify webhook photo request expired ('true' or 'false')"
          },
          "notify_webhook_photo_request_canceled": {
            "type": "string",
            "description": "Notify webhook photo request canceled ('true' or 'false')"
          },
          "notify_webhook_photo_request_fulfilled": {
            "type": "string",
            "description": "Notify webhook photo request fulfilled ('true' or 'false')"
          },
          "notify_webhook_photo_request_report_generated": {
            "type": "string",
            "description": "Notify webhook photo request report generated ('true' or 'false')"
          },
          "notify_webhook_appointment_scheduled": {
            "type": "string",
            "description": "Notify webhook appointment scheduled ('true' or 'false')"
          },
          "notify_webhook_assignment_accepted": {
            "type": "string",
            "description": "Notify webhook assignment accepted ('true' or 'false')"
          },
          "notify_webhook_error_occurred": {
            "type": "string",
            "description": "Notify webhook error occurred ('true' or 'false')"
          },
          "notify_webhook_assignment_cancelled": {
            "type": "string",
            "description": "Notify webhook assignment cancelled ('true' or 'false')"
          },
          "notify_webhook_report_generated": {
            "type": "string",
            "description": "Notify webhook report generated ('true' or 'false')"
          },
          "notify_webhook_message_added": {
            "type": "string",
            "description": "Notify webhook message added ('true' or 'false')"
          },
          "notify_email_photo_request_completed": {
            "type": "string",
            "description": "Notify email photo request completed ('true' or 'false')"
          },
          "notify_email_message_from_assignee": {
            "type": "string",
            "description": "Notify email message from assignee ('true' or 'false')"
          },
          "notify_email_report_generated": {
            "type": "string",
            "description": "Notify email report generated ('true' or 'false')"
          },
          "notify_email_appointment_scheduled": {
            "type": "string",
            "description": "Notify email appointment scheduled ('true' or 'false')"
          },
          "notify_email_invoice_generated": {
            "type": "string",
            "description": "Notify email invoice generated ('true' or 'false')"
          },
          "notify_email_payment_refused": {
            "type": "string",
            "description": "Notify email payment refused ('true' or 'false')"
          },
          "notify_email_csv_report_generated": {
            "type": "string",
            "description": "Notify email csv report generated ('true' or 'false')"
          },
          "notify_email_final_inspection_report_generated": {
            "type": "string",
            "description": "Notify email final inspection report generated ('true' or 'false')"
          },
          "notify_email_property_data_report_generated": {
            "type": "string",
            "description": "Notify email property data report generated ('true' or 'false')"
          }
        }
      }
    }
  },
  "paths": {
    "/photo-requests": {
      "get": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "List Photo Requests",
        "description": "List your photo requests.\n\nPagination:\n- `page` (default 1)\n- `per_page` (default 10)\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PhotoRequest"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PhotoRequestsListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "post": {
        "tags": [
          "Photo Requests",
          "UPD/PDR/PDC"
        ],
        "summary": "Create Photo Request (including UPD)",
        "description": "When creating the photo request you can specifically define the Photo Request shape (Tasks, Unlimited Tasks, Question Groups)\nor you can previously create a *Photo Request Template* in the ProxyPics platform, then simply pass the provided token.\nThe latter is highly advised.\n\nFields specific to Crowdsource platform:\n- `expires_at` - The time the photo request will be available for photo takers to pick it up\n- `price_boost` - An amount you may want to add to the request price to make it more appeal for photo takers\n\nFields specific to Direct platform:\n- `property_owner_phone` (required) - The phone number to directly assign the request\n- `direct_due_date` (required) - The time the assignment will be available for completion\n\nUPD/PDR/PDC:\n- To create a UPD order, just provide the address and UPD fields inside `uniform_property_dataset_report_attributes`.\n- The UPD template is automatically chosen by the system, you don't need to submit the `template_token` field for UPDs.\n- If this field is set, we'll ignore the template token and use our own UPD template to create the PhotoRequest.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhotoRequestCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}": {
      "get": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Show Photo Request",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "delete": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Cancel Photo Request",
        "description": "If you need to cancel a PhotoRequest, you can send a DELETE request for the PhotoRequest ID.\nIf it's 'unassigned' we will cancel the Photo Request and a successful reponse will be returned.\nIf your Photo Request status isn't 'unassigned', our support team will be notified about your cancelation request\nand we'll work to cancel the Photo Request for you.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}/duplicate-order": {
      "post": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Duplicate Photo Request",
        "description": "If you need to duplicate a PhotoRequest, creating a new one with the same template, tasks, unlimited sections, questions, etc.,\nyou can send a POST request to this endpoint providing a PhotoRequestId.\n\nThe created PhotoRequest will be related to the provided one by a `parent_id` field, adding up to DrawInspections for the address, for example.\n\nUseful for Draw Inspections, it creates a new Photo Request exactly the same as the provided ID, creating a Draw 2 from Draw 1 for example.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Original Photo Request ID on the URL"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}/extend": {
      "put": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Extend Photo Request",
        "description": "When a request is in `expired` state and you want to make it available again you can call the Extend.\n\nIt'll behave slightly different whether the Photo Request is for Crowdsource or it is for Direct.\n\nWhen it is for Crowdsource, the `expires_at` date will be updated to the parameter you passed and the request will be `unassigned`,\nmeaning that it is avalable for photo takers to pick it up again.\n\nWhen it is for Direct, the assignment `expires_at` will be updated to the parameter you passed, the request will `assigned`\nand the assignment will be back to `pending` state, meaning that the photo taker firstly assigned to it will still be able to submit it.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhotoRequestExtendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}/approve": {
      "put": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Approve Photo Request",
        "description": "When a request is in `completed` state and you want to approve it you can call the Approve.\n\nApproved jobs get fulfilled after payment confirmation, after the Job gets fulfilled the report is generated automatically,\na webhook will be trigerred and you'll have access to the report PDF URL.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}/reject": {
      "put": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Reject Photo Request",
        "description": "When a request is in `completed` state and you want to reject it you can call the Reject.\n\nRejected jobs get reviewed and the responsible photo taker gets notified and he can submit the photos again.\nIf needed, the job could go to `unassigned` status again and the submission will be repeated with another photo taker.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhotoRequestRejectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-requests/{id}/resend-sms-to-direct-property-owner": {
      "post": {
        "tags": [
          "Photo Requests"
        ],
        "summary": "Resend Direct SMS",
        "description": "If you have a Direct request, you can resend the text message to the borrower/Direct inspector.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/photo-request-templates": {
      "get": {
        "tags": [
          "Photo Request Templates / Products"
        ],
        "summary": "List Photo Request Templates (Products)",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoRequestTemplate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/appraisal-requests": {
      "get": {
        "tags": [
          "Appraisal Requests"
        ],
        "summary": "List Appraisal Requests",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppraisalRequest"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/AppraisalRequestsListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "post": {
        "tags": [
          "Appraisal Requests"
        ],
        "summary": "Create Appraisal Request",
        "description": "When creating the Appraisal Request you need to choose which appraisal product you want and this is defined by the `type` field.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "address",
                  "type"
                ],
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "The photo request address (we'll run a geolocation lookup here)"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "AutomatedValuationRequest",
                      "EvaluationRequest",
                      "AppraisalFormRequest"
                    ],
                    "description": "`AutomatedValuationRequest` - AVM\n`EvaluationRequest` - Simple BPO\n`AppraisalFormRequest` - BPO with adjustments\n"
                  },
                  "report_provider": {
                    "type": "string",
                    "enum": [
                      "ca",
                      "quantarium"
                    ],
                    "description": "`ca` - Collateral Analytics\n`quantarium` - Quantarium\n"
                  },
                  "loan_number": {
                    "type": "string"
                  },
                  "unit": {
                    "type": "string",
                    "description": "If it is a condo the unit is important"
                  },
                  "occupancy": {
                    "type": "string",
                    "description": "Property occupancy"
                  },
                  "borrower_name": {
                    "type": "string"
                  },
                  "borrower_email": {
                    "type": "string"
                  },
                  "borrower_phone": {
                    "type": "string"
                  },
                  "borrower_optin": {
                    "type": "boolean"
                  },
                  "second_borrower_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppraisalRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/appraisal-requests/{id}": {
      "get": {
        "tags": [
          "Appraisal Requests"
        ],
        "summary": "Show Appraisal Request",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppraisalRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/appraisal-requests/{id}/approve": {
      "put": {
        "tags": [
          "Appraisal Requests"
        ],
        "summary": "Approve Appraisal Request",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppraisalRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/api-keys": {
      "get": {
        "tags": [
          "API Keys"
        ],
        "summary": "List API Keys",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKey"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          }
        }
      },
      "post": {
        "tags": [
          "API Keys"
        ],
        "summary": "Create API Key",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          }
        }
      }
    },
    "/api-keys/{id}": {
      "delete": {
        "tags": [
          "API Keys"
        ],
        "summary": "Destroy API Key",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/companies/{id}": {
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Update Company",
        "description": "Update your company account.\nSet notification types you want to subscribe.\n\nParameters:\n- `id` (optional, number) Default: current user id\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Company id (if omitted by client convention, defaults to current user id; path param still required in OpenAPI)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create Webhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Endpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List Webhooks",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Endpoint"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Destroy Webhook",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Endpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/photo-requests/{id}/messages": {
      "post": {
        "tags": [
          "Messages"
        ],
        "summary": "Create Message",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "get": {
        "tags": [
          "Messages"
        ],
        "summary": "List Messages",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Message"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/csv-uploads": {
      "get": {
        "tags": [
          "CSV Uploads"
        ],
        "summary": "List CSV Uploads",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CSVUpload"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CSVUploadsListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    },
    "/csv-uploads/{id}": {
      "get": {
        "tags": [
          "CSV Uploads"
        ],
        "summary": "Show CSV Upload",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdPathParamInteger"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CSVUpload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      }
    }
  }
}
