> ## 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.

# Copy a file onto a supplier invoice



## OpenAPI

````yaml /openapi.yaml post /supplier_invoices/{supplier_invoice_id}/attachments/copy
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:
  /supplier_invoices/{supplier_invoice_id}/attachments/copy:
    post:
      tags:
        - ProcurementAttachment
      summary: Copy a file onto a supplier invoice
      operationId: supplier_invoice_attachments#copy
      parameters:
        - name: supplier_invoice_id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyAttachmentCopy'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/attachment'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    requestBodyAttachmentCopy:
      type: object
      description: One related document to copy (from `related_documents`).
      properties:
        document_type:
          type: string
          enum:
            - project_document
            - baseline_document
            - project_item_document
        document_id:
          type: integer
      required:
        - document_type
        - document_id
    attachment:
      type: object
      description: >-
        A file attached to a procurement document (purchase order, supplier
        invoice, goods receipt or inspection), a project or a baseline row.
      properties:
        id:
          type: integer
        filename:
          type: string
          description: The name the file was uploaded with.
        content_type:
          type: string
          example: application/pdf
        byte_size:
          type: integer
        url:
          type: string
          description: >-
            Download URL. On private storage a signed URL that serves the file
            inline under its filename.
        created_by_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When it was removed from its document. Documents list only files
            that are not removed; a purchase order revision lists the files it
            had, removed ones included (their `url` still works).
      required:
        - id
        - filename
        - content_type
        - byte_size
        - url
        - created_at
  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.