Docs

Prepare a catalogue document upload

Prepare a private catalogue_document upload, optionally attributed to an activity, PDF only, at most 20 MiB. Requires media:upload and catalogue_pdf_publishing_enabled for the operator. When disabled, returns 403 forbidden with a message naming the catalogue_pdf_publishing_enabled rollout flag. Upload bytes using the signed upload URL. Machine integration bearer credentials only; storefront channel keys never authorize these operations. Buchung-Locale is not used; translations are addressed explicitly. Host enforces a 64 KiB request-body cap before parsing for every method with a body, including DELETE. Per-machine limits: 600 reads/minute, 300 writes/minute; over limit returns 429 rate_limited. Limiter store outage falls back to per-instance memory for reads; writes return 503 service_unavailable with Retry-After: 30.

Early access. Use the API base, channel key and allowed origins supplied by Buchung before running examples. Interactive API requests are disabled here.

POST
/v1/management/documents/uploads

Prepare a private catalogue_document upload, optionally attributed to an activity, PDF only, at most 20 MiB. Requires media:upload and catalogue_pdf_publishing_enabled for the operator. When disabled, returns 403 forbidden with a message naming the catalogue_pdf_publishing_enabled rollout flag. Upload bytes using the signed upload URL. Machine integration bearer credentials only; storefront channel keys never authorize these operations. Buchung-Locale is not used; translations are addressed explicitly. Host enforces a 64 KiB request-body cap before parsing for every method with a body, including DELETE. Per-machine limits: 600 reads/minute, 300 writes/minute; over limit returns 429 rate_limited. Limiter store outage falls back to per-instance memory for reads; writes return 503 service_unavailable with Retry-After: 30.

Authorization

integrationBearer
headerAuthorizationBearer <token>

Machine integration credential: Authorization: Bearer bg_it_<32 lowercase hex characters> (^bg_it_[0-9a-f]{32}$). Resolved uncached on each request. Middleware binds the resolved principal once; handlers run under it and never re-derive authority. The request context includes credentialId for per-request logging alongside machineId, operatorId, organizationId and capabilities; the principal is opaque and server-owned. Storefront channel keys never authorize management operations; machine credentials never authorize storefront checkout handoffs. Invalid, expired, revoked, disabled or ungranted credentials return 401 unauthorized.

Request Body

application/json
  1. body

Prepare a private catalogue PDF upload, at most 20 MiB. Filename is 1 to 255 characters with no control characters (U+0000-U+001F, U+007F). Filename, size and MIME are admission hints; finalization validates stored bytes and PDF structure. Host caps this JSON body at 64 KiB before parsing.

activityId?string

Optional activity the upload is attributed to; never part of the storage key. A document is operator-level either way.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid
fileName*string
Match^[^\u0000-\u001F\u007F]+$
Length1 <= length <= 255
byteSize*integer
Range1 <= value <= 20971520
mimeType*"application/pdf"

Closed upload MIME set: application/pdf only.

Value in"application/pdf"

Response Body

Private upload session and signed URL; do not log the signed URL. Uploading publishes nothing.

application/json
  1. response

Private upload session and signed URL; do not log the signed URL. Uploading publishes nothing.

uploadSessionId*Id

Stable UUID of a public resource.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid
uploadUrl*PublicUrl

Absolute public HTTP(S) URL; data and javascript URLs are not allowed.

Match^[Hh][Tt][Tt][Pp][Ss]?:\/\/\S+$
Formaturi
expiresAt*Instant

ISO 8601 absolute instant with explicit UTC offset (including Z). Render using the resource's documented display timezone; the serialized offset need not equal that zone.

Match^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
Formatdate-time
Example Request
curl -X POST 'https://api.buchungapp.com/v1/management/documents/uploads' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "string",  "byteSize": 1,  "mimeType": "application/pdf"}'
Example Response
{  "uploadSessionId": "1b27bbb1-4bfc-4edb-8a10-3614215b96d2",  "uploadUrl": "http://example.com",  "expiresAt": "2019-08-24T14:15:22Z"}