tp-exp-api
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.
Notice: In order to maintain consistancy, the URL links are replaced with Navigation Path. The navigation path can be referred from the left pane of this page. An example below.
Example:
- Post Order API:
- Navigation Path: Endpoints -> /order -> Post
- Navigation Screenshot: below
Order API:
- Post Order: this api can be invoked for creating order.
- Method: Post
- Navigation Path: Endpoints -> /order -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order
- Update Order: this api can be invoked for updating and/or canceling order.
- Method: Put
- Navigation Path: Endpoints -> /order-> Put
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order
- Order Summary By Customer Number: this api can be invoked to retrieve order summary by using customer number.
- Method: Get
- Navigation Path: Endpoints -> /order-> /orderSummary -> /customerNumber/{customerNumber} -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order/orderSummary/customerNumber/{customerNumber}
- Order History By Order Number: this api can be invoked to retrieve order summary by using customer number.
- Method: Get
- Navigation Path: Endpoints -> /order-> /orderHistory-> /{orderNumber}/orderNumber -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order/orderHistory/{orderNumber}/orderNumber
- Order Fulfillment: this api can be invoked to determine which store can fulfill the order
- Method: Post
- Navigation Path: Endpoints -> /order-> /fufillment-> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order/fulfillment
- Order Invoice: this api can be invoked to get order invoice in base64 encoding format
- Method: Get
- Navigation Path: Endpoints -> /order-> /invoice -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/order/invoice
Customer Profile API:
- Customer Profile by Master Account Number: this api can be invoked to retrieve customer account details by using master account number.
- Method: Get
- Navigation Path: Endpoints -> customers -> /masteraccount/{master-account-number} -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/customers/masteraccount/{master-account-number}
- Customer Profile by Customer Account Number: this api can be invoked to retrieve customer account details by using customer account number.
- Method: Get
- Navigation Path: Endpoints -> customers -> /customeraccount/{customer-account-number} -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/customers/customeraccount/{customer-account-number}
Store API (aka Organization API):
- Store Detail By Store Number: this api can be invoked to retrieve store details by using store number.
- Method: Get
- Navigation Path: Endpoints -> stores -> /details/{storeNumber} -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/stores/details/{storeNumber}
- Store Locator: this api can be invoked to locate store by providing postal code, latitude, longitude and radius.
- Method: Get
- Navigation Path: Endpoints -> stores -> /locator -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/stores/locator
Address Verification API:
- Address Verification: this api can be invoked to validate an address.
- Method: Post
- Navigation Path: Endpoints -> /address/verification -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/address/verification
Tax API:
- Tax Certificate: this api can be invoked create a tax certificate record in tax system.
- Method: Post
- Navigation Path: Endpoints -> /customersTax -> /certificate -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/customersTax/certificate
- Create Customer in Tax System: this api can be invoked create a customer tax record in tax system.
- Method: Post
- Navigation Path: Endpoints -> /customersTax -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/customersTax
- Update Customer in Tax System: this api can be invoked update a customer tax record in tax system.
- Method: Put
- Navigation Path: Endpoints -> /customersTax -> Put
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/customersTax
Email Notification:
- Email Notification: this api can be used to send email using mailchimp templates.
- Method: Post
- Navigation Path: Endpoints -> /emailnotification -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/emailnotification
Caculate Invoice API:
- Calculate Invoice: this api can be invoked to calculate invoice.
- Method: Post
- Navigation Path: Endpoints -> /calculate -> /invoice -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/calculate/invoice
Caculate Quote API:
- Calculate Quote: this api can be invoked to calculate Quote.
- Method: Post
- Navigation Path: Endpoints -> /calculate -> /quote -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/calculate/quote
Sku API:
- Sku Price: this api can be invoked to gets the pricing information for the requested sku.
- Method: Post
- Navigation Path: Endpoints -> /skuprices -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/skuprices
- Sku Availability: this api can be invoked to gets sku availability by providing store number and availability type.
- Method: Post
- Navigation Path: Endpoints -> /skus -> /availability -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/skus/availability
Shipping API:
- Freight Shop Rate: this api can be invoked to calculate freightshopRate.
- Method: Post
- Navigation Path: Endpoints -> /freightshopRate -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/freightshopRate
- Calculate Packages: this api can be invoked to calculate packaging requirement.
- Method: Post
- Navigation Path: Endpoints -> /calculatePackages -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/calculatePackages
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.
- 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 -> /capturepartialpayment -> Post
- Base Path: [https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/capturepartialpayment/capturefullpayment
- GetCustomerProfile: this api can be used to get customer profile.
- Method: Get
- Navigation Path: Endpoints -> /getCustomerProfile/{Ecom_user_id} -> Get
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/getCustomerProfile/{Ecom_user_id}
- SaveCustomerProfile: this api can be used to save customer profile.
- Method: Post
- Navigation Path: Endpoints -> /saveCustomerProfile -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/saveCustomerProfile
- reversePayment: this api can be used for payment reversal.
- Method: Post
- Navigation Path: Endpoints -> /reversalPayment -> Post
- Base Path: https://msdev.api.truckpro.io/ecom/exp/exp/v1/0/reversePayment