Testing and Validation Process

The first step in testing the VoyageOne API is to determine what sort of API requests can be made and what the limitations are for each request such as data types and string length limits. This can be found in the Product API Endpoints and Order API Endpoints sections. Finding, testing, and verifying those limits is crucial to making sure the API will work as intended for your integration solution.

The next step is to set up each of these requests in an API test tool. A variety of tools can be used for this purpose. One of the easiest API testing tools to use is Postman – Postman has become a very popular choice for RESTful API testing in recent years, it is mostly free and supports many advanced features. It is also possible to write API tests directly into code. But the advantage of using API testing tools is that they are easy to use and provide a way to visualize the response.

Once you have chosen an API testing tool or decided to start coding, the first requests to set up are the happy path requests. These are the requests the API expects you to make in the normal course of using the API. When setting up a happy path request, it is important to include assertions. One assertion should be that the correct response code is returned. If the response includes a body, there should be an assertion on that as well.

Once all the happy path tests have been created, negative tests can be added. Negative tests make sure that any kind of error is handled correctly. It is important that the API does not crash if invalid data is accidentally imported. Here are some examples of negative tests:

We hope this has given you some guidance as to what you should expect to successfully complete your integration. Please refer to the following section for a complete list of test cases which should be performed before your integration solution can go live.

Test Cases

The table below details the various test cases for you to run against the VoyageOne API.

Test Case Expected Response
AUTHENTICATION
Make a request with no Authorization header. Response Code: E1010000 - Missing authorization header.
Make a request with the Authorization header not set as Bearer. Response Code: E1010000 - Missing authorization header.
Make a request with no Client-Id header. Response Code: E1010000 - Missing client-id header
Make a request with an invalid Token. Response Code: E1010000 - Invalid token.
CREATING PRODUCTS
Create multiple products with each product size type supported by the products in your catalog. Response Code: 0
Create a product with a bad image – has an invalid URL path. Currently not validated. Response Code: 0
Create a single product and item with the qty property set to 0. Response Code: 0
Create a single product and item with the qty property set to 1 or greater. Response Code: 0
Create a new product without any items. Response Code: 0
Create a new product with an invalid sizeChartType. Response Code: E2010007
Create a new product and item where the SKU property contains any of the special characters !"£$%^&*()_+{}[]:@~;'#<>?,.//*- + Response Code: E1010082
UPDATING PRODUCTS
Update the images on a product. Response Code: 0
Update a product by adding a new SKU. Response Code: 0
Delete a SKU by updating a product not including an existing SKU. Response Code: 0
Update quantity on only one SKU in a product with multiple variants. Response Code: 0
Update the description on a product Response Code: 0
Update non-required numeric product fields (i.e. MSRP, weight, etc.). Response Code: 0
Update a product with an invalid code. Response Code: E2010001
UPDATING ITEMS
Update the price on a SKU. Response Code: 0
Update the inventory on one or more SKUs. Response Code: 0
Update the status of a SKU to set the alive property to true. Response Code: 0
GETTING PRODUCTS
Get a specific product by valid code Response Code: 0
Get all products [null, null] Response Code: 0
Get range of products by createdTime Response Code: 0
Get a specific product by an invalid code Response Code: E2010003
GETTING ORDERS
Get an order with where the status is Open If all required order fields are verified and the order total math adds up correctly, vendor will send an acknowledge request.
ACKNOWLEDGING ORDERS
Update an Open order to set the status to acknowledged. Response Code: 0
Update multiple Open orders to set the status to acknowledged. Response Code: 0
CANCELING ORDERS
Update an Acknowledged order as Canceled. Response Code: 0
Update multiple Acknowledged orders as Canceled. Response Code: 0
SHIPPING ORDERS
Update an Acknowledged order as Shipped. Response Code: 0
Update multiple Acknowledged orders as Shipped. Response Code: 0
Update an Acknowledged order with no carrier or tracking number. Response Code: E1010004

Final Verification

Final verification will be performed in conjunction with the VoyageOne integration team to make sure all systems are ready to Go Live. Final verification consists of the following:

  1. Vendor – Creating one or more products
  2. Vendor – Updating one or more products
  3. Vendor – Getting one or more products
  4. VoyageOne – Listing one or more products on one or more marketplaces
  5. VoyageOne – Placing one or more orders
  6. Vendor – Getting one or more orders
  7. Vendor – Updating one or more orders as Acknowledged
  8. Vendor – Updating one or more orders as Canceled
  9. Vendor – Fulfilling one or more orders and updating the order status as Shipped
  10. VoyageOne – Verifying shipped orders have been delivered to customer and updating the order status to Complete