See Find Your URL for information on finding the correct URL to use for your ShipStream instance.
Request Format
All requests must be POST requests with the request parameters given as a JSON-encoded string in the POST body.string
required
The JSONRPC protocol version number. Must be “2.0”.
string
required
A unique identifier for the request that will be included in the response.
string
required
The remote procedure to call. This should always be either
login or call.array
required
An array of request parameters specific to the remote procedure being called (see below for details).
Response Format
The response will be a JSON-encoded string with the following properties:string
The JSONRPC protocol version number (“2.0”).
string
The unique identifier that matches the id given in the request.
object
If there is an error, this will be an object with keys
code and message. See “Error Codes” for a list
of general error codes.any
If an error did not occur this will contain the appropriate response data, otherwise this will be empty.
Error Codes
The error codes are easier to read if you first multiply by -1 and then subtract 32000. From this point forward, all error
codes mentioned will have this formula already applied to them, but due to the requirement of hte JSONRPC protocol, they
will be reported via the API without the formula applied.
Calling Methods
call(session_id, method, arguments)
The ‘call’ method requires proper authentication and is used to call all other API endpoints. These endpoints are detailed in the additional pages in the left sidebar.
Parameters
string
required
The session ID obtained from calling
login() or null if using HTTP Basic Auth. See Authentication.string
required
The API endpoint to call. This always takes the form of
{resource}.{action}. E.g. order.infoarray
The arguments to the API endpoint. If there are no additional arguments, this parameter may be omitted.