Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article describes the http APIs available to support the order process. It gives an overview of existing providers, and log tracing of API calls.

...

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

  1. There is an active order in web viewer stored in an order object

  2. Order object is sent in PlaceOrder / ValidateOrder call

  3. If call is successful, PlaceOrder / ValidateOrder call returns an order object. This returned object is used to update the active order.

    1. Prices on order lines in active order is updated

    2. Total price and charges on the active order is updated

    3. Parts may be marked as NLA or a replacement may be returned and active order is updated based on this

    4. Messages on order or order lines are set on the active order

    5. 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

  4. Result is presented

    1. For ValidateOrder call user stays on the order page and gets to see the active order

    2. For PlaceOrder call user is either

      1. directed to a confirmation page if PlaceOrder call accepted the order

      2. 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.

...

Tracing

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
languagexml
<PlaceOrderProvider>
  <RESTPlaceOrderProvider authorization-scheme="Basic" authentication-name="username" authentication-password="password" 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>

ApiKey

This option is available from version 5.2.3 and later.

Code Block
languagexml
<PlaceOrderProvider>
  <RESTPlaceOrderProvider authorization-scheme="ApiKey" api-key-name="api-key" api-key="ABC123" 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>

...

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1ecd09
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelsorder api Placeorder getprice getavailability validateorder getorderhistory getorderdetails getshipmentdetails
cqllabel in ( "api" , "placeorder" , "getorderdetails" , "getshipmentdetails" , "order" , "getprice" , "getavailability" , "validateorder" , "getorderhistory" ) and type = "page" and space = "ASKB"labelsorder api Placeorder getprice getavailability validateorder getorderhistory getorderdetails getshipmentdetails


Page Properties
hiddentrue


Related issues