tp-exp-api

(0 reviews)
Common Experience Layer API

home

API Specification:

  • This is a common experience layer API that shall be able to route the traffic to all of the process and system layer APIs.
  • All external clients must invoke this api in order to perform operations to any of the underlying endpoints or resources. A number of security policies will be applied on experience api, including but not limited to clientIdEnforcement, IP Whitelisting and Rate Limiting policy.
  • All hosted endpoints and resources are listed below and can be invoked individually. As part of the documentation, each API has a sample request and response payload along with specific success and error codes.
  • The caller must adhere to the minimum header requirements, as of now, it is required to pass following headers:
    • client_id
    • client_secret
    • x-correlation-id
  • Each caller/client shall receive a specific set of clientID/clientSecret. It is important to ensure that clientID/clientSecret shall not be shared beyond that paerticular client.
  • Details related to endpoint specific URI Parameters / Query Parameters or headers are listed under each endpoint and shall be referenced before making the call.
  • A mocking API is hosted against every endpoint and the url can be found on resource/endpoint specific page. It is recommended that the mocking url is used for testing purposes.

Authentication and Authorization:

Clients calling TruckPro Inventory API are managed in the Mulesoft Cloudhub. Calls through the API gateway to TruckPro Inventory API must have a valid client id and client secret.

All request and response body entities are composed in JSON.

Common Response Codes:

The following error codes apply to all API endpoints. See the API documentation for a complete list of the error codes and response bodies that can be expected on each endpoint.

200 - Returns the success based on the input request

401 - Client Id or client secret is no longer valid. The response body has the details.

5XX - There was a server error. The response body has the details.

List of endpoints:

below is the list of all the endpoints that are exposed through this portal.

Example:

  • Post Order API:
    • Navigation Path: Endpoints -> /order -> Post
    • Navigation Screenshot: below

resources/image-6febd4d8-be84-4978-a84f-18a130739f7e.png

Order API:
Customer Profile API:
Store API (aka Organization API):
  • Store Detail By Store Number: this api can be invoked to retrieve store details by using store number.
  • Store Locator: this api can be invoked to locate store by providing postal code, latitude, longitude and radius.
Address Verification API:
Tax API:
  • Tax Certificate: this api can be invoked create a tax certificate record in tax system.
  • Create Customer in Tax System: this api can be invoked create a customer tax record in tax system.
  • Update Customer in Tax System: this api can be invoked update a customer tax record in tax system.
Email Notification:
Caculate Invoice API:
Caculate Quote API:
Sku API:
  • Sku Price: this api can be invoked to gets the pricing information for the requested sku.
  • Sku Availability: this api can be invoked to gets sku availability by providing store number and availability type.
Shipping API:
Payments API:
  • AuthorizePayment: this api is used to authorize payment with customer profile.
    • Method: Post
    • Constant Values in Request Payload: version="4.5", transType="A" , bin="000001", terminalID="001"
    • We have to pass the above constant values in Request Payload everytime invoking this API
    • Navigation Path: Endpoints -> /authorizePayment -> Post
    • Base Path: [https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/authorizePayment/authorizePayment
  • FullPayment: this api is used to book full payment of the order.
    • Method: Post
    • Constant Values in Request Payload: version="4.5", bin="000001", terminalID="001"
    • We have to pass the above constant values in Request Payload everytime invoking this API
    • Navigation Path: Endpoints -> /capturefullpayment -> Post
    • Base Path: [https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/capturefullpayment/capturefullpayment
  • PartialPayment: this api is used to book partial payment of theorder.
  • GetCustomerProfile: this api can be used to get customer profile.
  • SaveCustomerProfile: this api can be used to save customer profile.
  • reversePayment: this api can be used for payment reversal.

Reviews