Proposal For API Courier Integration

Proposal summary 

The proposal covers the scope of API Courier Integration for  Simplee and SGK warehouses with NetSuite. 

Requirement  

Integrate Courier for Simplee and SGK warehouse with NetSuite account via API(Stream Public API). 

Prerequisites 

  • Access to courier accounts of Simplee and Warehouse 
  • Test Details from NetSuite to send to courier system 
  • Client ID &  client secret for Simplee and SGK  for authentication process. 

Our Solution 

We can integrate courier for Simplee and SGK warehouse with NetSuite account via API(Stream Public API).Integration need to be established for both courier accounts. 

We are planning to create a user event script for fetching the details from the IF created filtered by location (simplee/SGK) .Using the data from Item fulfillment record, we will create a JSON as payload. API is initiated when Item Fulfillment status is in Packed status. 

For mapping following data will be used: 

  
  Simplee Warehouse: service levels 

  • SGK 2MAN Standard –No:6  Delivery to Garden (standard) 
  • SGK 2MAN Packaging removal- No :4 – Packaging Removal 
  • SGK 2MAN Platinum no:7 – Assembly and Packaging Disposal 
  • Client Id: *********
  • Client secret: ******** 

 
   SGK Warehouse: service levels 

  • SGK Warehouse Standard – No: 6  – Delivery to Garden (standard) 
  • SGK Packaging removal  No: 4 – Packaging Removal 
  • SGK Platinum No:7 – Assembly and Packaging Disposal 
  • delivery.items.stockLocation: SGK 
  • delivery.deliveryMethod: SGK 
  • Client Id: *********** 
  • Client secret: Not provided 

Authentication: 

The Stream API uses OAuth 2.0 authentication to ensure that all requests made to the API are secure. 

Before calling any resource endpoints, it is necessary to generate an access token using the client ID and secret for the company. 

For this, need to send HTTP POST request to endpoint “https://www.go2stream.net/api/oauth” passing client ID and secret in JSON form within the request body 


    “grant_type”: “client_credentials”, 
    “client_id”: “client_id_>”, 
    “client_secret”: “client_secret_>” 

If the credentials are valid, the API will reply with an access token. The access token can then be passed within subsequent API requests as a bearer token within the authorisation header. Access tokens have a limited lifespan, defined in seconds by the “expires_in” property.  

Order Creation via API: 

A POST request will be then  send to API “https://www.go2stream.net/api/orders/orders” with the payload. The response details(tracking URL) will be stored in custom field created in Item Fulfillment record. If any error occur it will also be stored in custom fields of the IF. 

If order creation fails and tracking URL is not returned, then another API request for order creation will be  initiated on Edit & Save of the IF record. 

 The above process will be done separately for both SGK and Simplee warehouses. 

Assumptions 

  • We will be mapping service levels as per the details provided in the solution. 
  • We will send the details in API  for creating order in JSON format 
  • For testing purpose we will create test details and send the same via Stream API 
  • We will refer to https://www.go2stream.net/API/redoc/index.html#tag/General for integration 

Risks     

  • We believes that there won’t be any authentication issues in using OAuth 2.0 
  • API is initiated when Item Fulfillment status is in Packed status. If error occur, API is initiated on Edit & Save of Item Fulfillment record only. 

Leave a comment

Your email address will not be published. Required fields are marked *