> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.yanet.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Barcode Print API Documentation

### Overview
The Barcode Print API enables third-party systems to retrieve available barcode templates and generate printable barcode labels for Shopify product variants.


### Authentication
| Header | Required | Description |
| X-Client-ID | Yes | Your assigned Client ID |
| X-Client-Secret | Yes | Your assigned Client Secret |
| X-Shop-Domain | Yes | Your Shopify store domain (e.g. store.myshopify.com) |


### Base URL
https://barcode.yanet.io


### **Endpoints**
###### 1. Get All Templates
Endpoint
GET /api/barcode/get-template-from-api
Returns all available barcode templates for the specified Shopify store.
Required Headers
* X-Client-ID
* X-Client-Secret
* X-Shop-Domain
cURL Example
curl --request GET 'https://your-api-domain.com/api/barcode/get-template-from-api' --header 'X-Client-ID: your-client-id' --header 'X-Client-Secret: your-client-secret' --header 'X-Shop-Domain: your-store.myshopify.com'
Response
Returns a list of available barcode templates.
###### 2. Print Barcode Labels
Endpoint
GET /api/barcode/print-from-api
| Parameter | Required | Description |
| template\_id | Yes | The barcode template ID. |
| vid[variant\_id] | Yes | Shopify Variant ID and the number of labels to generate. |
Example Request
GET /api/barcode/print-from-api?template\_id=3&vid[44538239123628]=5&vid[44538239123629]=2

template\_id: get template Id from Yanet Barcode App in admin Shopify or API **Get All Template**
Eg:  variant ID
| Variant ID | Labels |
| vid[44538239123628] | 5 |
| vid[44538239123629] | 2 |

Response
Returns a PDF file (or a PDF download URL, depending on your integration) containing the generated barcode labels.


### HTTP Status Codes
| Status | Description |
| 200 | Request completed successfully. |
| 400 | Invalid request parameters. |
| 401 | Authentication failed. |
| 404 | Requested resource was not found. |
| 500 | Internal server error. |


### **Integration Workflow**
Retrieve Available Templates
↓
Select a Template
↓
Prepare Variant IDs and Quantities
↓
Call the Print Barcode Labels API
↓
Receive the PDF
↓
Print Barcode Labels

| **Note:** API Access is available on supported plans.
