Order APIs

Endpoint

This section lists the HTTP verb and full path to the endpoint. The basic structure of a REST call is

<HTTP verb> http://<host>/rest/<scope>/<endpoint>

where:

Element Description
HTTP verb One of GET, POST, PUT, or DELETE
host The hostname or IP address (and optionally, port) of the RCE installation.
scope Specifies which store the call affects. In this tutorial, this value is default.
endpoint The full URI (Uniform Resource Identifier) to the endpoint. These values
always start with /V1. For example, /V1/orders/4.

HTTP headers
This section indicates which key/value pairs you must specify in the HTTP headers. All calls require one or more HTTP headers.

Payload
This section lists the information that is sent to the RCE. All payload samples are valid and can be copied and pasted into your calls, but you might need to change the id values that the RCE returns.

Response
This section lists the information that the RCE sends to the REST client. These values are often referenced in other steps in the tutorial. The values RCE returns might be different than the values listed in the examples provided in this tutorial.

 

Get the Admin Authorization Token

REST calls to the RCE require an authorization token. The token allows the RCE to verify that the caller is authorized to access a system resource. To get a token, you must specify the user’s username and password in the payload.
By default, an admin token is valid for 4 hours.

Endpoint

POST https://<host>/rest/default/V1/integration/admin/token

Headers

Content-Type application/json

Payload

{"username": "admin","password": "123123q"}

Response

The RCE returns the admin’s access token.

5r8cvmpr11j6gmau8990rcj2qk7unh8i

This token must be specified in the authorization header of every call that requires admin permissions.

Examples

Rezolve maintains Swagger documents which describe the various API methods that can be used to get Order information. The documents can be found here:

https://rezolve.com/rceapidocsdev/index.html

Below are some specific Order API call examples: