When you call Company Service with PUT method, you can update a company on next4biz CRM.
Your request body must be contain 4 properties.
tenant_slug This is your subdomain on selphiu URL. For example: if your selphiu domain is “acme.selpihu.com” then your tenant_slug is “acme”access_token next4biz CRM provide an access_token via access_token service. Every access_token expires after 15 minutes. Best Practice, you request a new access_token for each service request.channel This is bussines channel id. If you don’t know your bussiness_channels and there’s id numbers. You can learn via bussiness_channel service.company This is an array includes objects as company property is an object contain you want to update company values. You must set id property. But others are arbitrary. You can sent 500 company each request| Name | Value |
|---|---|
| REST-API METHOD | Update Company |
| HTTP METHOD | PUT |
| RESPONSE TYPE | JSON |
| URL | https://api.crm.next4biz.com/company/ |
| REQUEST HEAD | Accept: application/json; Content-Type: application/json |
{
"tenant_slug": "acme",
"channel": "79",
"access_token": "[YOUR ACCESSTOKEN]",
"company": [
{
"id": "41243",
"company_name": "Acme Entertainment",
"custom_field_values": [
{
"id": 226,
"value": "2,3,4"
},
{
"id": 228,
"value": "consectetur adipiscing elit."
}
]
}
]
}
{
"code": 200,
"status": "Success",
"result": [
{
"company_id": "41243",
"company_name": "Acme Entertainment",
"master_company_id": null,
"unique_id": null,
"resource": "LinkedIn",
"create_owner": {
"user_id": 272,
"user_name": "scoobe.doo",
"email": "[email protected]",
"created_at": "2017-09-20 11:53:41",
"updated_at": "2017-09-20 11:53:41",
"lang": "tr",
"profile_picture": null
},
"last_update_owner": {
"user_id": 272,
"user_name": "scoobe.doo",
"email": "[email protected]",
"created_at": "2017-09-20 11:53:41",
"updated_at": "2017-09-20 11:53:41",
"lang": "tr",
"profile_picture": null
},
"created_at": "2017-09-07 10:39:13",
"update_at": "2017-09-07 10:43:22",
"vertical": null,
"default_phone": {
"company_phone_id": "7729",
"company_id": "41243",
"created_at": null,
"phone": "05325553322",
"createdat": "2017-09-07 10:39:13"
},
"default_address": {
"companyaddressid": "39863",
"address": "elm sokağı no:16",
"country": {
"country_id": 225,
"country_name": "Turkey",
"country_code": "TR"
},
"district": {
"district_id": "158",
"district": "Mengen",
"city_id": 5030,
"country_id": 225
},
"city": {
"city_id": 5030,
"city_name": "Bolu",
"country_id": 225
},
"companyid": "41243"
},
"default_domain": {
"company_domain_id": "30063",
"company_id": "41243",
"created_at": "2017-09-07 10:39:13",
"domain": "acme-company.com"
},
"default_email_format": {
"company_email_format_id": "32006",
"company_id": "41243",
"email_format": "{name}.{surname}"
},
"custom_data": {
"cf_222": "1504704612000",
"cf_224": "1504704612000",
"cf_225": "50",
"cf_226": [
"2",
"3",
"4"
],
"cf_227": "1",
"cf_228": "consectetur adipiscing elit."
}
}
]
}