Set a GS1 product link
set_product_linkPoint one of a product's GS1 link types somewhere. A phone that scans the code goes to the default; an app asking for a specific type gets that one. Setting a batch scopes the link to codes carrying that batch only, which is how a recall is done without touching other stock. Re-running with the same type and batch replaces that link rather than adding a second.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"gtin": "<gtin>",
"link_type": "<link_type>",
"url": "<url>",
"title": "<title>"
},
"name": "set_product_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| gtin | Yes | ||
| batch | No | Scope this link to one batch or lot | |
| title | Yes | Shown in a scanner's menu. Required by the standard. | |
| link_type | Yes | A GS1 link type such as gs1:pip for the product information page. Call get_account or read the docs for the full list. | |
| is_default | No | Make this where a phone lands |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| gtin | Yes | Always 14 digits: a UPC-12 or EAN-13 is zero-padded | |
| name | Yes | ||
| brand | No | ||
| links | Yes | ||
| page_url | No | The hosted product page, when the brand has built one | |
| created_at | No | ||
| digital_link | Yes | The address printed inside the QR code on the pack |