Tip |
---|
Available from CRM.COM R11.0.0 |
Table of Contents | ||
---|---|---|
|
GET attachments/list
This method returns the attachments related with a specific entity. Multiple attachments are returned by each call.
Resource URL
Parameters
Name | Type | Description | ||
token | String | The token retrieved from the login method | ||
entity (mandatory) | String | The name of the entity related with the attachment. The supported entities are the following:
| ||
entity_id (mandatory on conditions) | String | The ID of the entity related with the attachment, which is mandatory only if the entity is not set to ATTACHMENTSLIBRARY
| ||
classification (mandatory on conditions) | String | The classification of the attachment, which is mandatory only if the entity is set to ATTACHMENTSLIBRARY
| ||
fields_set | List of Strings, comma separated | A list of fields that should be included in the results. If not specified then all the available fields will be returned |
Restrictions
- It is mandatory to specify at least one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
Expand | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||
HTTP Method: GET
Request: Response:
Note: To retrieve or display the actual image you need to construct the following URL
for example
|
POST attachments/add
This method is used to add attachments on an existing entity. This Web API method requires a multipart/form-data post, as defined in RFC 1867. There are many libraries available that can be used in order to submit multipart/form-data posts (for example MultipartEntity in Java). A single attachment can be added through each call
Resource URL
Parameters
Name | Type | Description | ||
token | String | The token retrieved from the login method | ||
entity (mandatory) | String | The name of the entity related with the attachments that should be returned as a result. The supported entities are the following:
| ||
entity_id (mandatory on conditions) | String | The ID of the entity related with the attachments that should be returned as a result, and is mandatory only if the entity is not set to ATTACHMENTSLIBRARY
| ||
file (semi-optional) | File | The file that should be added as an attachment | ||
url (semi-optional) | String | The URL that should be added as an attachment | ||
classification (mandatory on conditions) | String | The classification of the attachment, and is mandatory only if the entity is set to ATTACHMENTSLIBRARY
| ||
notes (optional) | String | The notes related with the attachment | ||
fields_set | List of Strings, comma separated | A list of fields that should be included in the results. If not specified then all the available fields will be returned |
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
cURL Example:
PHP Example:
|
POST attachments/delete
This method is used to delete attachments. A single attachment can be deleted through this method
Resource URL
Parameters
Name | Type | Description |
token | String | The token retrieved from the login method |
id (mandatory) | String | The id of the attachment that should be deleted
|
Response Data
Not applicable
Examples
Expand | ||||||
---|---|---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"id":"F7FF2E30AAD94720B844B1035B195955"
} |
Response:
Not applicablename | blue |
---|
Child pages (Children Display) | ||||
---|---|---|---|---|
|