Getting Started with REST
The following information must be obtained prior to implementation:
Development platform installation is required prior to integration.
Smart Event Manager supports user based authentication using HTTP Basic Authentication. The encoded representation of the username and password is used in the header section.
- For example, using the Base64 encoding, the following user name password combination of:
- TL-User@gmail.com:TL-Password
- Produces the encoded value of:
- VEwtVXNlckBnbWFpbC5jb206VEwtUGFzc3dvcmQK
- Using the above user name and password, include the following in the Smart Event Manager header of the correlating message:
- Content-Type = application/json
- Authorization = VEwtVXNlckBnbWFpbC5jb206VEwtUGFzc3dvcmQK
These activities may or may not have compliance implications. For example, a Smart Event Manager message that reports the shipment of product to an Article 23 customer in an EU FMD country may result in the NMVS compliance application communicating to the appropriate NMVS to report the activity. The TraceLink NMVS Compliance application manages a set of workflows that determine when the Smart Event Manager transaction needs to communicate with the appropriate NMVS. The table below indicates the Smart Event Manager events and associated data that correlate to specific NMVS transactions:
HTTP Response Status Codes
Smart Event Manager presents standard response codes to indicate whether or not a specific HTTP request was successful. Response status codes may include, but are not limited to, the following:
Successful response
| 200 | OK. The request was successful. For GET, this means that the resource has been fetched. |
Redirect message
| 307 | Temporary Redirect. The client must get the requested resource at another URI with the same HTTP method that was used in the prior request. |
Client error status codes
| 400 | Bad Request. The server could not understand the request due to invalid syntax. |
| 401 | Unauthorized. The client is unauthenticated, not allowed access, and should re-request credentials. |
| 403 | Forbidden. The request is valid and the client is authenticated, but the client is not allowed access rights to the content for any reason. |
| 404 | Not Found. The server cannot find the requested item. This can also mean that the endpoint is valid but the resource does not exist. |
Server error status codes
| 500 | Internal Server Error. The server has encountered an unknown error. |
| 502 | Bad Gateway. The server is working as a gateway to handle the request and received an invalid response. |
| 503 | Service Unavailable. The server is not ready to handle the request. |
| 504 | Gateway Timeout. The server is acting as a gateway and cannot get a response in time. |