Creating a ZPL Template
Please consult http://labelary.com/zpl.html for general information about ZPL.
To test your ZPL label, use the API to create the label with an order and export as a ZPL file. Using the file, copy the information in this ZPL reader BinaryKits.Zpl.Viewer.WebApi (binarykits-zpl-viewer.azurewebsites.net) to make sure that the label is valid and comes out as you wanted.
Please note that if you are looking to add the date and time at the time of the label generation, you can use the following:
@System.TimeZoneInfo.ConvertTimeFromUtc(System.DateTime.UtcNow, System.TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")).ToString()
Applying to Orders
You don't apply Label Templates to Orders or Accounts. All accounts have access to all label templates. For this reason, be careful about hardcoding logos or text in a template.
Retrieving a Label Using API
https://api.dispatchscience.com/reference/get_api-v1-orders-orderid-label-templateid-format-1
Sample: https://tenantid.dsapp.io/integration-tenants/api/v1/orders/ECX389011/label/1/0?isPrimary=true
Would retrieve order "ECX389011" using template "1" in ZPL format ("0") in the Primary language.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article