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

# Attach a file to a goods receipt

> Uploads one file — delivery note, progress certificate, timesheet (PDF, image, Word, Excel or CSV, up to 25 MB, at most 20 per receipt). Refused once the purchase order is voided.



## OpenAPI

````yaml /openapi.yaml post /goods_receipt_items/{goods_receipt_item_id}/attachments
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:
  /goods_receipt_items/{goods_receipt_item_id}/attachments:
    post:
      tags:
        - ProcurementAttachment
      summary: Attach a file to a goods receipt
      description: >-
        Uploads one file — delivery note, progress certificate, timesheet (PDF,
        image, Word, Excel or CSV, up to 25 MB, at most 20 per receipt). Refused
        once the purchase order is voided.
      operationId: goods_receipt_item_attachments#create
      parameters:
        - name: goods_receipt_item_id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
                - file
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/attachment'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          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:
    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
    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.