How can we help?
{{docApp.searchError}}
{{product.name}}
Searching in {{docApp.searchFilterBySpecificBookTitle}}
{{docApp.searchResultFilteredItems.length}} results for: {{docApp.currentResultsSearchText}}
in {{docApp.searchFilterBySpecificBookTitle}}
Search results have been limited. There are a total of {{docApp.searchResponse.totalResultsAvailable}} matches.
You have an odd number of " characters in your search terms - each one needs closing with a matching " character!
-
{{resultItem.title}}
{{resultItem.url}}
{{docApp.libraryHomeViewProduct.title || docApp.libraryHomeViewProduct.id}}
{{docApp.libraryHomeViewProduct.description}}
{{group.title || group.id}}
{{group.description}}
Operation Information
- Application Reference:
com.hornbill.suppliermanager
- Scope:
Entity - SupplierContracts
- Class:
Entity
- Required Privilege Level:
user
- Required Rights: Group A - canViewSuppliers; Group C - canUpdateSupplierContracts
Description
This flowcode operation updates the specified supplier contract.
Request Parameters
The updateSupplierContract API takes the following input parameters. It is important to note that the parameters must satisfy the requirement of the input validation checks.
Name | Type | Required | Description |
---|---|---|---|
supplierContractId |
xs:string |
Yes | The supplier contract id. |
name |
xs:string |
No | The name of the existing supplier contract |
description |
xs:string |
No | A description of the existing supplier contract |
type |
xs:string |
No | The type of the existing supplier contract. |
startDate |
xs:dateTime |
No | The start date of the existing supplier contract. |
endDate |
xs:dateTime |
No | The end date of the existing supplier contract. |
renewalStartDate |
xs:dateTime |
No | The renewal start date of the existing supplier contract. |
renewalEndDate |
xs:dateTime |
No | The renewal end date of the existing supplier contract. |
currency |
xs:string |
No | The currency of the existing supplier contract. |
value |
xs:decimal |
No | The value of the existing supplier contract. |
acquisitionMethod |
xs:string |
No | The acquisition method of the existing supplier contract. |
cancellationNoticePeriod |
xs:string |
No | The cancellation notice period of the existing supplier contract. |
costCentre |
xs:string |
No | The cost centre of the existing supplier contract. |
invoiceNumber |
xs:string |
No | The invoice number of the existing supplier contract. |
orderNumber |
xs:string |
No | The order number of the existing supplier contract. |
paymentType |
xs:string |
No | The payment type of the existing supplier contract. |
status |
xs:string |
No | The status of the existing supplier contract. Accepted values are (status.draft,status.active,status.archived). |
subStatus |
xs:string |
No | The Supplier Contract Sub Status value taken from the simple list. e.g. 'subStatus.rolling' |
ownedBy |
xs:string |
No | The user id of the owner of the existing supplier contract. |
budgetOwner |
xs:string |
No | The user id of the budget owner of the existing supplier contract. |
businessOwner |
xs:string |
No | The user id of the business owner of the existing supplier contract. |
workingTimeCalendar |
xs:string |
No | The working time calendar to be used against the existing supplier contract to record events. |
targetMinutesPerEvent |
xs:integer |
No | The target number of minutes to complete each event against the existing supplier contract. |
agreedComplianceTargetPercentage |
xs:decimal |
No | The agreed compliance target percentage for the existing supplier contract. |
contactEmailAddress |
xs:string |
No | A contact email address for the parent supplier for the existing supplier contract. |
penaltyDescription |
xs:string |
No | A description of any penalties occurred for missing the agreed compliance target percentage for the existing supplier contract. |
notes |
xs:string |
No | Any additional notes for the existing supplier contract. |
custom0 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom1 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom2 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom3 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom4 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom5 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom6 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom7 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom8 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom9 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom10 |
xs:string |
No | Custom data held against the existing supplier contract. |
custom11 |
xs:dateTime |
No | Custom data held against the existing supplier contract. |
custom12 |
xs:dateTime |
No | Custom data held against the existing supplier contract. |
custom13 |
xs:dateTime |
No | Custom data held against the existing supplier contract. |
custom14 |
xs:dateTime |
No | Custom data held against the existing supplier contract. |
custom15 |
xs:dateTime |
No | Custom data held against the existing supplier contract. |
custom16 |
xs:integer |
No | Custom data held against the existing supplier contract. |
custom17 |
xs:integer |
No | Custom data held against the existing supplier contract. |
custom18 |
xs:integer |
No | Custom data held against the existing supplier contract. |
custom19 |
xs:integer |
No | Custom data held against the existing supplier contract. |
custom20 |
xs:integer |
No | Custom data held against the existing supplier contract. |
custom21 |
xs:decimal |
No | Custom data held against the existing supplier contract. |
custom22 |
xs:decimal |
No | Custom data held against the existing supplier contract. |
custom23 |
xs:decimal |
No | Custom data held against the existing supplier contract. |
custom24 |
xs:decimal |
No | Custom data held against the existing supplier contract. |
custom25 |
xs:decimal |
No | Custom data held against the existing supplier contract. |
Response Parameters
Name | Type | Description |
---|---|---|
outcome |
xs:string |
The outcome of the flowcode operation. |
supplierContractId |
xs:string |
The supplier contract id. |
Code Examples
curl -X POST 'https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts' \
-H 'Authorization: ESP-APIKEY yourHornbillAPIKey' \
-H 'Content-Type: application/json' \
-d '{"@service":"apps/com.hornbill.suppliermanager/SupplierContracts","@method":"updateSupplierContract","params":{"supplierContractId":"xs:string","name":"xs:string","description":"xs:string","type":"xs:string","startDate":"xs:dateTime","endDate":"xs:dateTime","renewalStartDate":"xs:dateTime","renewalEndDate":"xs:dateTime","currency":"xs:string","value":1.23,"acquisitionMethod":"xs:string","cancellationNoticePeriod":"xs:string","costCentre":"xs:string","invoiceNumber":"xs:string","orderNumber":"xs:string","paymentType":"xs:string","status":"xs:string","subStatus":"xs:string","ownedBy":"xs:string","budgetOwner":"xs:string","businessOwner":"xs:string","workingTimeCalendar":"xs:string","targetMinutesPerEvent":1,"agreedComplianceTargetPercentage":1.23,"contactEmailAddress":"xs:string","penaltyDescription":"xs:string","notes":"xs:string","custom0":"xs:string","custom1":"xs:string","custom2":"xs:string","custom3":"xs:string","custom4":"xs:string","custom5":"xs:string","custom6":"xs:string","custom7":"xs:string","custom8":"xs:string","custom9":"xs:string","custom10":"xs:string","custom11":"xs:dateTime","custom12":"xs:dateTime","custom13":"xs:dateTime","custom14":"xs:dateTime","custom15":"xs:dateTime","custom16":1,"custom17":1,"custom18":1,"custom19":1,"custom20":1,"custom21":1.23,"custom22":1.23,"custom23":1.23,"custom24":1.23,"custom25":1.23}}'
package main
import (
"fmt"
apiLib "github.com/hornbill/goApiLib"
)
func main() {
hornbillAPI := apiLib.NewXmlmcInstance("yourinstanceid")
hornbillAPI.SetAPIKey("yourHornbillAPIKey")
hornbillAPI.SetJSONResponse(true)
hornbillAPI.SetParam("supplierContractId", "xs:string")
hornbillAPI.SetParam("name", "xs:string")
hornbillAPI.SetParam("description", "xs:string")
hornbillAPI.SetParam("type", "xs:string")
hornbillAPI.SetParam("startDate", "xs:dateTime")
hornbillAPI.SetParam("endDate", "xs:dateTime")
hornbillAPI.SetParam("renewalStartDate", "xs:dateTime")
hornbillAPI.SetParam("renewalEndDate", "xs:dateTime")
hornbillAPI.SetParam("currency", "xs:string")
hornbillAPI.SetParam("value", "xs:decimal")
hornbillAPI.SetParam("acquisitionMethod", "xs:string")
hornbillAPI.SetParam("cancellationNoticePeriod", "xs:string")
hornbillAPI.SetParam("costCentre", "xs:string")
hornbillAPI.SetParam("invoiceNumber", "xs:string")
hornbillAPI.SetParam("orderNumber", "xs:string")
hornbillAPI.SetParam("paymentType", "xs:string")
hornbillAPI.SetParam("status", "xs:string")
hornbillAPI.SetParam("subStatus", "xs:string")
hornbillAPI.SetParam("ownedBy", "xs:string")
hornbillAPI.SetParam("budgetOwner", "xs:string")
hornbillAPI.SetParam("businessOwner", "xs:string")
hornbillAPI.SetParam("workingTimeCalendar", "xs:string")
hornbillAPI.SetParam("targetMinutesPerEvent", "xs:integer")
hornbillAPI.SetParam("agreedComplianceTargetPercentage", "xs:decimal")
hornbillAPI.SetParam("contactEmailAddress", "xs:string")
hornbillAPI.SetParam("penaltyDescription", "xs:string")
hornbillAPI.SetParam("notes", "xs:string")
hornbillAPI.SetParam("custom0", "xs:string")
hornbillAPI.SetParam("custom1", "xs:string")
hornbillAPI.SetParam("custom2", "xs:string")
hornbillAPI.SetParam("custom3", "xs:string")
hornbillAPI.SetParam("custom4", "xs:string")
hornbillAPI.SetParam("custom5", "xs:string")
hornbillAPI.SetParam("custom6", "xs:string")
hornbillAPI.SetParam("custom7", "xs:string")
hornbillAPI.SetParam("custom8", "xs:string")
hornbillAPI.SetParam("custom9", "xs:string")
hornbillAPI.SetParam("custom10", "xs:string")
hornbillAPI.SetParam("custom11", "xs:dateTime")
hornbillAPI.SetParam("custom12", "xs:dateTime")
hornbillAPI.SetParam("custom13", "xs:dateTime")
hornbillAPI.SetParam("custom14", "xs:dateTime")
hornbillAPI.SetParam("custom15", "xs:dateTime")
hornbillAPI.SetParam("custom16", "xs:integer")
hornbillAPI.SetParam("custom17", "xs:integer")
hornbillAPI.SetParam("custom18", "xs:integer")
hornbillAPI.SetParam("custom19", "xs:integer")
hornbillAPI.SetParam("custom20", "xs:integer")
hornbillAPI.SetParam("custom21", "xs:decimal")
hornbillAPI.SetParam("custom22", "xs:decimal")
hornbillAPI.SetParam("custom23", "xs:decimal")
hornbillAPI.SetParam("custom24", "xs:decimal")
hornbillAPI.SetParam("custom25", "xs:decimal")
responseBody, apiError := hornbillAPI.Invoke("apps/com.hornbill.suppliermanager/SupplierContracts", "updateSupplierContract")
if apiError != nil {
fmt.Println(apiError)
return
}
fmt.Println(responseBody)
}
const endpoint = "https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts";
const payload = {
"@service": "apps/com.hornbill.suppliermanager/SupplierContracts",
"@method": "updateSupplierContract",
"params": {
"supplierContractId": "xs:string",
"name": "xs:string",
"description": "xs:string",
"type": "xs:string",
"startDate": "xs:dateTime",
"endDate": "xs:dateTime",
"renewalStartDate": "xs:dateTime",
"renewalEndDate": "xs:dateTime",
"currency": "xs:string",
"value": 1.23,
"acquisitionMethod": "xs:string",
"cancellationNoticePeriod": "xs:string",
"costCentre": "xs:string",
"invoiceNumber": "xs:string",
"orderNumber": "xs:string",
"paymentType": "xs:string",
"status": "xs:string",
"subStatus": "xs:string",
"ownedBy": "xs:string",
"budgetOwner": "xs:string",
"businessOwner": "xs:string",
"workingTimeCalendar": "xs:string",
"targetMinutesPerEvent": 1,
"agreedComplianceTargetPercentage": 1.23,
"contactEmailAddress": "xs:string",
"penaltyDescription": "xs:string",
"notes": "xs:string",
"custom0": "xs:string",
"custom1": "xs:string",
"custom2": "xs:string",
"custom3": "xs:string",
"custom4": "xs:string",
"custom5": "xs:string",
"custom6": "xs:string",
"custom7": "xs:string",
"custom8": "xs:string",
"custom9": "xs:string",
"custom10": "xs:string",
"custom11": "xs:dateTime",
"custom12": "xs:dateTime",
"custom13": "xs:dateTime",
"custom14": "xs:dateTime",
"custom15": "xs:dateTime",
"custom16": 1,
"custom17": 1,
"custom18": 1,
"custom19": 1,
"custom20": 1,
"custom21": 1.23,
"custom22": 1.23,
"custom23": 1.23,
"custom24": 1.23,
"custom25": 1.23
}
};
fetch(endpoint, {
method: 'POST',
headers: {
"Authorization": "ESP-APIKEY yourHornbillAPIKey"
},
body: JSON.stringify(payload)
}).then(res => res.json())
.then(res => console.log(res));
const axios = require('axios');
const endpoint = "https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts";
const payload = {
"@service": "apps/com.hornbill.suppliermanager/SupplierContracts",
"@method": "updateSupplierContract",
"params": {
"supplierContractId": "xs:string",
"name": "xs:string",
"description": "xs:string",
"type": "xs:string",
"startDate": "xs:dateTime",
"endDate": "xs:dateTime",
"renewalStartDate": "xs:dateTime",
"renewalEndDate": "xs:dateTime",
"currency": "xs:string",
"value": 1.23,
"acquisitionMethod": "xs:string",
"cancellationNoticePeriod": "xs:string",
"costCentre": "xs:string",
"invoiceNumber": "xs:string",
"orderNumber": "xs:string",
"paymentType": "xs:string",
"status": "xs:string",
"subStatus": "xs:string",
"ownedBy": "xs:string",
"budgetOwner": "xs:string",
"businessOwner": "xs:string",
"workingTimeCalendar": "xs:string",
"targetMinutesPerEvent": 1,
"agreedComplianceTargetPercentage": 1.23,
"contactEmailAddress": "xs:string",
"penaltyDescription": "xs:string",
"notes": "xs:string",
"custom0": "xs:string",
"custom1": "xs:string",
"custom2": "xs:string",
"custom3": "xs:string",
"custom4": "xs:string",
"custom5": "xs:string",
"custom6": "xs:string",
"custom7": "xs:string",
"custom8": "xs:string",
"custom9": "xs:string",
"custom10": "xs:string",
"custom11": "xs:dateTime",
"custom12": "xs:dateTime",
"custom13": "xs:dateTime",
"custom14": "xs:dateTime",
"custom15": "xs:dateTime",
"custom16": 1,
"custom17": 1,
"custom18": 1,
"custom19": 1,
"custom20": 1,
"custom21": 1.23,
"custom22": 1.23,
"custom23": 1.23,
"custom24": 1.23,
"custom25": 1.23
}
};
const axiosConfig = {
headers: {
"Authorization": "ESP-APIKEY yourHornbillAPIKey"
}
};
axios.post(endpoint, payload, axiosConfig)
.then((res) => {
console.log("RESPONSE RECEIVED: ", res);
})
.catch((err) => {
console.log("AXIOS ERROR: ", err);
})
$endpoint = "https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts";
$payload = (object) [
'@service' => 'apps/com.hornbill.suppliermanager/SupplierContracts',
'@method' => 'updateSupplierContract',
'params' => (object) [
'supplierContractId' => 'xs:string',
'name' => 'xs:string',
'description' => 'xs:string',
'type' => 'xs:string',
'startDate' => 'xs:dateTime',
'endDate' => 'xs:dateTime',
'renewalStartDate' => 'xs:dateTime',
'renewalEndDate' => 'xs:dateTime',
'currency' => 'xs:string',
'value' => 'xs:decimal',
'acquisitionMethod' => 'xs:string',
'cancellationNoticePeriod' => 'xs:string',
'costCentre' => 'xs:string',
'invoiceNumber' => 'xs:string',
'orderNumber' => 'xs:string',
'paymentType' => 'xs:string',
'status' => 'xs:string',
'subStatus' => 'xs:string',
'ownedBy' => 'xs:string',
'budgetOwner' => 'xs:string',
'businessOwner' => 'xs:string',
'workingTimeCalendar' => 'xs:string',
'targetMinutesPerEvent' => 'xs:integer',
'agreedComplianceTargetPercentage' => 'xs:decimal',
'contactEmailAddress' => 'xs:string',
'penaltyDescription' => 'xs:string',
'notes' => 'xs:string',
'custom0' => 'xs:string',
'custom1' => 'xs:string',
'custom2' => 'xs:string',
'custom3' => 'xs:string',
'custom4' => 'xs:string',
'custom5' => 'xs:string',
'custom6' => 'xs:string',
'custom7' => 'xs:string',
'custom8' => 'xs:string',
'custom9' => 'xs:string',
'custom10' => 'xs:string',
'custom11' => 'xs:dateTime',
'custom12' => 'xs:dateTime',
'custom13' => 'xs:dateTime',
'custom14' => 'xs:dateTime',
'custom15' => 'xs:dateTime',
'custom16' => 'xs:integer',
'custom17' => 'xs:integer',
'custom18' => 'xs:integer',
'custom19' => 'xs:integer',
'custom20' => 'xs:integer',
'custom21' => 'xs:decimal',
'custom22' => 'xs:decimal',
'custom23' => 'xs:decimal',
'custom24' => 'xs:decimal',
'custom25' => 'xs:decimal',
]
];
$headers = [
'Authorization: ESP-APIKEY yourHornbillAPIKey',
'Content-Type: application/json'
];
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $endpoint);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$resp = curl_exec($curl);
curl_close($curl);
echo $resp;
$Endpoint = "https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts"
$Body = @{
"@service" = "apps/com.hornbill.suppliermanager/SupplierContracts"
"@method" = "updateSupplierContract"
params = @{
supplierContractId = "xs:string"
name = "xs:string"
description = "xs:string"
type = "xs:string"
startDate = "xs:dateTime"
endDate = "xs:dateTime"
renewalStartDate = "xs:dateTime"
renewalEndDate = "xs:dateTime"
currency = "xs:string"
value = "xs:decimal"
acquisitionMethod = "xs:string"
cancellationNoticePeriod = "xs:string"
costCentre = "xs:string"
invoiceNumber = "xs:string"
orderNumber = "xs:string"
paymentType = "xs:string"
status = "xs:string"
subStatus = "xs:string"
ownedBy = "xs:string"
budgetOwner = "xs:string"
businessOwner = "xs:string"
workingTimeCalendar = "xs:string"
targetMinutesPerEvent = "xs:integer"
agreedComplianceTargetPercentage = "xs:decimal"
contactEmailAddress = "xs:string"
penaltyDescription = "xs:string"
notes = "xs:string"
custom0 = "xs:string"
custom1 = "xs:string"
custom2 = "xs:string"
custom3 = "xs:string"
custom4 = "xs:string"
custom5 = "xs:string"
custom6 = "xs:string"
custom7 = "xs:string"
custom8 = "xs:string"
custom9 = "xs:string"
custom10 = "xs:string"
custom11 = "xs:dateTime"
custom12 = "xs:dateTime"
custom13 = "xs:dateTime"
custom14 = "xs:dateTime"
custom15 = "xs:dateTime"
custom16 = "xs:integer"
custom17 = "xs:integer"
custom18 = "xs:integer"
custom19 = "xs:integer"
custom20 = "xs:integer"
custom21 = "xs:decimal"
custom22 = "xs:decimal"
custom23 = "xs:decimal"
custom24 = "xs:decimal"
custom25 = "xs:decimal"
}
}
$Header = @{
"Authorization" = "ESP-APIKEY yourHornbillAPIKey"
}
$Parameters = @{
Method = "POST"
Uri = $Endpoint
Headers = $Header
Body = ($Body | ConvertTo-Json)
ContentType = "application/json"
}
Invoke-RestMethod @Parameters
import requests
import json
endpoint = "https://api.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.suppliermanager/SupplierContracts"
headers = {
"Authorization": "ESP-APIKEY yourHornbillAPIKey"
}
payload={
"@service":"apps/com.hornbill.suppliermanager/SupplierContracts",
"@method":"updateSupplierContract",
"params":{
"supplierContractId":"xs:string",
"name":"xs:string",
"description":"xs:string",
"type":"xs:string",
"startDate":"xs:dateTime",
"endDate":"xs:dateTime",
"renewalStartDate":"xs:dateTime",
"renewalEndDate":"xs:dateTime",
"currency":"xs:string",
"value":"xs:decimal",
"acquisitionMethod":"xs:string",
"cancellationNoticePeriod":"xs:string",
"costCentre":"xs:string",
"invoiceNumber":"xs:string",
"orderNumber":"xs:string",
"paymentType":"xs:string",
"status":"xs:string",
"subStatus":"xs:string",
"ownedBy":"xs:string",
"budgetOwner":"xs:string",
"businessOwner":"xs:string",
"workingTimeCalendar":"xs:string",
"targetMinutesPerEvent":"xs:integer",
"agreedComplianceTargetPercentage":"xs:decimal",
"contactEmailAddress":"xs:string",
"penaltyDescription":"xs:string",
"notes":"xs:string",
"custom0":"xs:string",
"custom1":"xs:string",
"custom2":"xs:string",
"custom3":"xs:string",
"custom4":"xs:string",
"custom5":"xs:string",
"custom6":"xs:string",
"custom7":"xs:string",
"custom8":"xs:string",
"custom9":"xs:string",
"custom10":"xs:string",
"custom11":"xs:dateTime",
"custom12":"xs:dateTime",
"custom13":"xs:dateTime",
"custom14":"xs:dateTime",
"custom15":"xs:dateTime",
"custom16":"xs:integer",
"custom17":"xs:integer",
"custom18":"xs:integer",
"custom19":"xs:integer",
"custom20":"xs:integer",
"custom21":"xs:decimal",
"custom22":"xs:decimal",
"custom23":"xs:decimal",
"custom24":"xs:decimal",
"custom25":"xs:decimal",
},
}
response = requests.request("POST", endpoint, json=payload, headers=headers)
print(response.text)
- Version {{docApp.book.version}}
- Node {{docApp.node}} / {{docApp.build}}
In This Document