- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
When getting list of products from Inventory
https://integration.visma.net/API/controller/api/v1/Inventory?expandAttachment=true&lastModifiedDate... 00:00:01&lastModifiedDateTimeCondition=%3E
Attachment are not returned, although the expandAttachement parameter is set:
We only getting attachment when running get on one and one product.
How can we get a list of products including all attachements?
brgds Steinar
Hello,
this has been planned to be fixed in Visma.net Financials API updates for version 8.66.0 (September 2021)
Release plan may vary, therefore please subscribe & follow the thread and the "News" section.
Thanks.
Hello,
- "Attachments[] not returned in GET Inventory Endpoint response when using "Attributes" filter"
This has been confirmed as a bug, we'll keep the thread updated accordingly once we receive further details. Thank you for your understanding.
Hello,
we're able to receive the attachments in the GET All Inventory query while using "Attributes" filtering.
Therefore, we need more information to be able to identify the issue.
- What is your Attribute's Control type defined for "WEBVAREB2C" in the Financials UI ?
- What "Attributes" values has been assigned to those inventories ?
- When you set the Attributes Filter, are the only some inventories missing the attachment info, or all of them ?
Attributes screen can be found at "ScreenId=CS205000"
Hi
All Products are missing Attachments - its missing completely from the returned JSON, not even an empty array.
This is the attribute
{
"id": "WEBVAREB2C",
"value": "1"
}
This is the definition
{
"attributeID": "WEBVAREB2C",
"description": "Webvare B2C",
"controlType": "Checkbox",
"internal": false,
"details": [],
"metadata": {
"totalCount": 25,
"maxPageSize": 1000
}
}
One note
This
https://integration.visma.net/API/controller/api/v1/Inventory?lastModifiedDateTime=2021-08-31 00:00:01&lastModifiedDateTimeCondition=%3E
And this
https://integration.visma.net/API/controller/api/v1/Inventory?expandAttachment=true&lastModifiedDateTime=2021-08-31 00:00:01&lastModifiedDateTimeCondition=%3E
Both returns attachments. Do the expandAttachment parameter have any function?
Hello,
"expandAttachments" is set "True" byDefault in the GET request. So query will be expanding the attachment array unless "expandAttachments" set false.
We've defined the same type of Attributes and retried our tests, we still can retrieve the uploaded attachment details.
https://integration.visma.net/API/controller/api/v1/inventory?
attributes=%7B%22WEBVAREB2C%22%3A1%7D&
expandAttachment=true&
lastModifiedDateTime=2021-09-10T11:14:52.817&
lastModifiedDateTimeCondition=%3E
- Have you tried uploading another attachment and checking the results ?
- Could you also try the same query with different attributes filtering for another inventories those are matching with ?
- It's also worth checking if the query results are the same when you try the request, for instance in Swagger / Postman etc.
Thanks.
Hi
1. Yes. A lot of the products have attachments. The attachment property is not returned at all.
2. Tried with https://integration.visma.net/API/controller/api/v1/Inventory?lastModifiedDateTime=2021-08-31 00:00:01&lastModifiedDateTimeCondition=%3E&attributes=%7B%22HORECA%22%3A%22yes%22%7D
Same result. No attachment property is returned
3. I'm testing in Insomnia.
Hello Andreas,
in this case, we need to restore the Company DB so that we can investigate this thoroughly. Further instructions to follow have been sent via the email.
Do you have information on since when this has started to happen ?
Hi Steinar,
We're not able to reproduce this in our company, when running the exact same query you have written in your post we get attachments returned:
Could you please doublecheck that the items have files attached to them?
From a list of products
...
"purchaseUnit": "STK",
"stockItem": true,
"attributes": [
{
..
same product fetched directly
"purchaseUnit": "STK",
"stockItem": true,
"accountInformation": {
...
},
"costPriceStatistics": {
...
},
"attachments": [
{
"name": "xxx.jpg",
"id": "a05fd2de-41eb-49f9-b107-14e87b0f1e77",
"revision": 1
}
],
"attributes": [
{
...
Edit:
Attachments are shown when not using
&attributes=%7B%22WEBVAREB2C%22%3A1%7D
When using attributes parameter, the attachments are not returned
Hi,
Please send the full URI you are querying.
So the issue in this case is that attachments are not returned, even though "expandAttachments" is set to true and the inventory list is filtered on attributes?
Full URL not returning attachments
https://integration.visma.net/API/controller/api/v1/Inventory?expandAttachment=true&lastModifiedDateTime=2021-08-31 00:00:01&lastModifiedDateTimeCondition=%3E&attributes=%7B%22WEBVAREB2C%22%3A1%7D
Without the attributes-parameter, attachments are returned
https://integration.visma.net/API/controller/api/v1/Inventory?expandAttachment=true&lastModifiedDateTime=2021-08-31 00:00:01&lastModifiedDateTimeCondition=%3E
We'll have a look at this, thank you.
