POST v1/Documents
Add a document
Request Information
URI Parameters
None.
Body Parameters
The document as described by DocumentModel. You may upload as multipart/form-data.
DocumentModelName | Description | Type | Additional information |
---|---|---|---|
apiSiteId | SiteIdentifier |
None. |
|
docsId | integer |
None. |
|
documentTypeId |
int, one of enDocumentType: image or pdf, etc |
enDocumentType |
None. |
external |
Set true if the document is external to us; for example a YouTube link |
boolean |
None. |
url |
If external is true, we need the Url |
string |
None. |
caption |
Optional Image caption |
string |
None. |
showOrder |
Optionally order your documents |
integer |
None. |
exif |
Optional Image exif data |
string |
None. |
latitude |
Latitude of image |
decimal number |
None. |
longitude |
Longitude of image |
decimal number |
None. |
filename |
Name of this file without the path. Example: barn.jpg |
string |
None. |
fileBytes |
Binary data for this document |
Collection of byte |
None. |
timeCreatedInGMT |
Time Created in GMT in seconds since January 1, 1970 |
string |
None. |
securityHash |
Security hash for checking purposes |
string |
None. |
brandId |
Your brand identifier |
integer |
None. |
Request Formats
application/json, text/json
{ "apiSiteId": 0, "docsId": 1, "documentTypeId": 0, "external": true, "url": "sample string 1", "caption": "sample string 2", "showOrder": 1, "exif": "sample string 3", "latitude": 1.0, "longitude": 1.0, "filename": "sample string 4", "fileBytes": "QEA=", "timeCreatedInGMT": "sample string 5", "securityHash": "sample string 6", "brandId": 7 }
application/xml, text/xml
<DocumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LandAndFarmWebApi.Models"> <brandId xmlns="http://schemas.datacontract.org/2004/07/LandAndFarmWebApi.Request">7</brandId> <securityHash xmlns="http://schemas.datacontract.org/2004/07/LandAndFarmWebApi.Request">sample string 6</securityHash> <timeCreatedInGMT xmlns="http://schemas.datacontract.org/2004/07/LandAndFarmWebApi.Request">sample string 5</timeCreatedInGMT> <apiSiteId>Land</apiSiteId> <caption>sample string 2</caption> <docsId>1</docsId> <documentTypeId>None</documentTypeId> <exif>sample string 3</exif> <external>true</external> <fileBytes>QEA=</fileBytes> <filename>sample string 4</filename> <latitude>1</latitude> <longitude>1</longitude> <showOrder>1</showOrder> <url>sample string 1</url> </DocumentModel>
application/x-www-form-urlencoded
multipart/form-data
Response Information
Resource Description
DocumentResponseName | Description | Type | Additional information |
---|---|---|---|
docsId | integer |
None. |
|
docsPath | string |
None. |
|
docsOnS3 | boolean |
None. |
|
filename | string |
None. |
|
success |
indicates the call was successful or not |
boolean |
None. |
errors |
array of error messages |
Collection of string |
None. |
Response Formats
application/json, text/json
{ "docsId": 1, "docsPath": "sample string 2", "docsOnS3": true, "filename": "sample string 4", "success": true, "errors": [ "sample string 1", "sample string 2" ] }
application/xml, text/xml
<DocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LandAndFarmWebApi.Response"> <errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </errors> <success>true</success> <docsId>1</docsId> <docsOnS3>true</docsOnS3> <docsPath>sample string 2</docsPath> <filename>sample string 4</filename> </DocumentResponse>