Retrieving your List of Digital Glasses using the Try-On API’s /products/ Call with Postman
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.
- Download and install Postman if you do not already have it downloaded on your computer.
- 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.
- Name your request and save it to a collection or folder (e.g. Request name: Products, Folder: VTO API)
Building the Request
- Select “GET” as the desired request
- Enter the request URL, which is your
Server URLfollowed 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)
- Select “Headers” in the navigation bar below the request URL and enter key-value pairs for your X-Ditto-Access-Key-Id:
Access Key Idand X-Ditto-Signature:
Please see our documentation on the /products/ request for more details.
Perform the Request and View Results
- Click the blue button “Send” to perform the GET request on the /products/ endpoint.
- If successful, you will see a list of
glassesIdswithin the “Body” tab. These are the
glassesIdsof the Digital Glasses available on the server you hit.
If you receive a “Forbidden” response within the “Body” tab after sending you request, one or both of your headers is/are incorrect.
- Check that the keys within the “Headers” tab are called “X-Ditto-Access-Key-Id” and “X-Ditto-Signature”.
- Check that the
Access Key Idyou’ve entered is the one listed for the same VTO Server you’ve specified in the request URL (i.e., prod, sandbox)
- Ensure that you are generating a
Partner Signatureusing your
partnerIDas 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.
- 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)
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.