This article describes the REST http APIs available to support the order process. It gives an overview of existing providers, and log tracing of API calls.
REST Http providers require add on module for integration.
API and provider overview
...
The follwing APIs exist to support the order process.
API | In params | Response | Provider name |
---|---|---|---|
GetPrice | Authentication information A list of part numbers | Price and currency for each part. NLA code for each part. Replacement information for each part. Result codes (message and error on each part) | <PriceProvider> |
GetAvailability | Authentication information A list of part numbers | List of availabilities for each part (if several warehouses) Result codes (message and error on each part) | <AvailabilityProvider> |
GetAddresses | Authentication information | List of addresses List of order types Temporary address permission (optional) Result code (message and error on each address) | <AddressProvider> |
AddToOrderCart | Authentication information A list of part numbers | Order line results Result codes | <AddToOrderCartProvider> |
PlaceOrder / ValidateOrder | Authentication information Order (header and order lines) | Order (updated if needed with NLA and replacements) Result codes (message on order, error on order, message on order line, error on order lines) | <PlaceOrderProvider> <ValidateOrderProvider> (version 5.0) |
GetOrderTypes | Authentication information | List of Order Types | <PlaceOrderProvider> <ValidateOrderProvider> (version 5.0) |
GetDeliveryOptions | Authentication information Order (header and order lines) | List of Delivery Options valid for the order | <PlaceOrderProvider> <ValidateOrderProvider> (version 5.0) |
GetOrders | Authentication information | Orders, one line per order Result codes | <OrderHistoryProvider> |
GetOrderDetails | Authentication information Order number | Order header, order lines, shipment lines Result codes | <OrderDetailProvider> |
Signin | ReturnUrl | Success or failure status | <AutenticateProvider> |
Authenticate | SesssionId | User record; name, id, permissions etc. | <AutenticateProvider> |
PlaceOrder / ValidateOrder
API calling process
There is an active order in web viewer stored in an order object
Order object is sent in PlaceOrder / ValidateOrder call
If call is successful, PlaceOrder / ValidateOrder call returns an order object. This returned object is used to update the active order.
Prices on order lines in active order is updated
Total price and charges on the active order is updated
Parts may be marked as NLA or a replacement may be returned and active order is updated based on this
Messages on order or order lines are set on the active order
Error code on order lines or on order is set on active order. If an error code exist the corresponding message will display in red and it will not be possible to place the order
Result is presented
For ValidateOrder call user stays on the order page and gets to see the active order
For PlaceOrder call user is either
directed to a confirmation page if PlaceOrder call accepted the order
stays on the order page and gets to see the active order if PlaceOrder call did not accept the order
Validation
Order is validated when parts are added and when user arrives at order. The validation can be turned off using a setting.
Code Block |
---|
<RESTPlaceOrderProvider order-validation-required="false" save-external-order-to-server-database="false" delete-old-trace-log-after-number-of-folder="30" trace-folder="C:\Temp\Trace-logs\" url="http://5.179.112.210/IntegrationWebAPI/"/> |
Providers
Providers for integrations are normally custom built for each integration and params needed for each custom provider will vary. Typically a custom provider is configured according to the below pattern in profile.config:
...
Code Block |
---|
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="PostCustomPlaceOrderServiceSoapBinding" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000"> <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000" /> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://www.domain.com/WebServices/CustomOrderService/post" binding="basicHttpBinding" bindingConfiguration="PostCustomPlaceOrderServiceSoapBinding" contract="CustomPlaceOrderService.CustomOrderServicePostPort" name="CustomOrderServicePost" /> </client> </system.serviceModel> |
Tracing
Every API provides the possibility to write trace logs. Trace log is turned on using the below xml in profile.config.
...
See separate article: Log archive (API logs)
Authentication in API calls
API calls may be protected by http basic authentication or api-keys (version 5.2.3 and later) and all REST providers support this security method.
Basic
Code Block | ||
---|---|---|
| ||
<PlaceOrderProvider> <RESTPlaceOrderProvider authorization-scheme="Basic" authentication-name="username" authentication-password="password" save-external-order-to-server-database="truefalse" delete-old-trace-log-after-number-of-folder="30" trace-folder="FC:\Signifikant\Log\DometicXml\" delete-old-trace-log-after-number-of-folder="60" impersonation="true" domain="localhost" user-name="xyz" password="xyz" url="https://www.domain.com/api/"/> </PriceProvider> |
The tracing will place two files for each call, one request and one response, in this location. Log files will be placed in sub folders per date and old log files will be deleted after 30 folders by default. Default value can be changed by using delete-old-trace-log-after-number-of-folder="30".
Files will be named according to this example:
Code Block |
---|
Request_PlaceOrder_e1f540ea-f4f8-4e8e-a123-76d451d5dba8_28.xml
Response_PlaceOrder_e1f540ea-f4f8-4e8e-a123-76d451d5dba8_28.xml |
e1f540ea-f4f8-4e8e-a123-76d451d5dba8 is the GUID of the session. _28 is a counter which will be kept the same for request and respose.
The Request and Response log files will contain the exact content of the calls and responses in xml or json (depending on API). Response file will also contain a response time to measure time for other end point to reply.
...
API calls may be protected by http basic authentication and all REST providers support this security method.
PlaceOrderProvider> |
ApiKey
This option is available from version 5.2.3 and later.
Code Block | ||
---|---|---|
| ||
<PlaceOrderProvider> <RESTPlaceOrderProvider authorization-scheme="BasicApiKey" authenticationapi-key-name="usernameapi-key" authenticationapi-passwordkey="passwordABC123" save-external-order-to-server-database="false" delete-old-trace-log-after-number-of-folder="30" trace-folder="C:\Log\" url="https://www.domain.com/api/"/> </PlaceOrderProvider> |
Login / Authenticate
User starts in back end system and navigates to Signifikant, where the Url will contain a session-id to identify the user to the back end system when an order later on is placed,
...
Info |
---|
Use tracing files for first error search of APIs. See related article Error search order API for more information. |
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Page Properties | ||
---|---|---|
| ||
|