Supplier Portal REST Interface
General Remarks
Note
Please note that only few REST resources are available in the current version. The RemoteAPI can be used for session-based communication with the PIM Supplier Portal server and exposes most of the system's functionality.
The PIM Supplier Portal REST interface can be accessed using the url
/rest
When running the server locally, the full url looks like this with the default settings:
localhost:9090/hsx/rest/status
Authentication and Localization
Authentication is done use http Basic Authentication using username and password. As credentials are send plain text, using a secured connection over SSL is highly recommended for production usage.
Example using the credentials portal/portal:
GET /hsx/rest/status HTTP/
1.1
Authorization: Basic cG9ydGFsOnBvcnRhbA==
Accept-Language: en-US
With PIM8, a token based authentication is possible, too. A token can be generated over the authToken interface (POST). The returned token needs to be send base64 encoded. Example:
GET /hsx/rest/status HTTP/
1.1
Authorization: Token NzY4MzA2MEY4QUY3NDNFRUFBODc0QUZDRTNFODg0MTEwMDBGQjM4NEU1RDA4QjY1MzA5NDFDMDBGQjAyMTg5Rjk4QkI5NUI0MEE2NkMyRDU2NzI1QjAxRjM1OTMwMkMxRDRBNzAwNUZDOERBNkU1NUM1MkFEOTE5NUY4NkFFNkY=
Accept-Language: en-US
In case of success http 200 is returned, in case of failure http 401.
Authentication can be done both for portal and supplier users. For successful authentication, the following conditions must be met:
Credentials must be valid.
Supplier user must exist in Supplier Portal. Supplier organization must be existing in PIM Application Server, too.
Portal users must exist in PIM Application server and state active must be set.
Supplier user state must be either active or registration_pending.
The requested locale (Accept-Language) must be covered by the PIM license.
REST API Resources
Status & SSO
Resource |
Description |
Returns system status. Can be used to test authentication, too. |
|
Generates a SSO token that can be used for login. |
Feeds
Feeds represent a chunk of messages with a feature message which follows multiple comments. With the REST API your able to send a single Feed with a feature message with or without an attachment.
Resource |
Description |
Creates a new feed on the timeline. |
Invitation
With the invitation related REST Interfaces it is possible to invite a suppliers which are not already active on the Heiler Supplier Exchange Portal.
Resource |
Description |
Returns a list of all supplier which are invitable. |
|
Get invitable supplier by its id. |
|
Invite a (invitable) supplier to the PIM Supplier Portal. |