Update Partner
Update Partner
PATCH
https://api.ocamba.com/v1/hood/partners/{id}
Updates a specific Partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Rate limits:
- Burst: 10/s
- Steady: 150/m
Path parameters
parametersRequest schema
bodyResponse schemas
•
204
No Content
›
400
application/json
›
500
application/json
curl -X PATCH \
"https://api.ocamba.com/v1/hood/partners/{id}" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '"{\n \"manager_ids\": [\n \"1000220\"\n ],\n \"name\": \"test \",\n \"description\": \"test description\",\n \"status\": \"inactive\",\n \"payment_terms\": {\n \"payment_frequency\": \"quarterly\",\n \"payment_method\": \"card\",\n \"net_terms\": \"net90\",\n \"currency_code\": \"eur\"\n },\n \"billing_address\": {\n \"street\": \"dddddd\",\n \"city\": \"test test\",\n \"post_code\": \"56-a\",\n \"country\": \"RS\"\n },\n \"contact\": {\n \"email\": \"fIS0C1guzHZ6jxidFyOXbFh47nYMzS3ZhUCvKCpwvfuY3s1G9ofAD8sJyjzdWG9J024HroFNBRDg7LNmHiycjBgeUAJ8S13Crgs@fafa.com\",\n \"mobile\": \"+785596522\",\n \"phone\": \"+1235165336\",\n \"sip\": \"5259oskZYi9sw8\",\n \"skype\": \"dfa223ghjk\",\n \"website\": \"fsf.com\"\n}"'const url = 'https://api.ocamba.com/v1/hood/partners/{id}';
const options = {
method: 'PATCH',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
"{\n \"manager_ids\": [\n \"1000220\"\n ],\n \"name\": \"test \",\n \"description\": \"test description\",\n \"status\": \"inactive\",\n \"payment_terms\": {\n \"payment_frequency\": \"quarterly\",\n \"payment_method\": \"card\",\n \"net_terms\": \"net90\",\n \"currency_code\": \"eur\"\n },\n \"billing_address\": {\n \"street\": \"dddddd\",\n \"city\": \"test test\",\n \"post_code\": \"56-a\",\n \"country\": \"RS\"\n },\n \"contact\": {\n \"email\": \"fIS0C1guzHZ6jxidFyOXbFh47nYMzS3ZhUCvKCpwvfuY3s1G9ofAD8sJyjzdWG9J024HroFNBRDg7LNmHiycjBgeUAJ8S13Crgs@fafa.com\",\n \"mobile\": \"+785596522\",\n \"phone\": \"+1235165336\",\n \"sip\": \"5259oskZYi9sw8\",\n \"skype\": \"dfa223ghjk\",\n \"website\": \"fsf.com\"\n}"
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/partners/{id}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
"[\n \"manager_ids\" => [\n \"1000220\"\n ],\n \"name\" => \"test \",\n \"description\" => \"test description\",\n \"status\" => \"inactive\",\n \"payment_terms\" => [\n \"payment_frequency\" => \"quarterly\",\n \"payment_method\" => \"card\",\n \"net_terms\" => \"net90\",\n \"currency_code\" => \"eur\"\n ],\n \"billing_address\" => [\n \"street\" => \"dddddd\",\n \"city\" => \"test test\",\n \"post_code\" => \"56-a\",\n \"country\" => \"RS\"\n ],\n \"contact\" => [\n \"email\" => \"fIS0C1guzHZ6jxidFyOXbFh47nYMzS3ZhUCvKCpwvfuY3s1G9ofAD8sJyjzdWG9J024HroFNBRDg7LNmHiycjBgeUAJ8S13Crgs@fafa.com\",\n \"mobile\" => \"+785596522\",\n \"phone\" => \"+1235165336\",\n \"sip\" => \"5259oskZYi9sw8\",\n \"skype\" => \"dfa223ghjk\",\n \"website\" => \"fsf.com\"\n]"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
204 No Content
400 Bad Request
{
"code": 400,
"title": "Bad request.",
"message": "The request body is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses
Note
At least one of the updatable fields should be sent via HTTP body in order to change the current state of the integration.
The billing_address and payment_terms are optional until you fill out at least one field. Once you do, all fields will become required.
Tip
If you don’t know the Partner ‘id’, list the Partners to find it.
Warning
Please note that updating the Partner status will also lead to updating the status of it’s related resources. So the Deals to which the Partner is attached will have the same status set as effective, as well as Campaigns effective status.