Developer Forum [ All Topics | New Topic ]

Thread: Error 4001 when querying single diamonds and list diamonds

Hi,

I posted the same issue in the support forum but maybe i will have more success here.

I am making a custom integration for rapnet instant inventory.

It is based on PHP and uses JSON.

I have set up a feed in Rapnet instant inventory but when i'm only getting the Error 4001: No Diamond was found error when querying the API.

The same is happening when i test the Instant inventory template preview widget in the Rapnet backend. When i run a search with no criteria in the preview widget it will show a popup with the same error message.
This gives me the idea the problem is with the feed and not the custom integration but i have no way to confirm this.

Just for complete information. These are the JSON requests i'm sending to the API:

Get all diamonds:
{
"request": {
"header": {
"username": "********",
"password": "********"
},
"body": {
"page_number": 1,
"page_size": 50
}
}
}
Get single diamond:
{
"request": {
"header": {
"username": "********",
"password": "********"
},
"body": {
"diamond_id": "15003824001"
}
}
}

The response in both cases is:

{
"response": {
"header": {
"error_code": 4001,
"error_message": "No Diamond was found"
},
"body": {
}
}
}

I could really use some help on this.



>> add a comment
Tijs van Raaij
05/30/2018 10:45


2 Replies:

Tijs van Raaij,
Hello and welcome to Instant Inventory.
Thank you for contacting the TechNet Developer forum and I plan to update the support forum question also.

1) The error is correct (No Diamond was found ).  The RapNet Instant Inventory feeds selected no diamonds.  Your diamond feeds ranges, for Cut, Clarity and Symmetry, are reversed (Incorrect example: from 'Poor' to 'Excellent').
Please choose the higher choice for 'From' and the lower (or same) choice for 'To' (Correct example:  from 'Excellent' to 'Poor'). 

2) Also, to get more diamonds, you may want to select more suppliers.
After changing Instant Inventory, you may have to wait up to four hours for the changes to take effect, as the diamonds are refreshed every four hours.

3) I tested the JASON API code and it looks good.  When you have diamonds selected, the code should then give you results.

For any more questions - you can post here, contact your customer service rep or email to me at tech@diamonds.net.  
Thank you,


>> add a comment
Tech customer support -Zalman
5/31/2018 5:38:00 AM
Dear Zalman,
Thank you for your reply. Its ok if you update only this topic and delete my topic in the other forum as they are pretty much identitcal.
I have changed the Cut/Clarity/Symmetry filters to go from high to low as you suggested. This seems very counter intuitive to me though. Range filters normally always go from low to high as far as i know.
I will wait for the feed to refresh and test the feed again then. As long as i have at least 1 result i can work with that (more would be better of course, but no results will not get me further at this time).
Kind regards,
Tijs


>> add a comment
Tijs van Raaij
5/31/2018 10:35:00 PM