API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console

POST /v1/material-buckets/{id}/bill

POST/v1/material-buckets/{id}/bill

Create a draft invoice from a closed material bucket, or append items to an existing draft invoice

Data model

This operation works on the entity Material Bucket (material_bucket). All 17 fields — type, validation, required status, relationships — are listed in the schema reference.

Request body

NameTypeDescription
partyIdrequiredstring
unitPricestringDefault unit price per item (decimal string). Omit to use 0.00.
vatRatestring
paymentTermsDaysinteger
titlestring
existingInvoiceIdstringAppend items to this existing DRAFT invoice instead of creating a new one

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X POST https://api.codemeta-os.de/v1/material-buckets/{id}/bill \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "partyId": "string",
  "unitPrice": "string",
  "vatRate": "19",
  "paymentTermsDays": 0,
  "title": "string",
  "existingInvoiceId": "string"
}'
const result = await cm.material-buckets.post({
  "partyId": "string",
  "unitPrice": "string",
  "vatRate": "19",
  "paymentTermsDays": 0,
  "title": "string",
  "existingInvoiceId": "string"
});

Response codes

HTTP Meaning
201 Default Response

Search