Resources

Custom QR Codes

A key feature of the VNTANA Platform is the ability for users to view your 3D Models externally, whether through an embed link, an iFrame, or on mobile using a QR code. The QR code allows anyone on a mobile device to view the 3D Model in a browser, loading the VNTANA Viewer using a unique embed link. From this embed link, the user can then also view the model in AR, transporting the 3D Model directly into their surroundings.

It is now possible via the VNTANA Platform to generate custom QR codes containing your company’s logo for each Product. Upon generating this QR code, the image used for your Organization will be added to the center of the QR code as shown in the example. Additionally, all new Products created will automatically generate this custom QR code which can be downloaded and utilized wherever you wish to integrate your 3D Model. Note: If you do not have an image uploaded for your Organization, the QR code can and will still be generated, however it will not contain anything embedded in the center, it’ll just be a standard QR code.

Generating the QR Code

For any Products that already exist, this custom QR code will have to be manually generated. To do this, visit the Product page of the Product you wish to generate the code for and press the ‘GENERATE QR CODE’ button located at the bottom right near the attachments section, as shown below.

This will create a png of the QR code containing your Organizations image in the center if one exists, and will add the image to the Product’s attachments section, as shown below.

Once a custom QR code has been generated, the ‘GENERATE QR CODE’ will disappear until either the current QR code is deleted or the Organization image changes.

For all future Products created, this QR code will be generated automatically, regardless of whether your Organization has an image loaded or not.

Uploading or Changing an Organizations Image

To upload or change the image for your Organization, first navigate to your dashboard on the VNTANA Platform and press the ‘Manage’ button in the bottom left corner.

The first page of settings you will see is the General Info page. In this page, click the ‘Upload Image’ button and navigate to the image you wish to upload as your Organizations image.

Once this is complete, every new custom QR code that is generated will contain this image in the center. Note: if you change your Organization’s image, all custom QR codes will have to be manually regenerated. Upon changing the image, the ‘GENERATE QR CODE’ will become available again for all products even if they already contain a QR code in their attachments.

Retrieving Your Custom QR Code

Once a QR code has been generated you can download the png by click the download icon in the upper right corner of the attachment when your mouse is hovering over it.

Additionally, it is possible to download the attachment via the VNTANA Admin API.

The VNTANA Admin API makes a wide array of VNTANA Platform features available for automation and easy integration into your e-commerce site. To view an overview of the API, visit this page, or view our resources page for a number of specific use case guides.

Admin API Base URL: https://api-platform.vntana.com

When using the VNTANA Admin API to pull your custom QR codes, you must first authenticate using your VNTANA Platform credentials. Below is a short summary of the steps to authenticate with the VNTANA Platform, view this guide for a more detailed look at the process.

  1. Log in using an Authentication Key or email / password.

    • Returns an x-auth-token in the Response Headers.

  2. Retrieve a list of Organizations and store the needed Organization’s UUID.

    • Pass the x-auth-token from Step 1 in the Request Headers.

      1
      { ‘x-auth-token’ : ‘Bearer ‘ + x_auth_token }
    • This step can be skipped if the Organization UUID is already stored locally.

  3. Generate a Refresh Token for the Organization.

    • Pass the x-auth-token from Step 1 in the Request Headers.

      1
      2
      3
      4
      {
      ‘x-auth-token’ : ‘Bearer ‘ + x_auth_token
      ‘organizationUuid’ : ‘string’
      }
    • Returns the Refresh Token as the Response Header x-auth-token.

  4. Retrieve a list of Clients / Folders and store the needed UUID.

    • Pass the x-auth-token in the Request Headers.

    • This step can be skipped if the Client / Folder UUID is already stored locally.

  5. Generate a Refresh Token for the Client / Folder (Organization Admin / Owner users must skip this step).

    • Pass the Refresh Token from Step 3 in the Request Headers with the Organization and Client UUID’s.

      1
      2
      3
      4
      5
      {
      ‘x-auth-token’ : ‘Bearer ‘ + refreshToken,
      ‘organizationUuid’ : ‘string’,
      ‘clientUuid’ : ‘string’
      }
    • Returns the Refresh Token as the Response Header x-auth-token.

Both in order to authenticate and to retrieve the QR code from a product, you will need to have the Organization UUID and Client / Folder UUID. These can be stored locally, but if not readily available you will have to retrieve them via the API. The authentication guide covers the endpoints for retrieving this information.

The next step will require the UUID of the Product the QR code is for. A great integration offered by VNTANA is the Webhooks feature, allowing you to subscribe some or all Folders in your Organization to certain events, sending data to an endpoint of your design when an event fires. One such event is the product.completed event which will fire when a Product has completed it’s Optimization process, at which point a QR code will be generated. This event will send information regarding the Product to your endpoint designated in the Webhook, and using the Product UUID from this you can automatically have the QR code downloaded using the steps below. For a guide on creating and using Webhooks, view this page.

Should you choose not to utilize Webhooks, you will have to either have the Product UUID stored locally when it was created, or make use of our API to search for the correct Product. There are a number of parameters that can be passed to refine the results of the search, but a simple example is given below. For more information on searching Products, view this guide.

