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

# Create a deliveries report template

> pdf only: `report_extension` must be `pdf`. `settings` take the generate body's keys (minus `project_id`) plus the builder's opaque `builder_tree`.



## OpenAPI

````yaml /openapi.yaml post /reports/goods_receipts_list/templates
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /reports/goods_receipts_list/templates:
    post:
      tags:
        - ReportTemplate
      summary: Create a deliveries report template
      description: >-
        pdf only: `report_extension` must be `pdf`. `settings` take the generate
        body's keys (minus `project_id`) plus the builder's opaque
        `builder_tree`.
      operationId: reports/goods_receipts_list/templates#create
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyReportTemplateCreate'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/report_template'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    requestBodyReportTemplateCreate:
      type: object
      properties:
        name:
          type: string
        report_extension:
          type: string
          enum:
            - xlsx
            - pdf
        settings:
          type: object
          description: >-
            Same shape as the corresponding report kind's create body, minus
            `template_id`. Only the settings applicable to the given
            `report_extension` are permitted (e.g. `js_report_template`,
            `used_fields`, `groups` for product_items pdf; `columns_list`,
            `filter` otherwise). pdf templates (product_items, project_items,
            cross_project_items, package_baseline_items,
            cross_project_baseline_items) also accept `builder_tree`, an opaque
            unvalidated JSON blob for a frontend visual builder's own document
            tree, stored and returned verbatim. package_baseline_items templates
            are workspace-level (no project/package baked in) and replayed
            against any package.
      required:
        - name
    report_template:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        report_kind:
          type: string
          enum:
            - projects_list
            - project_items_list
            - product_items_list
            - cross_project_items_list
            - package_baseline_items_list
            - cross_project_baseline_items_list
            - purchase_orders_list
            - goods_receipts_list
            - supplier_invoices_list
            - purchase_order_record
            - supplier_invoice_record
            - goods_receipt_record
        report_extension:
          type: string
          enum:
            - xlsx
            - pdf
        settings:
          type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - report_kind
        - report_extension
        - settings
        - created_at
        - updated_at
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.