> ## Documentation Index
> Fetch the complete documentation index at: https://docs.batchrelay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get one published output's render contract

> Requires a studio-owned API account with the print_orders:read key scope. Omit revision_id to resolve the latest published revision. Returned slot key is the only runtime identity; ordinal, label, and semantic suggestion are revision-local discovery metadata.



## OpenAPI

````yaml https://api.batchrelay.com/openapi.json get /v1/templates/{template_id}/outputs/{output_id}/contract
openapi: 3.1.0
info:
  title: Batch Relay API
  version: 1.0.0
  description: >-
    Provider-neutral print catalog and prepared-media validation. This document
    covers only routes owned by the Go service; it deliberately excludes
    migration-proxied order lifecycle routes and all provider payloads.
servers:
  - url: https://api.batchrelay.com
security: []
tags:
  - name: System
  - name: Catalog
  - name: Print orders
  - name: Managed assets
  - name: Template renders
  - name: API accounts
paths:
  /v1/templates/{template_id}/outputs/{output_id}/contract:
    get:
      tags:
        - Template renders
      summary: Get one published output's render contract
      description: >-
        Requires a studio-owned API account with the print_orders:read key
        scope. Omit revision_id to resolve the latest published revision.
        Returned slot key is the only runtime identity; ordinal, label, and
        semantic suggestion are revision-local discovery metadata.
      operationId: getTemplateOutputContract
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: output_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: revision_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: Optional immutable published or superseded revision ID.
      responses:
        '200':
          description: Output-scoped immutable render contract
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateOutputContract'
        '400':
          $ref: '#/components/responses/InvalidTemplateContractRequest'
        '401':
          $ref: '#/components/responses/APIKeyAuthenticationRequired'
        '403':
          $ref: '#/components/responses/APIKeyForbidden'
        '404':
          $ref: '#/components/responses/TemplateContractNotFound'
        '503':
          $ref: '#/components/responses/TemplateContractUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    TemplateOutputContract:
      type: object
      required:
        - template
        - output
        - slots
      properties:
        template:
          $ref: '#/components/schemas/TemplateOutputContractTemplate'
        output:
          $ref: '#/components/schemas/TemplateOutputContractOutput'
        slots:
          type: array
          items:
            $ref: '#/components/schemas/TemplateOutputContractSlot'
      additionalProperties: false
    TemplateOutputContractTemplate:
      type: object
      required:
        - id
        - revision_id
        - revision_number
        - document_hash
        - template_engine_version
      properties:
        id:
          type: string
        revision_id:
          type: string
        revision_number:
          type: integer
          minimum: 1
        document_hash:
          type: string
        template_engine_version:
          type: string
          const: 0.10.0
      additionalProperties: false
    TemplateOutputContractOutput:
      type: object
      required:
        - id
        - ordinal
        - surfaces
      properties:
        id:
          type: string
        label:
          type: string
        ordinal:
          type: integer
          minimum: 0
        surfaces:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/TemplateOutputContractSurface'
      additionalProperties: false
    TemplateOutputContractSlot:
      type: object
      required:
        - key
        - kind
        - ordinal
        - required
      properties:
        key:
          type: string
          description: >-
            Opaque runtime binding key. This is the only field used to submit
            values.
        kind:
          type: string
          enum:
            - text
            - image
        ordinal:
          type: integer
          minimum: 0
          description: Revision-local presentation order, not an identity.
        required:
          type: boolean
        suggested_label:
          type: string
          description: Human-facing mapping suggestion only.
        suggested_semantic_key:
          type: string
          description: >-
            Platform vocabulary suggestion only; it is never a runtime lookup
            alias.
        expected_aspect_ratio:
          $ref: '#/components/schemas/AspectRatio'
        minimum_effective_ppi:
          type: number
          exclusiveMinimum: 0
        max_length:
          type: integer
          minimum: 1
      additionalProperties: false
    Error:
      type: object
      required:
        - error
        - code
        - message
        - docs_url
        - request_id
      properties:
        error:
          type: string
          description: Backward-compatible human-readable error.
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
        docs_url:
          type: string
          format: uri
        request_id:
          type: string
      additionalProperties: false
    TemplateOutputContractSurface:
      type: object
      required:
        - id
        - variant_id
        - fulfillment_role
        - ordinal
        - canonical_product_id
        - canonical_product_revision
        - width_in
        - height_in
        - dpi
      properties:
        id:
          type: string
        variant_id:
          type: string
        label:
          type: string
        fulfillment_role:
          type: string
          enum:
            - artwork
            - front
            - back
        ordinal:
          type: integer
          minimum: 0
        canonical_product_id:
          type: string
        canonical_product_revision:
          type: integer
          minimum: 1
        width_in:
          type: number
          exclusiveMinimum: 0
        height_in:
          type: number
          exclusiveMinimum: 0
        dpi:
          type: number
          exclusiveMinimum: 0
      additionalProperties: false
    AspectRatio:
      type: object
      required:
        - width
        - height
      properties:
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
      additionalProperties: false
  responses:
    InvalidTemplateContractRequest:
      description: The template, output, or revision identifier was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    APIKeyAuthenticationRequired:
      description: A valid Batch Relay API key is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    APIKeyForbidden:
      description: The API key cannot perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TemplateContractNotFound:
      description: >-
        The published output contract does not exist or is not visible to the
        caller.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TemplateContractUnavailable:
      description: The authoritative template-contract bridge is not configured.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Batch Relay API key
      description: >-
        Batch Relay scoped API key, not OAuth. Scope names document required key
        capabilities.

````