Create new Attached Document
  • 28 Oct 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Create new Attached Document

  • Dark
    Light
  • PDF

Article summary

The Post/attached docs/Operation is designed to create new attached documents, available from product version 3.2.8. It requires an API Key in the Authorization Token header for security. The body parameters include an application/json object with three required fields: attachedObjectType (integer), documentId (integer), and target (integer). Successful responses return a 201 status with details about the created attachment, including creator information, creation timestamp, document ID, unique attachment ID, and target ID. If there is an error in the request, a 400 status is returned, indicating field validation failures, along with details of the failed fields and validation errors. A 401 status indicates missing or invalid authentication credentials, providing a detailed error description. This operation facilitates the management of document attachments within the application.

Post
/attached-docs/

Operation is used to create new attached document. Available from product version 3.2.8.

Security
API Key
Header parameter nameAuthorization

Token issued for API consumer.

Body parameters

Attachment to be created

object
attachedObjectType
integer Required

<<_objecttype>> id of the object attached to the document. It is unique id which determines type of the target object. <<_getobjecttypes>>

documentId
integer Required

Id of external document attached to the object

target
integer Required

Id of the object attached to the document

Responses
201

A created Attachment

{
  "createdBy": "USER",
  "createdTs": "2020-06-05T11:23:42Z",
  "documentId": 52902,
  "id": 33790,
  "target": 404901
}
object
createdBy
string

creator

createdTs
string (date-time)

Creation date and time

documentId
integer

Id of external document attached to the object

id
integer

Unique id of Attached Document

target
integer

Id of the object attached to the document

400

There was an error in request. Usually field validation failed.

{
  "attachedObjectType": [
    "This field is required."
  ],
  "documentId": [
    "This field is required."
  ],
  "target": [
    "This field is required."
  ]
}
object

Fields which failed validation

property*
Array of string additionalProperties

List of validation errors for this fieldname

string

Validation error

401

Authentication credentials are missing or invalid

{
  "details": "Authentication credentials were not provided"
}
object
details
string

Detailed description of error


Was this article helpful?