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

# Refresh Proposal Item Costs

> POST /public/proposals/{ProposalId}/items/costupdate — Re-reads supplier costs for every item in a proposal from the catalog. Takes no request body.

Re-reads catalog data for the proposal's `Part` items. Use it after supplier pricing changes upstream and the proposal has gone stale — the per-item `costUpdateDate` tells you how old the numbers are.

For each part it re-reads the supplier cost, the in-stock flag, and the MSRP. Where the part's supplier is set to use a future cost, that is the figure applied. An item with no supplier assigned picks up the part's default supplier and its cost.

Items carrying a hand-entered amount are skipped outright — the refresh leaves their cost, stock flag, and MSRP exactly as they are. An item is marked that way as soon as a cost or an MSRP is written on it, including through [update cost](/api-reference/proposals/items/update-item-cost) and [update MSRP](/api-reference/proposals/items/update-item-msrp), so refreshing will never overwrite a price your integration set on purpose.

Costs are also only re-read for suppliers whose pricing your account is allowed to see. Where it is not, the cost and `costUpdateDate` are left unchanged — but the item is not skipped the way a hand-entered one is: its in-stock flag is still cleared and its MSRP is still refreshed from the catalog.

`Labor`, `CustomItem`, and `Fee` items are not touched, and neither are sell prices. The proposal id goes in the path and the request takes no body. This is proposal-wide: there is no per-item variant and no way to limit it to one area option.

<Note>
  Success is an empty `200` or `204`. Along with [delete items](/api-reference/proposals/items/delete-items), this is one of two item endpoints with no response body, so call [get proposal](/api-reference/proposals/get-proposal) afterwards to read the new values.
</Note>

Where margin is set as a percentage of cost, refreshed costs move those prices too — see [reading proposal items](/concepts/proposal-item-model#percentage-pricing-is-dynamic).

<Snippet file="hmac-signing.mdx" />


## OpenAPI

````yaml POST /public/proposals/{ProposalId}/items/costupdate
openapi: 3.1.1
info:
  title: Portal.io Public API
  version: '1.0'
servers:
  - url: https://sandbox.api.portal.io/
security:
  - mssApiAppId: []
    mssApiUserKey: []
    mssCustomDate: []
    mssSignature: []
paths:
  /public/proposals/{ProposalId}/items/costupdate:
    post:
      tags:
        - Proposals/Item
      summary: Refresh Proposal Item Costs
      description: >-
        Refreshes item costs across the whole proposal from the catalog. There
        is no request body. Only Part items are refreshed. An item is skipped
        entirely once its cost or MSRP has been set on it directly, including
        through the cost and msrp endpoints - it keeps its cost, in-stock flag
        and MSRP. For the others, all three are re-read from the catalog. The
        part's future cost is used when its supplier is set to use it. An item
        with no supplier picks up the part's default supplier. Succeeds with an
        empty 200 or 204, so re-fetch the proposal to read the new values.
      operationId: postPublicProposalsByProposalIdItemsCostupdate
      parameters:
        - name: ProposalId
          in: path
          required: true
          explode: true
          schema:
            type: integer
            description: Unique ID of the proposal (not the proposal number).
            format: int32
            x-default: 11538
        - $ref: '#/components/parameters/Accept'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicProposalItemsCostRefreshRequest'
      responses:
        '200':
          description: Success
          content:
            application/json: {}
        '204':
          description: No Content
          content:
            application/json: {}
        '401':
          description: >-
            Not Authorized. Ensure a valid session cookie or HMAC authentication
            headers are provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                responseStatus:
                  errorCode: Unauthorized
                  message: >-
                    Not Authorized. Ensure a valid session cookie or HMAC
                    authentication headers are provided.
        '402':
          description: >-
            The dealer's subscription is inactive or expired. An active
            subscription is required to use this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                responseStatus:
                  errorCode: PaymentRequired
                  message: >-
                    The dealer's subscription is inactive or expired. An active
                    subscription is required to use this endpoint.
        '403':
          description: You do not have permission for this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                responseStatus:
                  errorCode: Forbidden
                  message: You do not have permission for this action.
        '404':
          description: Proposal not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                responseStatus:
                  errorCode: NotFound
                  message: Proposal not found.
        '409':
          description: Proposal is in a state that does not allow editing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                responseStatus:
                  errorCode: Conflict
                  message: Proposal is in a state that does not allow editing.
components:
  parameters:
    Accept:
      name: Accept
      in: header
      description: Accept Header
      required: true
      schema:
        enum:
          - application/json
        type: string
  schemas:
    PublicProposalItemsCostRefreshRequest:
      title: PublicProposalItemsCostRefreshRequest
      type: object
      description: Proposals Service
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        responseStatus:
          $ref: '#/components/schemas/ResponseStatus'
      description: ErrorResponse
    ResponseStatus:
      title: ResponseStatus
      type: object
      properties:
        errorCode:
          type:
            - 'null'
            - string
        message:
          type:
            - 'null'
            - string
        stackTrace:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResponseError'
        meta:
          title: DictionaryOfStringAndString
          type:
            - 'null'
            - object
          additionalProperties:
            type:
              - 'null'
              - string
      description: ResponseStatus
    ResponseError:
      title: ResponseError
      type: object
      properties:
        errorCode:
          type:
            - 'null'
            - string
        fieldName:
          type:
            - 'null'
            - string
        message:
          type:
            - 'null'
            - string
        meta:
          title: DictionaryOfStringAndString
          type:
            - 'null'
            - object
          additionalProperties:
            type:
              - 'null'
              - string
      description: ResponseError
  securitySchemes:
    mssApiAppId:
      type: apiKey
      description: >-
        Portal application identifier used as part of HMAC-authenticated API
        requests.
      name: X-MSS-API-APPID
      in: header
    mssApiUserKey:
      type: apiKey
      description: Portal user API key used together with the HMAC signature headers.
      name: X-MSS-API-USERKEY
      in: header
    mssCustomDate:
      type: apiKey
      description: >-
        Timestamp header included in the signed request to prevent replay
        attacks.
      name: X-MSS-CUSTOM-DATE
      in: header
    mssSignature:
      type: apiKey
      description: >-
        HMAC-SHA256 signature for the request, calculated over the canonical
        string defined in the authentication docs.
      name: X-MSS-SIGNATURE
      in: header

````