Files

Files are the way to receive the appraisal reports, SSRs, invoices, and you can also upload your own files to the order.

The files model

The files model contain the file type, the filename, and the link to retrieve it.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the message.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the file was created.

  • Name
    file_type
    Type
    object
    Description

    The file type.

    Show child attributes
  • Name
    filename
    Type
    string
    Description

    The filename.


GET/api/v1/orders/{order_id}/files

List all files

This endpoint allows you to retrieve all order files.

URL attributes

  • Name
    order_id
    Type
    string
    Description

    Unique identifier for the order.

Request

GET
/api/v1/orders/{order_id}/files
curl --location --request GET 'https://app.collateralxp.com/api/v1/orders/d54008ce-90e5-4012-8a10-4fcbc786ae5f/files' \
  --header 'X-API-KEY: {api_key}'

Response

[
  {
    "id": "892e4c39-e11e-471b-b312-013d06437ab5",
    "created_at": "02/03/2023",
    "file_type": {
      "id": "785aa7b0-6b4f-49c5-976d-19bec6f88bf6",
      "name": "Certificate of compliance",
      "slug": "certificate_of_compliance"
    },
    "filename": "certificate_of_compliance.pdf",
    "link": "https://app.collateralxp.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMGJXQlE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--c72fcb629deeb3b0341852fdaf7460e7ed85ae31/certificate_of_compliance.pdf?disposition=attachment"
  }
]

POST/api/v1/orders/{order_id}/files

Upload a file

This endpoint allows you to upload an order file. It is a form-data request.

Required attributes

  • Name
    attachment
    Type
    file
    Description

    The file to upload.

  • Name
    file_type
    Type
    string
    Description

    File type enum. Possible values: appraisal_pdf appraisal_xml appraisal_env appraisal_misc ssr_fannie_mae ssr_freddie_mac ssr_ead purchase_agreement appraiser_invoice certificate_of_compliance sales_contract settlement_statement survey title plans_specs other addendum workflow_action_confirmation rehab_budget third_party_data_collection_report engagement_letter

Request

POST
/v1/messages
curl --location --request POST 'https://app.collateralxp.com/api/v1/orders/5be64947-0d33-474c-88d5-51589ba6d7a3/files' \
  --header 'X-API-KEY: {api_key}' \
  --form 'attachment=@"/sample.png"' \
  --form 'file_type="other"'

Response

{
  "id": "a150f80b-3807-4ced-bdba-3350943cf483",
  "attachment_key": "utqvw7jifpm1wiq00slokz0qxoep",
  "created_at": "03/05/2024",
  "file_type": {
    "id": "c1f43ce0-8090-4982-b0f4-1bfa5fb9e3f8",
    "name": "Other",
    "slug": "other"
  },
  "filename": "sample.png",
  "link": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBL2tKQ2c9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--e5be01b877c44f195651b4792893e353d457a109/sample.png?disposition=attachment"
}