Skip to content

Printing RFID tags & creating assets

Your application can create assets and print their RFID labels in a single call. VastVision handles EPC generation, label rendering, and delivery to your Zebra printer. The examples continue with the sample store.

  1. Get your IDs once. Obtain the printer_id of each Zebra printer and the rfid_label_template_id of the label design from VastVision (or the web app). Store them as configuration in your application.
  2. Look up classification IDs from the tiered classifications route so new items are tagged with their product type and size. Label placeholders such as size are filled from these.
  3. Call POST /third-party-access/print-rfid-labels-and-create-assets/ with the list of assets. Scope asset.print.
  4. Check the print job status in the response and show the result to your user.

Three new Small polos arrive at the Downtown Store. Your application sends them to printer 17 using template 5, without EPCs, so VastVision generates them:

Terminal window
curl -X POST https://api.vastvision.io/third-party-access/print-rfid-labels-and-create-assets/ \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d @print-request.json
print-request.json
{
"printer_id": 17,
"rfid_label_template_id": 5,
"asset_list": [
{ "name": "Peter Millar Polo", "status": "available", "classification_ids": [101, 102] },
{ "name": "Peter Millar Polo", "status": "available", "classification_ids": [101, 102] },
{ "name": "Peter Millar Polo", "status": "available", "classification_ids": [101, 102] }
]
}
200 OK (PrintJobReadWithAssets)
{
"id": 9001,
"organization_id": 42,
"printer_id": 17,
"rfid_label_template_id": 5,
"status": "printer_received",
"created_at": "2026-10-28T15:04:05.123456+00:00",
"assets": [
{
"id": 5009,
"epc_hex": "3034257BF7194E4000000101",
"name": "Peter Millar Polo",
"status": "available",
"creation_source": "printed",
"zone_id": null,
"geospatial_zone_id": null,
"organization_id": 42,
"antenna": null,
"created_at": "2026-10-28T15:04:05.101112+00:00",
"asset_classifications": [
{ "id": 101, "name": "Polo Shirt", "organization_id": 42, "parent_id": null,
"price": "79.00", "created_at": "2026-01-12T10:00:00+00:00" },
{ "id": 102, "name": "Small", "organization_id": 42, "parent_id": 101,
"price": null, "created_at": "2026-01-12T10:00:00+00:00" }
],
"geospatial_zone": null
},
{ "id": 5010, "epc_hex": "3034257BF7194E4000000102" /* same shape as above */ },
{ "id": 5011, "epc_hex": "3034257BF7194E4000000103" /* same shape as above */ }
]
}

Store each returned epc_hex against the item in your system. Once the job completes, the catalog route would show Polo Shirt at 9 and Small at 5.

Print job status Meaning What your app should do
printer_received The printer accepted the job. Show success and store the returned assets with their EPCs.
printer_failed The assets were still created, but Zebra’s printer API rejected the job. The HTTP status is still 200. Show a clear error to your user and store the returned assets.
HTTP status When
403 The printer does not belong to your organization (or your token lacks asset.print).
404 The printer, its location, or the template was not found.
422 Validation or processing error. detail begins Error printing RFID labels and creating assets for third-party request: …

Templates contain placeholders that are filled from asset fields such as {name} and {epc_hex}, and from classification attributes. For example, a {size} placeholder pulls the asset’s child classification in the size grouping, so classification_ids: [101, 102] prints Small. Template design is done by VastVision or in the web app, so your application only needs to send good asset data, especially name and classification_ids.

If items already carry encoded tags, create the assets without printing using POST /third-party-access/assets/ (scope asset.create). In this example the first EPC already exists in the sample store (A001), so only the second asset is created:

Request body
{
"asset_list": [
{ "epc_hex": "E2801170000002000000A001", "name": "Peter Millar Polo", "classification_ids": [101, 102] },
{ "epc_hex": "E2801170000002000000A007", "name": "Peter Millar Polo", "classification_ids": [101, 102] }
]
}
200 OK (only the new asset is returned)
[
{
"id": 5012, "epc_hex": "E2801170000002000000A007", "name": "Peter Millar Polo",
"status": null, "zone_id": null, "organization_id": 42,
"created_at": "2026-10-28T15:10:22.004113+00:00"
/* remaining AssetRead fields */
}
]

Compare the EPCs you sent with the EPCs returned to find any that were skipped.