Notes

Notes are the way to communicate with appraisal order stakeholders.

The note model

The notes model contains all the relevant information for the note, such as the author, content, etc.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the conversation.

  • Name
    additional_emails
    Type
    array
    Description

    Array of additional emails to send the note to.

  • Name
    attachments
    Type
    array
    Description

    Array of attachments for the note.

    Show child attributes
  • Name
    author_name
    Type
    string
    Description

    Name of the author of the note.

  • Name
    content
    Type
    string
    Description

    Content of the note.

  • Name
    created_at
    Type
    timestamp
    Description

    Date of when the note was created.

  • Name
    important
    Type
    boolean
    Description

    Whether the note is important or not.

  • Name
    subject
    Type
    string
    Description

    Subject of the note.


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

List all notes

This endpoint allows you to retrieve a list of all order notes.

Required URL attributes

  • Name
    order_id
    Type
    string
    Description

    Unique identifier for the order.

Request

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

Response

[
  {
    "id": "baa8b725-3e58-4d36-b6d4-89b084b9e678",
    "additional_emails": [
      "test@test.com"
    ],
    "attachments": [
      {
        "filename": "155-Recibo de Pagamento.pdf",
        "link": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMGZXQlE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--323f07bb40419427bf9c41747562056a07bc79be/155-Recibo%20de%20Pagamento.pdf"
      }
    ],
    "author_name": "Pedro Evalzone",
    "content": "<div class=\"trix-content\">\n  <div>Test</div>\n</div>\n",
    "created_at": "02/06/2023",
    "important": true,
    "subject": null
  }
]

POST/api/v1/orders/d54008ce-90e5-4012-8a10-4fcbc786ae5f/notes

Create a note

This endpoint allows you to create an order note. It is a form-data request.

Attributes

  • Name
    content
    Type
    string required
    Description

    Content of the note.

  • Name
    subject
    Type
    string
    Description

    Subject of the note.

  • Name
    additional_emails
    Type
    array
    Description

    Array of additional emails to send the note to.

  • Name
    attachments
    Type
    array
    Description

    Array of attachments for the note.

Request

POST
/api/v1/orders/{order_id}/notes
curl --location --request POST 'http://app.collateralxp.com/api/v1/orders/d54008ce-90e5-4012-8a10-4fcbc786ae5f/notes' \
  --header 'X-API-KEY: nWy3eBjdBB15FgLdGLpqKfu3' \
  --form 'content="The frog jumped into the river"' \
  --form 'subject="The frog"' \
  --form 'additional_emails[]="foo@bar.com"' \
  --form 'attachments[]=@"/1004.xml"'

Response

{
  "id": "a6e50d3c-a1cb-436b-aee0-0137f9f0451a",
  "additional_emails": [
    "foo@bar.com"
  ],
  "attachments": [],
  "author_name": "Chad Heyrman",
  "content": "<div class=\"trix-content\">\n  The frog jumped into the river\n</div>\n",
  "created_at": "02/06/2023",
  "important": null,
  "subject": "The frog"
}