Material Bucket Schema
Campos
Material Bucket Schema
Schema for validating material bucket entities (Lagertool / Wegfahr-Buckets)
status
OPEN = aktiv, CLOSED = abgeschlossen
OPENCLOSEDbucketNumber
Auto-generated sequence number (e.g. M-2026-00001)
description
Optional description / Beschreibung
partyId
Linked customer (Party UUID)
ticketId
Linked ticket UUID
projectId
Linked project UUID
partyName
Denormalized customer name
ticketNumber
Denormalized ticket number
projectNumber
Denormalized project number
assignedToId
Technician user ID who owns this bucket
closedAt
Timestamp when bucket was closed
closedBy
User ID who closed the bucket
items
Scanned / added material items
id
Unique item ID (UUIDv7)
articleId
Reference to the source article (local UUID or weclapp article id)
articleNumber
Denormalized article number
name
Denormalized article name
sku
Denormalized EAN / SKU
quantity
Quantity (locked to 1 when serialNumber is set)
serialNumber
Serial number (if set, quantity must be 1)
serialNumberRequired
Snapshot of weclapp `serialNumberRequired` taken when the item was added. A bucket cannot be closed while such an item has no serialNumber. Absent on items added before 2026-11 — those never block closing.
notes
Optional notes for this item
billedAt
Timestamp when bucket was billed
billedBy
User ID who billed the bucket
invoiceId
Invoice UUID generated from this bucket
closedWithoutInvoicePerformanceRecordId
ADR 1065 — set (together with billedAt/billedBy, without invoiceId) when the Leistungsnachweis this bucket was selected on was closed without an invoice. The bucket then counts as settled and is never offered for billing again; reopening that Leistungsnachweis releases it.
stockBooking
Stock booking in weclapp, written only by the server (protectedFields). `movements` is the append-only ledger of outgoing/incoming weclapp stock movements per item; `status` is the state of the last run. Absent = the bucket never booked stock.
status
PENDINGRUNNINGBOOKEDFAILEDrequestedAt
requestedBy
lastRunAt
bookedAt
tags
Tags for categorization
Ningún campo coincide con el filtro.
Endpoints estándar
Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:
GET /api/v1/material_buckets— Lista, paginada y filtrableGET /api/v1/material_buckets/<id>— Una entidadPOST /api/v1/material_buckets— CrearPATCH /api/v1/material_buckets/<id>— Actualización parcialDELETE /api/v1/material_buckets/<id>— Eliminación lógicaGET /api/v1/material_buckets/<id>/timeline— Auditoría y actividades