Documents Attachments
Exists
Overview
This endpoint is used to check if a specific attachment is associated with a given document. By providing the document identifier (uid), the attachment identifier (attachmentId), and the attachment filename (filename), this endpoint determines whether the specified attachment exists without retrieving or displaying the full content of the attachment.
Endpoint
HEAD /api/v2013/documents/{uid}/attachments/{attachmentId}/{filename}
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Accept | String | Specifies the format in which the client expects the server to return the response data. The allowed value is application/json, indicating that the response should be in JSON format. This helps the server understand how to format the response to meet the client's expectations. |
| Content-Type | String | Indicates the format of the request body sent by the client. The allowed value is application/json, meaning that the data being sent to the server is formatted as JSON. This informs the server of the data type it should expect and how to process it accordingly. |
URL Parameters
The following URL parameter is required:
| Field | Type | Description |
|---|---|---|
| uid | String | A unique identifier for the document. This value is case-sensitive and is used to uniquely identify and retrieve the specific document. The identifier must conform to the pattern /^[A-Za-z0-9\-_]{11,128}$/, meaning it can include uppercase and lowercase letters, numbers, hyphens, and underscores, with a length between 11 and 128 characters. This ensures that each document has a distinct and valid ID. |
| filename | String | The name of the file that needs to be checked for existence. This field specifies the file name to verify if it is present in the system or storage. It should be formatted correctly and include the appropriate file extension if necessary. The check will determine whether the file with the specified name exists or not, which is useful for file management and validation purposes. |
| attachmentId | Integer | Identifier for the attachment in the Clearing house system. |
Playground
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.
Get Thumbnail
Overview
This endpoint retrieves a thumbnail image of a specific document attachment. This is useful for displaying a preview of the attachment, such as an image, PDF, or other visual files, without downloading the entire file.
Endpoint
GET /api/v2013/documents/{uid}/attachments/{attachmentId}/{filename}/thumbnail
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Accept | String | Specifies the format in which the client expects the server to return the response data. The allowed value is application/json, indicating that the response should be in JSON format. This helps the server understand how to format the response to meet the client's expectations. |
| Content-Type | String | Indicates the format of the request body sent by the client. The allowed value is application/json, meaning that the data being sent to the server is formatted as JSON. This informs the server of the data type it should expect and how to process it accordingly. |
URL Parameters
The following URL parameter is required:
| Field | Type | Description |
|---|---|---|
| uid | String | A unique identifier for the document. This value is case-sensitive and is used to uniquely identify and retrieve the specific document. The identifier must conform to the pattern /^[A-Za-z0-9\-_]{11,128}$/, meaning it can include uppercase and lowercase letters, numbers, hyphens, and underscores, with a length between 11 and 128 characters. This ensures that each document has a distinct and valid ID. |
| filename | String | The name of the file that needs to be checked for existence. This field specifies the file name to verify if it is present in the system or storage. It should be formatted correctly and include the appropriate file extension if necessary. The check will determine whether the file with the specified name exists or not, which is useful for file management and validation purposes. |
| attachmentId | Integer | Identifier for the attachment in the Clearing house system. |
Playground
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.
Get
Overview
This endpoint retrieves an attachment for a specific document. The endpoint uses the uid of the document and the attachmentId of the attachment to locate the file, allowing clients to download the attachment.
Endpoint
GET /api/v2013/documents/{uid}/attachments/{attachmentId}/{filename}
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Accept | String | Specifies the format in which the client expects the server to return the response data. The allowed value is application/json, indicating that the response should be in JSON format. This helps the server understand how to format the response to meet the client's expectations. |
| Content-Type | String | Indicates the format of the request body sent by the client. The allowed value is application/json, meaning that the data being sent to the server is formatted as JSON. This informs the server of the data type it should expect and how to process it accordingly. |
URL Parameters
The following URL parameter is required:
| Field | Type | Description |
|---|---|---|
| uid | String | A unique identifier for the document. This value is case-sensitive and is used to uniquely identify and retrieve the specific document. The identifier must conform to the pattern /^[A-Za-z0-9\-_]{11,128}$/, meaning it can include uppercase and lowercase letters, numbers, hyphens, and underscores, with a length between 11 and 128 characters. This ensures that each document has a distinct and valid ID. |
| filename | String | The name of the file that needs to be checked for existence. This field specifies the file name to verify if it is present in the system or storage. It should be formatted correctly and include the appropriate file extension if necessary. The check will determine whether the file with the specified name exists or not, which is useful for file management and validation purposes. |
| attachmentId | Integer | Identifier for the attachment in the Clearing house system. |
Playground
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.
List
Overview
The "List" API endpoint retrieves a comprehensive list of attachments associated with a specific document. This endpoint is designed to support various filtering, ordering, and pagination options, allowing you to efficiently manage and retrieve attachments based on specific criteria.
Endpoint
GET /api/v2013/documents/{uid}/attachments
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Authorization | String | Contains the token used for authenticating the request. This header is crucial for accessing protected resources and services. It typically holds a bearer token or other authentication credentials that the server uses to verify the identity of the client making the request. Ensure that the token is valid and kept confidential. |
| Accept | String | Specifies the desired format for the response from the server. The allowed value is "application/json", which means the client expects the response data to be formatted in JSON. This header helps the server understand how to structure the response to meet the client's expectations and ensure compatibility with the client's data handling mechanisms. |
Query Parameters
The following query parameters can be used to refine the request:
| Field | Type | Description |
|---|---|---|
| filter | String | Optional. The $filter system query option enables clients to specify criteria for filtering the results of a query. This allows for retrieving only those resources that meet certain conditions or constraints. For example, you can use $filter to return only items that have a specific property value or that fall within a certain range. For detailed usage and examples, refer to the OData $filter documentation. |
| orderby | String | Optional. The $orderby system query option allows clients to sort the results of a query based on one or more properties. By specifying this option, you can control the order in which resources are returned, such as sorting by date, name, or any other attribute. This helps in organizing the results in a meaningful way according to the specified criteria. For detailed usage and examples, refer to the OData $orderby documentation. |
| top | String | Optional. The $top system query option limits the number of items returned in the result set. This is useful for pagination or for retrieving a subset of the total results, such as getting the top N records. For example, specifying $top=10 would return only the first 10 items of the queried collection. For detailed usage and examples, refer to the OData $top documentation. |
| skip | String | Optional. The $skip system query option specifies the number of items to be skipped from the beginning of the result set. This is commonly used in conjunction with $top to implement pagination, where you can skip a certain number of records and then return the next set. For example, specifying $skip=20 would skip the first 20 items and return the subsequent items from the query. For detailed usage and examples, refer to the OData $skip documentation. |
Playground
This is a protected route. To access this content, you need to be logged in. Logging in will provide you with an authentication token, which is required for making API calls.
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.
Create
Overview
This endpoint allows users to upload a file as an attachment to a specific document. The file is uploaded in binary format, with the document identified by its unique identifier uid and the file specified by its name filename. Currently, there is a limit of 1 GB for file uploads. Ensure that the uploaded file does not exceed this limit to avoid errors.
Endpoint
POST /api/v2013/documents/{uid}/attachments/{filename}
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Authorization | String | Contains the token used for authenticating the request. This header is crucial for accessing protected resources and services. It typically holds a bearer token or other authentication credentials that the server uses to verify the identity of the client making the request. Ensure that the token is valid and kept confidential. |
| Accept | String | Specifies the desired format for the response from the server. The allowed value is "application/json", which means the client expects the response data to be formatted in JSON. This header helps the server understand how to structure the response to meet the client's expectations and ensure compatibility with the client's data handling mechanisms. |
URL Parameters
The following URL parameter is required:
| Field | Type | Description |
|---|---|---|
| uid | String | A unique identifier for the record. This value is case-sensitive and is used to uniquely identify and retrieve the specific record. The identifier must conform to the pattern /^[A-Za-z0-9\-_]{11,128}$/, meaning it can include uppercase and lowercase letters, numbers, hyphens, and underscores, with a length between 11 and 128 characters. This ensures that each record has a distinct and valid ID. |
| filename | String | The name of the file that needs to be checked for existence. This field specifies the file name to verify if it is present in the system or storage. It should be formatted correctly and include the appropriate file extension if necessary. The check will determine whether the file with the specified name exists or not, which is useful for file management and validation purposes. |
Playground
This is a protected route. To access this content, you need to be logged in. Logging in will provide you with an authentication token, which is required for making API calls.
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.
Upload From Temporary Storage
Overview
This API endpoint allows persisting a temporary file as an attachment to a document. It takes the unique identifier of the document (uid) and the temporary file (tempFileId) and associates the temporary file as a permanent attachment to the specified document. There is no limit to the file size that can be uploaded through this endpoint.
Note: To create a temporary file that can be used with this endpoint, refer to the Temporary File Creation Guide.
Request
POST /api/v2013/documents/{uid}/attachments/persist-temporary/{tempFileId}
Headers
The request must include the following headers:
| Field | Type | Description |
|---|---|---|
| Authorization | String | Contains the token used for authenticating the request. This header is crucial for accessing protected resources and services. It typically holds a bearer token or other authentication credentials that the server uses to verify the identity of the client making the request. Ensure that the token is valid and kept confidential. |
| Accept | String | Specifies the desired format for the response from the server. The allowed value is "application/json", which means the client expects the response data to be formatted in JSON. This header helps the server understand how to structure the response to meet the client's expectations and ensure compatibility with the client's data handling mechanisms. |
URL Parameters
The following URL parameter is required:
| Field | Type | Description |
|---|---|---|
| uid | String | A unique identifier for the document. This value is case-sensitive and is used to uniquely identify and retrieve the specific document. The identifier must conform to the pattern /^[A-Za-z0-9\-_]{11,128}$/, meaning it can include uppercase and lowercase letters, numbers, hyphens, and underscores, with a length between 11 and 128 characters. This ensures that each document has a distinct and valid ID. |
| tempFileId | String | Unique identifier for the attached file. (using url-safe chars). |
Playground
This is a protected route. To access this content, you need to be logged in. Logging in will provide you with an authentication token, which is required for making API calls.
Swagger playground is loading, please wait...
An error occurred while loading Swagger playground, please refresh the page.