Documentation
Send to GS1
These POST endpoints require an API key when keys are enabled. They operate on the simplest product hierarchy for the GTIN and target market.
Send
POST /api/sendToGS1
{
"D8165": "01234567890123",
"D8255": "208",
"dataRecipient": "1234567890123"
}
D8165 and D8255 are required. If dataRecipient is present, that GLN is used instead of the data recipients stored on the top product.
The response includes productId and result. If the send did not go through, sendStatusList may be present. Failures (product not found, no active hierarchy, bad recipient, transmission error) return HTTP 400.
Update and send
POST /api/update-and-sendToGS1
Same product JSON as Update products, single object or array. Optional dataRecipient is used only for the send step; it is not stored.
- The product is updated (or created).
- If the hierarchy is GS1-validated, it is sent to GS1.
- A failed send does not undo a successful update.
HTTP status:
| Code | Meaning |
|---|---|
| 200 | Updated. sendToGS1.status is SENT, or SKIPPED when not GS1-validated or in test mode |
| 202 | Updated, but send to GS1 did not succeed |
| 400 | Input errors; nothing reliable to send |
Dry-run: "test": true updates nothing and does not send.
Withdraw
POST /api/sendWithdrawalToGS1
{
"D8165": "01234567890123",
"D8255": "208"
}
Withdraws that hierarchy completely from GS1. The response includes productId and result. HTTP 400 if the product is missing, the body is invalid, or the withdrawal failed (sendStatusList may be included).
