to get a personalized navigation.
to get a personalized navigation.
Hi,
one thing we don't figure out: We have an integration based on the old API access with codeflow. We are able to connect the user and the user has access to the company which should be integrated in the user interface. We added all roles in admin both on customer and company-level.
But in the GraphQL we don't get the new company up, just one which was connected before:
Here the GraphQL query:
query {
company {
items {
name}}}
and here the result:
{
"data": {
"company": {
"items": [
{
"name": "#Demo VBC Økonomibistand AS"
}
]
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000005f2da53668ff1373"
}
}
In VBNxt I also have access to the customer Soma 1 AS which has one active company - this company I don't get in the result above.
How do we get access to the company by the API?
Florian
Solved! Go to Solution.
Takk, da er det løst 🙂
The query to fetch available companies is the following:
query GetAvailableCompanies {
availableCompanies {
totalCount
items {
name
vismaNetCompanyId
}
}
}
Note that for the time being this only works in the user context (authorization code flow).
Hi Florian,
Please check the documentation, specifically the bottom part of this section: https://docs.business.visma.net/docs/schema/queries/companies
You need to provide a customer number, the documentation should take you all the way, query examples are included.
Copyright © 2022 Visma.com. All rights reserved.