Retrieving your List of Digital Glasses using the Try-On API’s /products/ Call with Postman


Introduction

The Try-On API’s GET /products/ endpoint allows you to retrieve the glassesIds of all Digital Glasses (DGs) available on a VTO server. This guide will walk you through the process of making a request to the /products/ endpoint using Postman.

We recommend that clients automate the /products/ request in their backend to stay up to date with the DGs on their server.


Getting Started

  1. Download and install Postman if you do not already have it downloaded on your computer.
  2. Open the Postman application and create a new request by selecting the dropdown arrow within the “New” button in the top left corner of the application.
  1. Name your request and save it to a collection or folder (e.g. Request name: Products, Folder: VTO API)

Building the Request

  1. Select “GET” as the desired request
  2. Enter the request URL, which is your Server URL followed by “/api/1.3/products” (e.g., to see the Digital Glasses available on your Sandbox VTO server, you might hit https://vto-sandbox.partners.api.ditto.com/api/1.3/products)
  3. Select “Headers” in the navigation bar below the request URL and enter key-value pairs for your X-Ditto-Access-Key-Id: Access Key Id and X-Ditto-Signature: Partner Signature.

Please see our documentation on the /products/ request for more details.


Perform the Request and View Results

  1. Click the blue button “Send” to perform the GET request on the /products/ endpoint.
  2. If successful, you will see a list of glassesIds within the “Body” tab. These are the glassesIds of the Digital Glasses available on the server you hit.

Troubleshooting

If you receive a “Forbidden” response within the “Body” tab after sending you request, one or both of your headers is/are incorrect.

  1. Check that the keys within the “Headers” tab are called “X-Ditto-Access-Key-Id” and “X-Ditto-Signature”.
  2. Check that the Access Key Id you’ve entered is the one listed for the same VTO Server you’ve specified in the request URL (i.e., prod, sandbox)
  3. Ensure that you are generating a Partner Signature using your partnerID as the “message” in signature creation. To review how to generate a Partner Signature, visit our authentication/authorization documentation.

If you receive a “Not Found” response within the “Body” tab after sending your request, your request URL is incorrect.

  1. Ensure that your request URL follows this formula: Server URL + /api/1.3/products (e.g., https://vto-sandbox.partners.api.ditto.com/api/1.3/products)

Conclusion

Thank you for working through our guide on retreiving your list of Digital Glasses using the Try-On API’s /products/ call!

If you have any questions, please reach out to your CSM or Solutions Engineer.