Company API

This API is used to add companies, update companies and get company lists as well as timelines and company changelogs in the Sales CRM module.

Get Company with Pagination

Method

GET

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies?start=0&count=2

Header

Authorization : Bearer [generatedToken]

Body

Status

200

Response

{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1596006305801, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1596006822243, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “name”: “[name]”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “userAccessId”: [ “[userrAccessId]” ] }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602646856583, “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “modifiedDate”: 1602646856583, “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “name”: “[name]”, “fax”: “[fax]”, “phone”: “[phone]”, “website”: “[website]”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “address”: “[address]” } ], “hasMore”: true, “nextIndex”: 2, “prevIndex”: 0, “totalResults”: 51 }

Get Company by Company Id

Method

GET

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies/[company_id]

Header

Authorization : Bearer [generatedToken] Company Id : [company_id]

Body

Status

200

Response

{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602969478323, “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “modifiedDate”: 1602969478323, “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “name”: “[name]”, “fax”: “[fax]”, “phone”: “[phone]”, “website”: “[website]”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “address”: “[address]” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }

Add Company

Method

POST

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies/add

Header

Authorization : Bearer [generatedToken]

Body

Body Example : { “name”: “Mira”, “address”: “Bogor”, “website”: “mira.co.id”, “phone”: “082123456789”, “fax”: “02134567”, “userAccess”: “[everyone, owner, owner group, group]” }

Note : If the selected user access is selectedGroup, then you must enter userAccessId.

Status

200

Response

{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603115138458, “createdBy”: “f1b380ced4477dd87e8d7ad842af7ae2”, “modifiedDate”: 1603115138458, “modifiedBy”: “f1b380ced4477dd87e8d7ad842af7ae2”, “name”: “Mira”, “fax”: “02134567”, “phone”: “082123456789”, “website”: “mira.co.id”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “address”: “Bogor” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }

Edit Company

Method

PUT

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies/edit

Header

Authorization : Bearer [generatedToken]

Body

Body Example : { “id” : “[id]”, “name”: “Mira Agustina”, “address”: “Cileungsi-Bogor”, “website”: “mira.id”, “phone”: “082123456789”, “fax”: “02134567”, “userAccess”: “[everyone, owner, group, selectedGroup]” }

Note : If you update user access to selectedGroup, then you must enter userAccessId.

Status

200

Response

{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603118135090, “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “modifiedDate”: 1603118135090, “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “name”: “Mira Agustina”, “fax”: “02134567”, “phone”: “082123456789”, “website”: “mira.id”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “address”: “Cileungsi-Bogor” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }

Get Company Timelines with Paginated

Method

GET

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies/timelines/[company_id]?start=0&count=2

Header

Authorization : Bearer [generatedToken] CompanyId : [company_id]

Body

Status

200

Response

{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603097773594, “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “modifiedDate”: 1603097773594, “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “companyId”: “[company_id]”, “action”: “add”, “actionType”: “sales-deal”, “payload”: “{\”id\”:\”[id]\”,\”label\”:\”Deal created : \”,\”name\”:\”[name]\”}” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602993610708, “createdBy”: “7b429f4a7a5309b438ed269f4111df35”, “modifiedDate”: 1602993610708, “modifiedBy”: “7b429f4a7a5309b438ed269f4111df35”, “companyId”: “[company_id]”, “action”: “add”, “actionType”: “sales-deal”, “payload”: “{\”id\”:\”[id]\”,\”label\”:\”Deal created : \”,\”name\”:\”[name]\”}” } ], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 2 }

Get Company Changelog with Paginated

Method

GET

Media Type

application/json

URL

http://[server]/dolphin/apiv1/graph/companies/changelog/[company_id]?start=0&count=2

Header

Authorization : Bearer [generatedToken] CompanyId : [company_id]

Body

Status

200

Response

{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner-id]”, “createdDate”: 1594375351495, “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “modifiedDate”: 1594375351495, “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “companyId”: “[company_id]”, “action”: “add”, “field”: “address”, “newValue”: “1”, “actionType”: “company” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1594375351471, “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “modifiedDate”: 1594375351471, “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “companyId”: “[company_id]”, “action”: “add”, “field”: “website”, “newValue”: “1”, “actionType”: “company” } ], “hasMore”: true, “nextIndex”: 2, “prevIndex”: 0, “totalResults”: 16 }

Last updated