HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

ItemPrice API not working

Pulled the get request from the documentation and ran on our test site and it's not returning the list of item Prices

const options = {method: 'GET', headers: {accept: 'application/json'}};

fetch('https://yourorgsite.com/api/ItemPrice', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

instead I get an error response
{ "$type": "Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts", "Errors": { "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.ValidationResultData, Asi.Contracts", "Message": "Criteria must contain at least one that tests ItemId for equality." } ] }, "Warnings": { "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts", "$values": \[] } }

I was just trying to get the JSON response to see what was wrong with my POST request JSON object as it's giving me 400 error.