Companies
Retrieve companies from the Basecone office where you're user has rights to.
GET companies?externalId=:id&fields=modules
Request properties
Property | Type | Description | Optional |
---|---|---|---|
externalId | Guid | External company unique Identifier. | Yes |
fields | Array | Optional fields to retrieve. | Yes |
Companies collection properties
Property | Type | Description |
---|---|---|
Companies | Array | A list of companies belonging to the office where you have access to. |
_links | Array | A list of useful preconfigured uri's a client app can use to navigate this resource collection. |
_metadata | Complex object | Optional object with additional information concerning the current returned result. |
For details on company properties see company details.
For details on collections see collection details.
Super user role response
Company collection response will be different by the user role. For the Super user
, the property hasAccess will be true if it has company access or false otherwise.
For other user roles (Accountant
, SME Accountant
, Authorisation administrator
, Authoriser
, Client user
, Restricted client user
) only the companies with hasAccess = true are retrieved on the response.
Example response:
{ "companies": [ { "companyId": "10bcbc8b-61a3-4124-b4f2-db4f797c0f82", "accountingSystem": { "type": "Twinfield", "externalId": "BASEC-15", "companyCode": "BASEC-15" }, "name": "Basecone 2015", "email": "baseconetest.basec-15@test.com", "hasAccess": "false", "totalDocumentsToAuthorize": 0, "extraData": [ { "label": "Reference", "value": "123" } ], "modules": [ { "code": "Agro", "status": "Enabled" } ], "_links": [ { "rel": "self", "href": "https://api.basecone.com/v1/companies/10bcbc8b-61a3-4124-b4f2-db4f797c0f82" }, { "rel": "documents", "href": "https://api.basecone.com/v1/documents?companyid=10bcbc8b-61a3-4124-b4f2-db4f797c0f82" } ] }, { "companyId": "f205cb8e-9f74-42b1-97a2-2cf4c4eb780d", "accountingSystem": { "type": "Twinfield", "externalId": "BASEC-B15", "companyCode": "BASEC-B15" }, "name": "Basecone B - 2015", "email": "baseconetest.basec-b15@test.com", "hasAccess": "true", "totalDocumentsToAuthorize": 3, "modules": [ { "code": "Agro", "status": "NotSupported" } ], "_links": [ { "rel": "self", "href": "https://api.basecone.com/v1/companies/f205cb8e-9f74-42b1-97a2-2cf4c4eb780d" }, { "rel": "documents", "href": "https://api.basecone.com/v1/documents?companyid=f205cb8e-9f74-42b1-97a2-2cf4c4eb780d" } ] } ], "_links": [ { "rel": "self", "href": "https://api.basecone.com/v1/companies?limit=10&offset=0" } ], "_metadata": { "total": 14, "count": 10 } }