This article describes the APIs available to support the order process. It gives an overview of existing providers, and log tracing of API calls.
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 | <PriceProvider> |
GetAvailability | Authentication information A list of part numbers | List of availabilities for each part (if several warehouses) Result codes | <AvailabilityProvider> |
GetAddresses | Authentication information | List of addresses List of order types Temporary address permission (optional) Result code | <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) Error code on order Error codes on order lines Result codes | <PlaceOrderProvider> |
GetOrderList | Authentication information | OrderHistoryLines, one line per order Result codes | <OrderHistoryProvider> |
GetOrderDetails | Authentication information Order number | Order header, order lines, shipment lines Result codes | <OrderDetailProvider> |
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:
<PriceProvider>
<CustomPriceProvider impersonation="true" domain="localhost" user-name="xyz" password="zyx" />
</PriceProvider>
End point for the APIs are normally set up in web.config. Example:
<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.
<PriceProvider>
<CustomPriceProvider trace-folder="F:\Signifikant\Log\DometicXml\" impersonation="true" domain="localhost" user-name="xyz" password="xyz" />
</PriceProvider>
The tracing will place two files for each call, one request and one response, in this location.
Files will be named according to this example:
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.
Related articles