Listing fields associated with a template
Good morning,
We are a potential customer and looking to automate our barcoding system with Bartender.
There's a few things we were hoping to be able to query from the REST API that I'm not finding clear documentation on:
- Listing available label templates
- For a given template, listing the required variables and any metadata that might be pertinent for them.
NiceLabel has a nice query for the variables of a template that responds like this:
{
"Variables": {
"Variable": [
{
"Name": "FIELD1",
"Description": null,
"DefaultValue": "NiceLabel",
"Format": "All",
"IsPrompted": "True",
"PromptText": null,
"CurrentValue": "NiceLabel",
"IncrementType": "None",
"IncrementStep": "0",
"IncrementCount": "0",
"Length": "20",
"IsPickListEnabled": "False"
},
...
]
}
}
-
Hello Derek,
Thank you for reaching us with your query via our Community Forums.To achieve the tasks you mentioned using BarTender REST API, you can follow the steps outlined below:
- Authenticate and obtain an access token:
- Send a POST request to the /login endpoint with your credentials to obtain an access token.
- Include the access token in the headers of subsequent requests for authentication.
- Listing available label templates:
- Send a GET request to the /templates endpoint to retrieve a list of available templates.
- The response will contain information about each template, such as its name, ID, and other relevant details.
- For a given template, listing the required variables and metadata:
- Obtain the template ID for the desired template, either from the previous step or using any other method.
- Send a GET request to the /templates/{templateId}/variables endpoint, replacing {templateId} with the actual ID of the template.
- The response will provide information about the variables used in the template, including their names, types, and any associated metadata.
It's worth noting that the specific endpoint URLs and request payloads may vary depending on the version of BarTender you are using and the configuration of your REST API. Make sure to refer to the BarTender REST API documentation for accurate and up-to-date information on the endpoints and payload structures.
We would also suggest reviewing our Getting Started with the BarTender REST API YouTube video as I believe it should give you some pointers to your questions. That being said if you'd like to discuss what BarTender can offer you regarding REST APIs, we would recommend reaching our Sales Department in order to discuss all your needs for your BarTender environment.
Thank you.0
Iniciar sesión para dejar un comentario.
Comentarios
1 comentario