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/duplicate |
Method(s): | post |
Response Formats: | JSON or XML |
Description: | This method allows user to create duplicate KashFlow entities from existing entities. For example, a quote can be converted to an invoice using this API. |
Name | Type | Description |
---|---|---|
SourceNumber | Numeric | Number of the entity to be copied |
SourceType | String | Type of the KF entity to be copied. The possible values can be “Quote” or “Invoice” |
TargetType | String | Type of the target KF entity. The possible values can be “Quote” or “Invoice” |
TargetId | Numeric | Database ID of the newly created entity |
TargetNumber | Numeric | Unique number of the newly created entity |
POST Operation
To copy an existing KF entity to a new KF entity.
Mandatory parameters:
1. SourceNumber
2. SourceType
3. TargetType
URL : /duplicate
To convert an existing entity (say, Quote) to another KF entity (say, Invoice)
Example request for POST of duplicate
{
"SourceNumber" : 29,
"TargetId": 0,
"TargetNumber": 0,
"SourceType": "Quote",
"TargetType": "Invoice"
}
Example response of POST of duplicate
{
"SourceNumber" : 29,
"TargetId": 12473,
"TargetNumber": 35,
"SourceType": "Quote",
"TargetType": "Invoice"
}