Read Company

When you call Company Service with GET method, you can find 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 company search values. Every company object property join as AND operator and every company object JOIN as OR operator.

Hints

You can sent two optional parameters:

  • limit Number of objects to return. Default is 50 maximum value is 200
  • offset The number from which to start for read. Default is 0
Name Value
REST-API METHOD Read Company
HTTP METHOD GET
RESPONSE TYPE JSON
URL https://api.crm.next4biz.com/company/
REQUEST HEAD Accept: application/json; Content-Type: application/json
ENDPOINT DEFINITION
GET
SAMPLE REQUEST BODY
{
	"tenant_slug": "acme",
	"channel": "79",
	"access_token": "[YOUR ACCESSTOKEN]",
	"company": [
		{
			"company_name": "Acme Entertainment",
			"custom_field_values": [
				{
					"id": 226,
					"value": "2"
				}
			]
		}
	]
}
SAMPLE RESPONSE BODY
{
	"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": null,
			"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."
			}
		}
	]
}