Give items their barcodes and identifiers
Attach the codes scanners and tills recognize — a barcode, a UPC or EAN, an internal SKU — to each variant, and retire or void a code cleanly when it changes.
Catalog · a play in 3 steps.
The steps
- Assign the barcode or SKU to the variant — a duplicate refuses and names the holder. — assignIdentifier
- Retire a code that no longer applies — tills and scanners stop recognizing it immediately. — retireIdentifier
- Void an assignment made in error — the code frees for correct use and the correction is recorded. — voidIdentifierEntry
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
assignIdentifier
assignIdentifier — mutation · Assign an identifier (a barcode, a UPC/EAN/SKU) to a variant.
Example request
mutation ExampleAssignIdentifier($input: AssignIdentifierInput!) {
assignIdentifier(input: $input) {
id
type
caption
status
parentId
rootId
kind
value
organizationId
assignedAt
supersededAt
createdAt
updatedAt
revision
revisionNum
}
}
Variables:
{
"input": {
"variantId": "01900000-0000-7000-8000-8415e73b0000",
"kind": "<kind>",
"value": "<value>",
"organizationId": "01900000-0000-7000-8000-44b781470000"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"assignIdentifier": {
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"kind": "<kind>",
"value": "<value>",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"assignedAt": "2027-01-31T00:00:00.000Z",
"supersededAt": "2027-01-31T00:00:00.000Z",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revision": "01900000-0000-7000-8000-b7960e180000",
"revisionNum": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
retireIdentifier
retireIdentifier — mutation · Retire an identifier from a variant — it stops resolving.
Example request
mutation ExampleRetireIdentifier($input: RetireIdentifierInput!) {
retireIdentifier(input: $input) {
id
type
caption
status
parentId
rootId
kind
value
organizationId
assignedAt
supersededAt
createdAt
updatedAt
revision
revisionNum
}
}
Variables:
{
"input": {
"variantId": "01900000-0000-7000-8000-8415e73b0000",
"kind": "<kind>",
"organizationId": "01900000-0000-7000-8000-44b781470000"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"retireIdentifier": {
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"kind": "<kind>",
"value": "<value>",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"assignedAt": "2027-01-31T00:00:00.000Z",
"supersededAt": "2027-01-31T00:00:00.000Z",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revision": "01900000-0000-7000-8000-b7960e180000",
"revisionNum": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
voidIdentifierEntry
voidIdentifierEntry — mutation · Void an identifier assignment made in error — the honest correction of a mistaken assignment.
Example request
mutation ExampleVoidIdentifierEntry($id: ID!, $revision: ID!, $reason: String) {
voidIdentifierEntry(id: $id, revision: $revision, reason: $reason) {
id
type
caption
status
parentId
rootId
kind
value
organizationId
assignedAt
supersededAt
createdAt
updatedAt
revision
revisionNum
}
}
Variables:
{
"id": "01900000-0000-7000-8000-37386ae00000",
"revision": "01900000-0000-7000-8000-b7960e180000",
"reason": "Correcting a miscount."
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"voidIdentifierEntry": {
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"kind": "<kind>",
"value": "<value>",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"assignedAt": "2027-01-31T00:00:00.000Z",
"supersededAt": "2027-01-31T00:00:00.000Z",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revision": "01900000-0000-7000-8000-b7960e180000",
"revisionNum": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}