When you call Company Service with POST method, you can create 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 your new company values. You must set company_name properties. But others are arbitrary. You can sent 500 company each requestdefault_email_format_index is arbitary field and default is 0default_domain_index is arbitary field and default is 0default_website_index is arbitary field and default is 0default_phone_index is arbitary field and default is 0default_address_index is arbitary field and default is 0custom_field_values 224 id numbered custom field type is date, 222 id numbered custom field type is datetime. The both custom field values are time stamp as miliseconds.custom_field_values 227 id numbered custom field type is list and value is id number of this custom field values.custom_field_values 226 id numbered custom field type is multiple list and value is joined with “,” id numbers from this custom field values.custom_field_values 225 id numbered custom field type is number.custom_field_values 228 id numbered custom field type is text.| Name | Value |
|---|---|
| REST-API METHOD | Create Company |
| HTTP METHOD | POST |
| 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": "",
"company": [
{
"company_name": "Acme Company",
"resource": "LinkedIn",
"master_company_id": null,
"vertical": {
"vertical_id": "232"
},
"email_formats": [
"{name}.{surname}",
"{name}",
"{n}{surname}"
],
"default_email_format_index": 0,
"domains": [
"acme-company.com"
],
"default_domain_index": 0,
"websites": [
"http://www.acme-company.com"
],
"default_website_index": 0,
"phones": [
"05325553322"
],
"default_phone_index": 0,
"addresses": [
{
"address": "elm sokağı no:16",
"city": "5030",
"district": "158",
"country": "225"
}
],
"default_address_index": 0,
"custom_field_values": [
{
"id": 224,
"value": "1504704612000"
},
{
"id": 222,
"value": "1504704612000"
},
{
"id": 227,
"value": "1"
},
{
"id": 226,
"value": "1,2,3"
},
{
"id": 225,
"value": "50"
},
{
"id": 228,
"value": "Lorem ipsum dolor sit amet"
}
]
}
]
}
{
"code": 200,
"status": "Success",
"result": [
{
"company_id": 41243,
"company_name": "Acme Company",
"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:39:13",
"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_224": "1504704612000",
"cf_222": "1504704612000",
"cf_227": "1",
"cf_226": [
"1",
"2",
"3"
],
"cf_225": "50",
"cf_228": "Lorem ipsum dolor sit amet"
}
}
]
}