This s a documentation page for our shiny new REST API - you weren't meant to find it. This API isn't ready for public use yet. We're chopping and changing it a LOT as we grow it. So if you build something that uses it then it's very likely to break in a future update. Don't say you weren't warned!
URL: | https://api.kashflow.com/v2/viapost |
Method(s): | POST, GET |
Response Formats: | JSON, XML |
Description: | It allows to deliver the specified document to specifed address by using viapost third party service. User’s viapost account must be configured before using this api. Ref: http://www.viapost.com |
Parameters
Name | Type | Description |
---|---|---|
FileName | String | Name of the file to be uploaded. |
DocumentUrl | String | Url of the document that needs to be sent. |
Balance | Decimal | User viapost account’s balance. |
Address parameters | ||
Name | String | Name |
Line1 | String | First line of address |
Line2 | String | Seconf line of address |
Line3 | String | Third line of address |
Line4 | String | Fourth line of address |
Line5 | String | Fifth line of address |
PostCode | String | Postal code |
POST Operation
Sends the specified document to specified address using viapost service. In response api returns the remaining balance of user’s viapost account. For sending document, FileName, DocumentUrl parameters are mandatory. Address parameter is required with atleast one line property.The ‘Name’ field in the Address object is mandatory only if the ‘IncludeContactName’ setting of the ‘ViaPostSettings’ object in settings resource is true.
URL : /viapost
Example request for post of viapost
{
"FileName": "SampleName",
"Address":
{
"Name": "xyz",
"Line1": "line1",
"Line2": "line2",
"Line3": "line3",
"Line4": "line4",
"Line5": "line5",
"PostCode": "231219"
},
"DocumentUrl": "http://www.xyz.com/filename.pdf"
}
Example response for post of viapost
{
"Balance": 0.24
}
GET Operation
Returns the balance of user’s viapost account.URL : /viapost/balance
Example response for get of viapost
{
"Balance": 0.24
}