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

# List Material Requests

> List material requests with pagination.



## OpenAPI

````yaml /api/openapi-cutmake.json get /api/v1/material-requests
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/material-requests:
    get:
      tags:
        - Material Requests
      summary: List Material Requests
      description: List material requests with pagination.
      operationId: list_material_requests_api_v1_material_requests_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: urgency
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Urgency
        - name: productionOrderId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by production order ID
            title: Productionorderid
          description: Filter by production order ID
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: submittedFrom
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Submittedfrom
        - name: submittedTo
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Submittedto
        - name: sort
          in: query
          required: false
          schema:
            type: string
            default: '-created_at'
            title: Sort
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMaterialRequestsResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PaginatedMaterialRequestsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/MaterialRequestResponse'
          type: array
          title: Data
        pagination:
          $ref: >-
            #/components/schemas/routers__external__material_requests__PaginationInfo
      type: object
      required:
        - data
        - pagination
      title: PaginatedMaterialRequestsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MaterialRequestResponse:
      properties:
        id:
          type: string
          title: Id
        documentId:
          type: string
          title: Documentid
        urgency:
          anyOf:
            - type: string
            - type: 'null'
          title: Urgency
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        productionOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderdocumentid
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderdocumentid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderdocumentid
        status:
          type: string
          title: Status
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        submittedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Submittedat
        approvedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Approvedat
        rejectedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectedat
        submittedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Submittedbyid
        submittedByName:
          anyOf:
            - type: string
            - type: 'null'
          title: Submittedbyname
        approvedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Approvedbyid
        approvedByName:
          anyOf:
            - type: string
            - type: 'null'
          title: Approvedbyname
        rejectedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectedbyid
        rejectedByName:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectedbyname
        rejectionReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectionreason
        bomId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomid
        bomDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomdocumentid
        wastagePercent:
          anyOf:
            - type: number
            - type: 'null'
          title: Wastagepercent
        autoGenerated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Autogenerated
        lineItemsCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lineitemscount
        totalEstimatedAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalestimatedamount
        production_order:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Production Order
        purchase_order:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Purchase Order
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/MaterialRequestLineItem'
              type: array
            - type: 'null'
          title: Lineitems
        approvalHistory:
          anyOf:
            - items:
                $ref: '#/components/schemas/MaterialRequestApprovalHistory'
              type: array
            - type: 'null'
          title: Approvalhistory
        linkedPurchaseOrders:
          anyOf:
            - items:
                $ref: '#/components/schemas/MaterialRequestLinkedPurchaseOrder'
              type: array
            - type: 'null'
          title: Linkedpurchaseorders
      type: object
      required:
        - id
        - documentId
        - status
      title: MaterialRequestResponse
    routers__external__material_requests__PaginationInfo:
      properties:
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        total:
          type: integer
          title: Total
        totalPages:
          type: integer
          title: Totalpages
        hasNext:
          type: boolean
          title: Hasnext
        hasPrev:
          type: boolean
          title: Hasprev
      type: object
      required:
        - page
        - limit
        - total
        - totalPages
        - hasNext
        - hasPrev
      title: PaginationInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MaterialRequestLineItem:
      properties:
        id:
          type: string
          title: Id
        materialRequestId:
          type: string
          title: Materialrequestid
        itemNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Itemnumber
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialName:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialname
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        supplierName:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliername
        requiredQty:
          type: number
          title: Requiredqty
        warehouseAvailableQty:
          type: number
          title: Warehouseavailableqty
        qtyToPurchase:
          type: number
          title: Qtytopurchase
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        unitPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitprice
        estimatedAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Estimatedamount
        linkedPoLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedpolineid
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      required:
        - id
        - materialRequestId
        - requiredQty
        - warehouseAvailableQty
        - qtyToPurchase
      title: MaterialRequestLineItem
    MaterialRequestApprovalHistory:
      properties:
        id:
          type: string
          title: Id
        materialRequestId:
          type: string
          title: Materialrequestid
        action:
          type: string
          title: Action
        status:
          type: string
          title: Status
        performedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Performedbyid
        performedByName:
          anyOf:
            - type: string
            - type: 'null'
          title: Performedbyname
        performedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Performedat
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        comments:
          anyOf:
            - type: string
            - type: 'null'
          title: Comments
      type: object
      required:
        - id
        - materialRequestId
        - action
        - status
      title: MaterialRequestApprovalHistory
    MaterialRequestLinkedPurchaseOrder:
      properties:
        id:
          type: string
          title: Id
        documentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentid
        supplierName:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliername
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        total:
          anyOf:
            - type: number
            - type: 'null'
          title: Total
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        linkedMrId:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedmrid
      type: object
      required:
        - id
      title: MaterialRequestLinkedPurchaseOrder
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````