> ## 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 goods receipt item

> Records a delivery against a 3-way or 4-way item of an open purchase order.



## OpenAPI

````yaml /openapi.yaml post /goods_receipt_items
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:
    post:
      tags:
        - GoodsReceiptItem
      summary: Create goods receipt item
      description: >-
        Records a delivery against a 3-way or 4-way item of an open purchase
        order.
      operationId: goods_receipt_items#create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyGoodsReceiptItemCreate'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goods_receipt_item'
        '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:
    requestBodyGoodsReceiptItemCreate:
      type: object
      description: >-
        Records a delivery (or confirmed work) against a 3-way or 4-way item of
        an open purchase order. The total received, net of rejected quantity,
        can't exceed the ordered quantity plus its quantity tolerance. The
        receipt takes the purchase order item's project.
      properties:
        purchase_order_item_id:
          type: integer
          description: A purchase order item of the workspace (any project).
        received_quantity:
          type: string
          example: '400'
        received_at:
          type: string
          format: date
        notes:
          type: string
          nullable: true
      required:
        - purchase_order_item_id
        - received_quantity
        - received_at
    goods_receipt_item:
      type: object
      properties:
        id:
          type: integer
        project_id:
          type: integer
          description: The project of the receipt's purchase order item.
        purchase_order_item:
          type: object
          properties:
            id:
              type: integer
            description:
              type: string
              nullable: true
            match_type:
              type: string
              enum:
                - two_way
                - three_way
                - four_way
            purchase_order:
              type: object
              properties:
                id:
                  type: integer
                label:
                  type: string
        received_quantity:
          type: string
          example: '400.00'
        received_at:
          type: string
          format: date
        notes:
          type: string
          nullable: true
        attachments:
          type: array
          description: Delivery note, progress certificate, timesheet, ... Newest first.
          items:
            $ref: '#/components/schemas/attachment'
        inspection:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            accepted_quantity:
              type: string
            rejected_quantity:
              type: string
            inspected_at:
              type: string
              format: date
            notes:
              type: string
              nullable: true
            attachments:
              type: array
              description: Newest first.
              items:
                $ref: '#/components/schemas/attachment'
        created_by_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - project_id
        - purchase_order_item
        - received_quantity
        - received_at
        - attachments
    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
    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.