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

# Bulk Recalculate Material

> Recalculate material cost totals for every cost sheet that uses the provided material.



## OpenAPI

````yaml /api/openapi-cutmake.json post /costings/bulk-recalculate
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /costings/bulk-recalculate:
    post:
      tags:
        - Costing Management
      summary: Bulk Recalculate Material
      description: >-
        Recalculate material cost totals for every cost sheet that uses the
        provided material.
      operationId: bulk_recalculate_material_costings_bulk_recalculate_post
      parameters:
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRecalculateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkRecalculateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    BulkRecalculateRequest:
      properties:
        materialId:
          type: string
          title: Materialid
      additionalProperties: false
      type: object
      required:
        - materialId
      title: BulkRecalculateRequest
      description: Payload for triggering a bulk material recalc.
    BulkRecalculateResponse:
      properties:
        material_id:
          type: string
          title: Material Id
        affected_count:
          type: integer
          title: Affected Count
        cost_sheets:
          items:
            $ref: '#/components/schemas/BulkRecalculateResponseItem'
          type: array
          title: Cost Sheets
      type: object
      required:
        - material_id
        - affected_count
        - cost_sheets
      title: BulkRecalculateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkRecalculateResponseItem:
      properties:
        id:
          type: string
          title: Id
        style_name:
          type: string
          title: Style Name
        old_total:
          type: number
          title: Old Total
        new_total:
          type: number
          title: New Total
        variance:
          type: number
          title: Variance
      type: object
      required:
        - id
        - style_name
        - old_total
        - new_total
        - variance
      title: BulkRecalculateResponseItem
    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
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````