to get a personalized navigation.
to get a personalized navigation.
Hi, I have just started using Business NXT and I have completed all the steps for Authentication and I am able to get a token.
When I tried to run a query I get the following error : : Unknown company.
The companynumber I have connected the user to is 1
this is the query I am running:
query
{
useCompany(no: 1)
{
queryResult : orderDocument
(
sortOrder: {orderNo:ASC _thenBy: {orgUnit3:DESC}}
)
{
totalCount
items
{
orderNo
orgUnit3
customerNo
deliveryAddress1
deliveryAddress2
deliveryAddress3
deliveryAddress4
}
}
}
}
What am I doing wrong ?
Best regards
Andreas
Solved! Go to Solution.
The companyNo should be a 7 digit number which relates to the companyID from the Visma Connect plattform and not the internal Visma Business CompanyNumber. The advantage is that you can write API-integrations across different customers by using the Visma-unique companyNumbers.
Ok, I so it is the VismaNet company no I should use ?
As described in the documentation https://docs.business.visma.net/docs/schema/queries/query
Accessing company tables requires specifying a company number. Similarly, accessing a system table requires specifying a customer number. These are the Visma.net identifiers for the company and the customer and can be either found in the Visma.net portal or can be retrieved with a query
These may be handy:
{
availableCustomers {
totalCount
items{
vismaNetCustomerId
name
}
}
}
{
availableCompanies (customerNo: xxxxxx) {
items{
vismaNetCompanyId
name
}
}
}
I doubt that 1 is the correct company number.
Please have a look at https://docs.business.visma.net/docs/schema/queries/companies
Copyright © 2022 Visma.com. All rights reserved.