Skip to Content
NowToPrint — Print marketplaceСправка

XJDF API Guide

Public XJDF metadata, validation, session-scoped costing and XJMF message boundaries.

Разработчикdocs4 мин чтенияПроверено 21 окт. 2026 г.

The XJDF layer provides standards-referenced discovery and validation plus separately protected costing and external messaging. Public metadata is not proof of CIP4 certification, legal conformance, production execution or external GA. The platform vocabulary is XJDF 2.2, XJMF and PrintTalk 2.2; legacy JDF/JMF belongs at connector edges.

Published reference

The published reference /docs/api/xjdf-openapi.yaml is generated from the same builder and the CIP4 XJDF 2.2 schema bundle as the live GET /api/v1/xjdf/openapi document, so both describe the same routes and schemas.

Core endpoints

EndpointPurpose and authority
GET /api/v1/xjdfPublic discovery
GET /api/v1/xjdf/openapiPublic generated metadata
GET /api/v1/xjdf/capabilitiesStatic product/media/finishing vocabulary; not organization stock or live device availability
POST /api/v1/xjdf/validatePublic basic CIP4 JSON envelope checks
POST /api/v1/costing/calculate-xjdfOrganization-session costing with server-resolved effective L4 authority

Public metadata/validation does not require a Partner API key or mTLS. Its current process-local IP limiter is 30 requests/minute and can return 429 XJDF_RATE_LIMIT_EXCEEDED with Retry-After. This is not a durable per-organization quota.

Costing requires an authenticated organization session; a different body organization is rejected. The server resolves approved/effective L4 cost authority; supplied client context does not grant it. Missing authority returns 409 COSTING_AUTHORITY_REQUIRED; manual-review output is not a customer quote or unattended AutoBid authority.

Authoritative costing needs exact ResourceSet Media/@ID references present in the resolved snapshot. Media labels/grammage never become guessed IDs or prices. The costing request schema uses its own @Version/ProductList representation; it is not interchangeable with the public validator envelope below.

Validation

Send Content-Type: application/json. The validator expects a CIP4 JSON XJDF root:

curl -X POST https://api.nowtoprint.com/api/v1/xjdf/validate \
  -H 'Content-Type: application/json' \
  -d '{"XJDF":{"Version":"2.2","JobID":"example-job"}}'

This is a minimal envelope, not a production job ticket. The current validator checks root, Version and JobID presence and warns about a missing ProductList or non-2.x version; it is not full XSD/JSON-Schema or exhaustive semantic validation. Missing content type returns 415, malformed JSON or invalid content returns 400; valid validation returns 200. Check the response's validation result and issues. Passing validation does not execute a workflow, establish stock, calculate an authorized quote or certify the document.

XJMF and webhook boundary

External XJMF status vocabulary stays separate from internal workflow stages. Devices and controllers send XJMF 2.2 to one Manager endpoint, POST /api/b2b/xjmf, as application/vnd.cip4-xjmf+xml or as an XJMF package (application/vnd.cip4-xjmf+zip, with root.xjmf and the XJDF that a ReturnQueueEntry names). Signals and returned queue entries both go to this endpoint (ManagerEndpoints signals and returns). The credential is an agent key of the tenant whose allow-list names the b2b-xjmf-intake and b2b-xjmf-intake-read policies.

The answer is an XJMF Response with a CIP4 ReturnCode: Reliable signals and CommandReturnQueueEntry are answered; other queries and commands get ReturnCode 5. The JSON + HMAC callback routes were removed. These messages differ from Marketplace Standard Webhooks delivery.

Security and operations

  • Keep public metadata, costing sessions and sender HMAC authorization separate.
  • Preserve immutable resolved snapshot references for production handoff.
  • Treat unsupported/uncertain sources and manual-review outcomes as unresolved evidence.
  • Reconcile ambiguous delivery or costing outcomes before repeating effects.

Common errors

HTTPCode or conditionMeaning
400Invalid JSON/XJDFFix the validator envelope and reported issues
401Authentication requiredCosting needs an organization session
403Organization scope mismatchBody organization cannot differ from session
409COSTING_AUTHORITY_REQUIREDApproved/effective L4 authority is unavailable
409COSTING_MANUAL_REVIEW_REQUIREDResult cannot be used for unattended quoting
422XJDF_COSTING_MEDIA_AUTHORITY_REQUIREDExact authoritative media reference is required
429XJDF_RATE_LIMIT_EXCEEDEDPublic metadata/validation limiter exhausted

Была ли эта статья полезной?

Похожие статьи

Ask AI Assistant