Skip to content

Product Identifiers

All operations use POST /public-api/publicapi.v1.Inventory/ and require the creator’s inventory access in addition to the exact scope listed on each method. An identifier value is a barcode or serial string that must be unique within the workspace. Unix-second timestamps are int64 values, encoded as JSON strings.

LookupProductIdentifier resolves one barcode or serial value to its product identifier record, returning the owning productId. Read-only; returns NotFound when no identifier matches. Requires inventory:read.

Generated Reference
POST /public-api/publicapi.v1.Inventory/LookupProductIdentifier

Resolves a barcode or serial value to its product identifier. NotFound when the value is unknown in this workspace.

Request LookupProductIdentifierRequest
Response LookupProductIdentifierResponse

LookupProductIdentifierRequest

Field Type Description
value string Barcode or serial value to resolve.

LookupProductIdentifierResponse

Field Type Description
identifier ProductIdentifier Matched identifier.

ListProductIdentifiers returns every barcode and serial registered for one product. Read-only. Requires inventory:read.

Generated Reference
POST /public-api/publicapi.v1.Inventory/ListProductIdentifiers

Lists the registered barcode and serial identifiers for one product.

Request ListProductIdentifiersRequest
Response ListProductIdentifiersResponse

ListProductIdentifiersRequest

Field Type Description
product_id string Product whose identifiers to list.

ListProductIdentifiersResponse

Field Type Description
identifiers repeated ProductIdentifier Identifiers registered for the product.

AddProductIdentifier registers a barcode or serial for a product. The value must be unique in the workspace; a value already registered returns AlreadyExists. This operation is not idempotent. Requires inventory_identifier:write.

Generated Reference
POST /public-api/publicapi.v1.Inventory/AddProductIdentifier

Registers a barcode or serial identifier for a product. Not idempotent; a duplicate value conflicts.

Request AddProductIdentifierRequest
Response AddProductIdentifierResponse

AddProductIdentifierRequest

Field Type Description
product_id string Product to register the identifier for.
value string Barcode or serial value to register; must be unique in the workspace.

AddProductIdentifierResponse

Field Type Description
identifier ProductIdentifier The newly created identifier.

DeleteProductIdentifier removes one identifier record by its ID. Requires inventory_identifier:write.

Generated Reference
POST /public-api/publicapi.v1.Inventory/DeleteProductIdentifier

Deletes a product identifier by ID. Destructive; NotFound when the identifier does not exist.

Request DeleteProductIdentifierRequest
Response DeleteProductIdentifierResponse

DeleteProductIdentifierRequest

Field Type Description
id string Identifier record to delete.

DeleteProductIdentifierResponse

No fields.