6min

Interact with Catalogs

Note: You can also follow this guide in Postman by using the appropriate requests and environment variables for the headers.

ο»Ώ

Catalogs are collections of buyable Products available on Violet through integrated Merchants. Since multiple Merchants can sell the same product, each Merchant has a Product "Offer". These offers are tied to specific products that a uniquely identifiable SKU and is searchable through our catalog search API. Using this SKU, they can then be bought through your application when integrated with our checkout orchestration process.

In this section, you will take the Merchant Id you retrieved from View Merchants and do the following:

  1. Retrieve offers avaiable from Merchants and understand what this information means
  2. Take the SKU from this product offer and use it in the next section to Place an Order

You can view a list of available offers for a specific merchant using the following API:

ο»ΏGet offers for a Merchantο»Ώ

Note: For more details on this endpoint and the other possible filter options it can take, please refer to the API Reference

ο»Ώ

Get a cake by its ID
GET
Params
Body Parameters
required
String
ID of the cake to get

In this example, we have explicitly set the number of responses to be 2 (as a path parameter), which is why we're seeing two products even though this merchant may have many more. There is a lot of information that this call has returned such as product description, images URLs, brand, pricing, etc., however, for this Recipe we will only need one of the SKUs.

Read through the product descriptions - as you can see, we have a GoPro Quadcopter with a Hero6 Camera attached to it and also a GoPro Quadcopter with a Hero5 Camera attached to it. Take the SKU for the GoPro Quadcopter with a Hero6 Camera and save/note it down - you will use this SKU in the final API of this section as well as to navigate through Place an Order .

ο»ΏGet details about a SKU

Note: For more details on this endpoint and the other possible filter options it can take, please refer to the API Reference

ο»Ώ

Get a cake by its ID
GET
Params
Body Parameters
required
String
ID of the cake to get

As you can see from the response above, SKU details include very specific details about the item we are purchasing, including inventory, size/variant details, quantity available and pricing information.

Now that you have a single SKU and information availble about the product you want to buy, head to Place an Order to learn how to checkout using Violet. Remember to keep this SKU handy for the next section!

ο»Ώ

ο»Ώ

ο»Ώ

Updated 01 Jun 2022
Did this page help you?
Yes
No