Step 1: Navigate to WeSupply API Documentation
To start, you'll need to head over to the WeSupply API documentation. Here you'll find a list of APIs, but we'll be focusing on two in particular: the Lookup Orders API and the Order Links API.
https://documenter.getpostman.com/view/11859344/T17AiAYq#bb003bce-0588-48cd-9c45-d3974a49e366
Step 2: Use the Lookup Orders API
https://documenter.getpostman.com/view/11859344/T17AiAYq#89a4ac0a-2cf2-45e4-8c27-5ddddf00a489
Under the Orders section in the API documentation, you'll find an API called "Lookup Orders". This API allows you to look up orders using different variables such as the order ID, external order ID, or the customer email.
If you use the order ID or external order ID (the customer-friendly order number), the API will return a URL for that specific order. However, if you use the customer email, the API will return all the orders associated with that email in WeSupply.
Step 3: Extract the External Order ID
In the response from the Lookup Orders API, you'll receive all the order details for each order. From these details, you need to extract the external order ID. This ID will be used in the next step to get the link to the individual orders.
Step 4: Use the Order Links API
https://documenter.getpostman.com/view/11859344/T17AiAYq#d0572734-f2ae-46ef-b885-b3ecf0d91bef
Once you have the external order ID, you can use the Order Links API. After the API URL, you'll need to add the variable 'order external order id' and populate it with the external ID you received from the Lookup Orders API.
This API will return the encoded order lookup URL.
Step 5: Open the URL in a Pop-Up
Instead of opening the URL in a new window, you can enhance the user experience by opening it in a pop-up or a modal on your website. This method is quick and provides a seamless user experience. Note
: This will require dev work.
In summary, the process involves using the customer's email address to get all the order IDs from WeSupply. Then, using these IDs, you look up all the order links. Once you have these links, you can open them in a pop-up on your website. This entire integration process only takes a few minutes but greatly enhances the user experience.
Comments
0 comments
Please sign in to leave a comment.