Zero experience advice required

155 views
Skip to first unread message

TMS

unread,
Nov 19, 2019, 6:12:28 PM11/19/19
to JSON-RPC
Hi there,

A supplier has given my company access to an API which uses JSON-RPC 2.0. We have been given the access so we can obtain details such as product names and quantities available.

Myself and my colleagues are not experienced at all in programming and API's so my question is could someone advise about how I would go about learning how to use the API.

We have done some google searches today but we cannot find guidance on what and where to learn.

I understand this may be a steep learning curve but if anyone could suggest courses, programs to use or tutorials available that would help a beginner learn how to use this API we would be extremely grateful.

We have been supplied an end point url which when we visit comes up with the following error message in chrome.

{"error":{"message":"Procedure name not given","code":-32601}}

I look forward to hearing back from anyone and apologise in advance for being an absolute beginner within this forum, we literally do not know where to turn for help.

Noob

Pascal Charbonneau

unread,
Nov 20, 2019, 5:20:28 AM11/20/19
to json...@googlegroups.com
You can find the specification about JSON-RPC 2.0 at www.jsonrpc.org that will give you a bit of information about how it works but basically RPC (remote procedure call) is about sending a request from your client (program) to their server to execute a bit of code on their side that will return you a result. The command and parameters are sent via a pre-determined message format that varies with each API so the only way to know what the message and its parameters need to be is by asking the people who built it what command and parameter are expected. I would assume something like "GetProduct" with its unique "Id" but really it is their choice.
The response you are getting is basically telling you that the message sent is not in a proper format.

Depending on the programming language you use, you can search to see if there are pre-built libraries that will make it easier to communicate with that API.
Things like jsonrpc2-elixir for the Elixir language, JSON-RPC.NET in C#, etc.

Without knowing what language you are using, it is hard to help but I hope this helps get you started.
Let me know if I can be of more assistance

Pascal Charbonneau


--
You received this message because you are subscribed to the Google Groups "JSON-RPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-rpc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/json-rpc/39a65874-c935-43fc-ab63-7108bbf012b5%40googlegroups.com.

TMS

unread,
Nov 20, 2019, 6:05:38 AM11/20/19
to JSON-RPC
Hi Pascal,

Many thanks for your response, I really appreciate it.

I have a colleague who has started learning Python so if that could be used with this API that would be great. If not could you suggest what you believe would be the easiest to language to learn for this process.

The method we have been provided is "item.search" and the parameters are as follows:

account - our account number
auth - authority token
lang - language
keyword - such as manufacturer of tire
stockConditions - in stock, Backorder

We currently use XML to update our product information within our store but we have been told to make use of the API rather than the supplier send us an updated XML document every morning and evening.

Thank you for your help.

Kind Regards,

TMS

Pascal Charbonneau

unread,
Nov 20, 2019, 6:32:09 AM11/20/19
to json...@googlegroups.com
The programming language really does not matter when talking to a JSON-RPC endpoint so use whatever knowledge you already have invested in.
 I have not done any python in the last 10 years or so but it has become increasingly popular lately so I assume that would do what you need. 
I cannot vouch for it but there is at least this jsonrpcclient library on the PyPi repository that might help. 

It really also depends on your needs. You mentionned they were sending you an XML file that you were using already. You probably have some script reading it I assume for integration.
You could probably just modify that script to use the JSON-RPC api instead assuming they also have and endpoint that can get you a list of all products.
 Are you trying to integrate it with your own inventory system? An e-commerce? etc 

If you really just need to do an ad-hoc manual query based on random keywords, then you can even just make yourself a silly little local webpage with a few fields and  some javascript that will query it for you :)

For testing the API, you can use something like json-rpc-2.0-shell to query the API directly from a  simple command shell.

Have fun! 
Feel free to concact me directly as well.

Pascal Charbonneau

--
You received this message because you are subscribed to the Google Groups "JSON-RPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-rpc+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages