EMAIL api/v1/Documents/{id}?token={token}&documentNumber={documentNumber}&trxTypeId={trxTypeId}&lan={lan}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}
Send a document via mail.
Note: To invoke this call you will have to use a non-standard Http verb: EMAIL . Example:
curl.exe --verbose -X EMAIL "http://app.caspitweb.biz/api/v1/Documents/doc14245?token=zzzz"
Alternatively you can use the EmailDocument API call. It has identical functionality but uses POST
Request Information
URI Parameters
Name | Description | Type/Additional information |
---|---|---|
token |
The access token. You can pass the token in the query string or in a header called Caspit-Token |
string |
documentNumber |
The document's number. E.g.: "02/200130" |
string |
trxTypeId |
Optional. The document TrxTypeId.
|
|
id |
The document's id. If specified then it takes precedence over the document number and over the document's type |
string |
lan |
The langauage. 0 = Hebrew, 1 = English. Default is Hebrew. |
Default value is Hebrew |
inCaseOfErrorReturnHttpCode |
Default value is BadRequest |
Body Parameters
An EmailDetails object. It contains the e-mail addresses and the mail body
Request Formats
application/json, text/json
{ "Subject": "sample string 1", "Body": "sample string 2", "To": "sample string 3", "CC": "sample string 4", "BCC": "sample string 5" }
application/xml, text/xml
<EmailDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.caspit.biz/2013/03"> <BCC>sample string 5</BCC> <Body>sample string 2</Body> <CC>sample string 4</CC> <Subject>sample string 1</Subject> <To>sample string 3</To> </EmailDetails>
application/x-www-form-urlencoded
Sample not available.
Response Description
A string: "Document sent to: xxxxx@gmail.com, yyyyy@walla.com"