curl --request POST \
--url https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serials": [
"<string>"
],
"lot": "<string>",
"carton_quantity": "<string>"
}
'import requests
url = "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels"
payload = {
"serials": ["<string>"],
"lot": "<string>",
"carton_quantity": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serials' => [
'<string>'
],
'lot' => '<string>',
'carton_quantity' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels"
payload := strings.NewReader("{\n \"serials\": [\n \"<string>\"\n ],\n \"lot\": \"<string>\",\n \"carton_quantity\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}Imprimer les étiquettes des unités d'un ordre de fabrication
{build} est l’ID de l’ordre de fabrication. Imprime une pièce pour chaque numéro de série
de la production, ou pour chaque carton de son lot de production, numérotée n de N
pour l’ordre de fabrication. La réponse est un PDF d’une page par pièce. Lorsque
aucun numéro de série ni lot n’est donné, ceux d’un ordre de fabrication terminé sont utilisés.
Les numéros de série donnés doivent correspondre à la quantité que fabrique l’ordre de fabrication. Une
étiquette affiche l’article, son numéro de série ou lot et le jour du lancement de l’ordre de fabrication,
ou le jour de sa fabrication une fois terminé. Elle affiche aussi l’ordre de fabrication,
la révision de la gamme et le poste de travail qui l’exécute. Balayer l’étiquette affiche le reste. Imprimez-la à 100 % sur du papier 4x6.
Les pièces du lot sont listées sous /labels/sets. L’impression est
consignée dans l’historique d’audit. Nécessite les autorisations manufacturing.builds.view et
labels.print et un jeton avec manufacturing:read et
labels:write.
curl --request POST \
--url https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serials": [
"<string>"
],
"lot": "<string>",
"carton_quantity": "<string>"
}
'import requests
url = "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels"
payload = {
"serials": ["<string>"],
"lot": "<string>",
"carton_quantity": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serials' => [
'<string>'
],
'lot' => '<string>',
'carton_quantity' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.stockshift.io/api/v1/manufacturing/builds/{build}/labels"
payload := strings.NewReader("{\n \"serials\": [\n \"<string>\"\n ],\n \"lot\": \"<string>\",\n \"carton_quantity\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"errors": {},
"feature": "<string>",
"reason": "<string>",
"attempts_left": 123,
"rule_ids": [
"<string>"
],
"witness": "<string>",
"blind_recount": true,
"flags": [
{
"flag": "<string>",
"facts": {},
"choices": [
"<string>"
]
}
]
}Autorisations
Pour vos propres scripts et vos intégrations de serveur à serveur. Créez une clé dans l'application sous Paramètres > Accès > Clés d'API et copiez-la à ce moment-là, car elle n'est affichée qu'une fois. Envoyez-la sous la forme Authorization: Bearer <key>. La clé agit en tant que le membre qui l'a créée, dans l'organisation où elle a été créée. Un appel exige l'autorisation du membre et l'une des portées de la clé, comme inventory:read ou sales:write. Une clé avec * a toutes les portées.
Paramètres de chemin
L'ID de la fabrication.
Corps
Les étiquettes à imprimer pour les unités qu'un ordre de fabrication produit.
Les numéros de série produits, une étiquette par unité fabriquée. Lorsque ce champ et lot sont omis, les numéros de série ou le lot propres à un ordre de fabrication terminé sont utilisés.
25064Le lot produit, pour un article suivi par lot. Il ne peut pas être envoyé avec serials.
64Ce que contient un carton du lot, dans l'unité de base de l'article. Si omis, toute la production forme un seul carton.
^(?!0+(\.0+)?$)\d{1,20}(\.\d{1,20})?$L'orientation de l'étiquette : portrait (par défaut) ou landscape.
portrait, landscape Réponse
Les étiquettes en PDF, une page par pièce.
The response is of type file.
Cette page vous a-t-elle été utile ?