The Request is structured as follows:

1
2
3
4
5
6
7
8
9
10
Method: POST
Endpoint: /v1/products/clients/search
Headers: { ‘x-auth-token’ : ‘Bearer ‘ + refreshToken }
Request Body: {
‘page’ : 1,
‘size’ : 10,
‘clientUuids’ : [ ‘some-client-uuid’ ],
‘searchTerm’ : ‘string’,
‘name’ : ‘string’
}

The Response is structured as follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
“success”: true,
“errors”: [],
“response”: {
“totalCount”: 1,
“grid”: [
{
“uuid”: “string”,
“clientUuid”: “string”,
“clientSlug”: “some-client-slug”,
“name”: “string”,
“locations”: [],
“tags”: [],
“variantGroups”: [],
“status”: “LIVE”,
“conversionStatus”: “COMPLETED”,
“asset”: {
“generationRequestUuid”: “string”,
“thumbnailBlobId”: “string”,
“assetBlobId”: “string”,
“assetOriginalName”: “string”,
“materialBlobId”: null,
“conversionFormats”: [
“GLB”,
“USDZ”
],
“models”: [
{
“uuid”: “string”,
“conversionFormat”: “GLB”,
“modelBlobId”: “string”,
“conversionStatus”: “COMPLETED”,
“conversionError”: null
},
{
“uuid”: “string”,
“conversionFormat”: “USDZ”,
“modelBlobId”: “string”,
“conversionStatus”: “COMPLETED”,
“conversionError”: null
}
]
},
“created”: “2022-06-26T22:21:26.744”,
“attributes”: [],
“updated”: “2022-06-26T22:34:57.042706”,
“malwareProcessingStatus”: null
}
]
}
}

The searches are fuzzy, meaning they return results based on relevance. Unless every Product name is quite unique, you’ll likely have to iterate over the results to match the name exactly.

This will return a list of relevant Products and their Product details, including their UUID’s. With the desired Product’s UUID in hand, you will have to retrieve the blobId for the attachment. This is accomplished by searching attachments. This search is entity specific, meaning it will only check attachments that belong to a specific Product, Comment, Annotation, etc. To search attachments for a Product, call the following endpoint:

1
2
3
4
5
6
7
8
9
10
Method: POST
Endpoint: /v1/attachments/search
Headers: { ‘x-auth-token’ : ‘Bearer ‘ + refreshToken }
Body: {
“entityType” : “PRODUCT”,
“entityUuid” : “productUuid”,
“page” : 0,
“size” : 10,
“productUuid” : “productUuid”
}

Some notes on the parameters passed in the body of the request:

  • entityType: the type of entity, can be PRODUCT, COMMENT, ANNOTATION, VARIANT_GROUP. In this case the attachment belongs to a Product, so we pass PRODUCT

  • entityUuid: the UUID of the entity, in this case this is simply the productUuid retrieved from the search endpoint.

  • productUuid: the UUID of the Product the entity belongs to, in this case since the entity is the Product, this is the same as entityUuid.

  • page: the page of results to return. For this endpoint, page 0 is the first page of results.

  • size: the number of results to return per page.

This will return the following structured data:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
“success”: true,
“errors”: [],
“response”: {
“totalCount”: 1,
“grid”: [
{
“uuid”: “string”,
“type”: “PRODUCT”,
“name”: “qrCode_some-id-string.png”,
“entityType”: “PRODUCT”,
“entityUuid”: “productUuid”,
“blobId”: “some-blob-id.png”,
“created”: “2022-07-13T17:10:36.247”,
“updated”: “2022-07-13T17:10:36.247”,
“productUuid”: “productUuid”
}
]
}
}

If it is necessary to filter the results as there are other attachments uploaded by you, you can utilize the name to determine which is the QR code as it will always start with the string “qrCode_”. From this data, the blobId will need to be retrieved and passed to the following endpoint in the URL to download the QR code image.

1
2
3
4
5
Method: GET
Endpoint: /v1/comments/images/{{blobId}}
Headers: { ‘x-auth-token’ : ‘Bearer ‘ + refreshToken }
Query Params: ‘clientUuid’
Sample URL: https://api-platform.vntana.com/v1/comments/images/some-blob-id.png?clientUuid=some-client-uuid

This will return the images data which can then be streamed into a file or streamed to another location first.

Additional Notes

  • The Organization image is not the same as your user profile picture. Follow the guide above to ensure you are uploading the image you desire to your Organization.

  • Updating a Product will not re-generate the QR code, so it will not need to be re-retrieved.

  • A Product must be ‘Published’ for the QR code to work. The QR code will automatically be generated even if the Product isn’t auto-published, and you will be able to generate the code while the Product is not published, however users who try to use the code will not be able to view the Product and instead will see the following screen:

On This Page

Accelerate Your
Digital Transformation

Learn how our platform can automate your 3D process.

Tap the magnifying glass to the left of your screen to search our resources.