File upload API can be used to add files to a custom field set depending on the entity (lead,opportunity,activity). Accounts like upgrad use these to upload files in a CFS field for example in the field Aadhar card
Steps to proceed
Certain pre requisites for using the API include access key, secret key, id, schema name, entity schema name and the entity itself.
Before proceeding with postman it would be suggested to add as it is much simpler to fill compared to the default json format multipart/form-data as content type in your header as it is much simpler to fill compared to the default json format
After this you need to fill out the rest of the parameters mentioned below
| Parameter | Type | Description |
uploadFiles | File | The file you want to upload |
FileType | Number | 0 = Document 1 = Image 3 = Lead Attachment 7 = Custom Field Set Document |
AccessKey | String | Access Key of your LeadSquared account |
SecretKey | String | Secret Key of your LeadSquared account |
FileStorageType | Number | 0 = Permanent 1 = Temporary |
EnableResize | Boolean | true or false Always set to ‘false’ for Custom Field Sets |
Id | String | Pass the Lead Id if Entity is lead. Pass the Opportunity Event Code if Entity is opportunity. Pass the Activity Event Code if the entity is activity. |
SchemaName | String | Schema name of the file-type field within the custom field set. |
EntitySchemaName | String | Schema name of the lead/activity field with which the custom field set is associated. |
Entity | Number | 0 = Lead 1 = Activity/Opportunity. This is dependent on the Id that’s being passed. If you pass the Activity Event Code as the Id, and then pass 1 as the Entity, the corresponding activity is updated. Similarly, if you pass the Opportunity Event Code as the Id, and then pass 1 as the Entity, the corresponding opportunity is updated. |
StorageVersion | Number | The storage version configured. 0 is the default LeadSquared configuration If you have your own storage configured, pass the value associated with it. For more information, contact your account manager. |
API urls depends on the region of the server of the account
| Region | URL |
