WebAPI Sample Integrations¶
Eight sample integrations ship with IMan: a query and an order post for each of Sage 200, Sage 300 and Sage X3, a file download and a redirect. The endpoints, web users and property set they need are set up with them.
A GET request, parameterised by the route, that queries the Sage database for a customer's orders and returns them as JSON. The customer is the web user's own, from its property value; the location and the start date come from the request.
A POST request carrying an order as JSON, which the integration parses and posts into Sage through the connector, returning what was created.
A GET whose route names a document, answered with the file itself as a download. Needs no ERP.
A GET whose route names an order, answered with a redirect to the carrier's tracking page. Needs no ERP.
Before you start¶
Have a REST client such as Postman ready, and read the anatomy of an HTTP request & response.
Two pages explain what the samples take for granted:
Integration Design¶
The samples are that page's sequence, applied.
User Property & Request Relationship¶
The six Sage endpoints require authentication, and each of their samples reads a property value from the web user that called it. The two others allow anonymous requests.
What ships¶
The integrations are prefixed WEBAPI; typing that into the integration
list's filter box shows the eight together.
| Integration | Endpoint | Method and route | Web user |
|---|---|---|---|
WEBAPIS200GET |
SAMS200GET |
GET sage200orders/{location}?startDate={startDate} |
SAGE200 |
WEBAPIS200POST |
SAMS200POST |
POST sage200order |
SAGE200 |
WEBAPIS300GET |
SAMS300GET |
GET sage300orders/{location}?startDate={startDate} |
SAGE300 |
WEBAPIS300POST |
SAMS300POST |
POST sage300order |
SAGE300 |
WEBAPIX3GET |
SAMX3GET |
GET sagex3orders/{location}?startDate={startDate} |
SAGEX3 |
WEBAPIX3POST |
SAMX3POST |
POST sagex3order |
SAGEX3 |
WEBAPIDOCGET |
DOCGET |
GET documents/{id} |
anonymous |
WEBAPITRACK |
TRACKGET |
GET orders/{orderNo}/tracking |
anonymous |
The three web users authenticate with Basic authentication, and each is
assigned to its own two endpoints. The six Sage endpoints share the property set
Accounting ERP Request Properties, whose three properties, Sage200CustID,
Sage300CustID and SageX3CustID, hold each user's customer account in the
matching demo company.
| Web user | Username | Password | User Token |
|---|---|---|---|
SAGE200 |
sage200 |
sage200-321 |
BA5F01A5-819F-40AD-89EC-3910184D251E |
SAGE300 |
sage300 |
sage300-789 |
776094C1-1DB4-4CD5-A6DB-449544550870 |
SAGEX3 |
sageX3 |
sagex3-456 |
C43F55FA-76FB-4741-B093-D18145534DE2 |
The samples are set up against the Sage demo companies. Point the Database Reader and the connector at your own before running one against live data.
