> ## Documentation index
> Fetch the complete documentation index at: https://developer.rhombus.com/llms.txt
> Use it to discover all available pages before exploring further.

# Update partner portal quote

> Save header edits and line adds, updates and deletes to a quote on an opportunity registered under the authenticated partner organization, in one transaction. expectedLastModifiedDate must be the lastModifiedDate from getQuote. Prices are pending until getQuote returns lastCalculatedOn at or after lastSavedOn; poll getQuote with backoff and a bounded number of attempts.

```http
POST https://api2.rhombussystems.com/api/partnerportal/updateQuote
```

EU organizations send the same request to `https://api2.eu.rhombussystems.com`.

## Authentication and parameters

- `x-auth-apikey` (header, required): Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
- `Authorization` (header): instead of an API key, an OAuth access token (`Bearer <token>`) with the `write` scope.
- `x-auth-scheme` (header, string, default: `partner-api-token`): Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters. One of: `api-token`, `api`, `api-oauth-token`, `federated-token`, `partner-api-token`, `partner-api`, `partner-api-oauth-token`.

## Request body

Content type: `application/json`. Request object for saving header edits and line adds, updates and deletes to a quote belonging to the authenticated partner organization, applied in one transaction. At least one change is required, and at most 200 line operations are allowed per save. Prices are recalculated asynchronously afterwards.

- `addLines` (array<object> | null): Lines to add
- `deleteLineIds` (array<string | null> | null): Identifiers of existing lines to delete
- `expectedLastModifiedDate` (string | null, required): The quote's lastModifiedDate from the most recent getQuote; the save is rejected if the quote has changed since
- `quote` (object): Quote header edits. Omitted fields, and blank address fields, are left unchanged.
- `quoteId` (string | null, required): Identifier of the Salesforce quote
- `updateLines` (array<object> | null): Existing lines to update

## Response 200

OK. Content type: `application/json`

- `addedLineIds` (array<string | null> | null): Identifiers of the lines that were added, in request order
- `deletedLineIds` (array<string | null> | null): Identifiers of the lines that were deleted
- `error` (boolean | null)
- `errorCode` (string | null): Stable, machine-readable code for the failure (one of the ApiErrorCode catalog) when error is true. Branch on this, not on errorMsg.
- `errorMsg` (string | null)
- `quoteId` (string | null): Identifier of the updated Salesforce quote
- `recalcQueued` (boolean | null): Whether a price recalculation was queued for the save
- `savedAt` (string | null): Date and time the save was recorded; prices are current once getQuote returns a lastCalculatedOn at or after this value
- `updatedLineIds` (array<string | null> | null): Identifiers of the lines that were updated
- `warningMsg` (string | null)

## Errors

Also 400, 401, 403, 429, 500, 503 with the standard error body (`errorCode`, `errorMsg`): https://developer.rhombus.com/errors

## OpenAPI

````yaml
openapi: 3.0.1
info:
  title: Rhombus API
  version: "1.0"
servers:
  - description: Production Server
    url: https://api2.rhombussystems.com
security:
  - ApiKeyAuth: []
paths:
  /api/partnerportal/updateQuote:
    post:
      description: Save header edits and line adds, updates and deletes to a quote on an opportunity registered under the authenticated partner organization, in one transaction. expectedLastModifiedDate must be the lastModifiedDate from getQuote. Prices are pending until getQuote returns lastCalculatedOn at or after lastSavedOn; poll getQuote with backoff and a bounded number of attempts.
      operationId: updateQuote
      parameters:
        - description: "Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters."
          example: partner-api-token
          in: header
          name: x-auth-scheme
          required: false
          schema:
            default: partner-api-token
            enum:
              - api-token
              - api
              - api-oauth-token
              - federated-token
              - partner-api-token
              - partner-api
              - partner-api-oauth-token
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Partnerportal_UpdatePartnerPortalQuoteWSRequest"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Partnerportal_UpdatePartnerPortalQuoteWSResponse"
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      security:
        - ApiKeyAuth: []
        - oauth2:
            - write
      summary: Update partner portal quote
      tags:
        - Partner Portal Webservice
components:
  schemas:
    Partnerportal_UpdatePartnerPortalQuoteWSRequest:
      description: Request object for saving header edits and line adds, updates and deletes to a quote belonging to the authenticated partner organization, applied in one transaction. At least one change is required, and at most 200 line operations are allowed per save. Prices are recalculated asynchronously afterwards.
      properties:
        addLines:
          description: Lines to add
          items:
            $ref: "#/components/schemas/Partnerportal_PartnerPortalQuoteLineAddType"
          nullable: true
          type: array
        deleteLineIds:
          description: Identifiers of existing lines to delete
          items:
            description: Identifiers of existing lines to delete
            nullable: true
            type: string
          nullable: true
          type: array
        expectedLastModifiedDate:
          description: The quote's lastModifiedDate from the most recent getQuote; the save is rejected if the quote has changed since
          nullable: true
          type: string
        quote:
          $ref: "#/components/schemas/Partnerportal_PartnerPortalQuoteHeaderUpdateType"
        quoteId:
          description: Identifier of the Salesforce quote
          nullable: true
          type: string
        updateLines:
          description: Existing lines to update
          items:
            $ref: "#/components/schemas/Partnerportal_PartnerPortalQuoteLineUpdateType"
          nullable: true
          type: array
      required:
        - expectedLastModifiedDate
        - quoteId
      type: object
    Partnerportal_PartnerPortalQuoteLineAddType:
      description: A line to add to a quote.
      properties:
        contractStartDate:
          description: Contract start date in yyyy-MM-dd format; only accepted for term products or trial quotes
          nullable: true
          type: string
        productCode:
          description: Product code (SKU) of an active Standard Price Book product
          nullable: true
          type: string
        quantity:
          description: Quantity
          nullable: true
          type: number
        shippingPrice:
          description: Line shipping price. Only allowed when the quote's Shipping Price Override is checked.
          nullable: true
          type: number
        subscriptionTerm:
          description: Subscription term in months; only accepted on Renewal opportunities
          format: int32
          nullable: true
          type: integer
      required:
        - productCode
        - quantity
      type: object
    Partnerportal_PartnerPortalQuoteHeaderUpdateType:
      description: Quote header edits. Omitted fields, and blank address fields, are left unchanged.
      properties:
        billAttentionTo:
          description: Bill-to attention
          nullable: true
          type: string
        billingCity:
          description: Bill-to city
          nullable: true
          type: string
        billingCountry:
          description: Bill-to country; must be a valid Salesforce Billing Country picklist value, e.g. "United States"
          nullable: true
          type: string
        billingName:
          description: Bill-to name
          nullable: true
          type: string
        billingPostalCode:
          description: Bill-to postal code
          nullable: true
          type: string
        billingState:
          description: Bill-to state; must be a valid Salesforce Billing State picklist value for the quote's billing country, e.g. "California". Required when billingCountry changes to a country that has states.
          nullable: true
          type: string
        billingStreet:
          description: Bill-to street
          nullable: true
          type: string
        shipAttentionTo:
          description: Ship-to attention
          nullable: true
          type: string
        shippingCity:
          description: Ship-to city
          nullable: true
          type: string
        shippingCountry:
          description: Ship-to country
          nullable: true
          type: string
        shippingMethod:
          description: Shipping method
          nullable: true
          type: string
        shippingName:
          description: Ship-to name
          nullable: true
          type: string
        shippingPostalCode:
          description: Ship-to postal code
          nullable: true
          type: string
        shippingPriceOverride:
          description: Whether the shipping price is overridden
          nullable: true
          type: boolean
        shippingState:
          description: Ship-to state
          nullable: true
          type: string
        shippingStreet:
          description: Ship-to street
          nullable: true
          type: string
      type: object
    Partnerportal_PartnerPortalQuoteLineUpdateType:
      description: Edits to an existing quote line. Omitted fields are left unchanged.
      properties:
        contractStartDate:
          description: Contract start date in yyyy-MM-dd format; only accepted for term products or trial quotes
          nullable: true
          type: string
        quantity:
          description: Quantity
          nullable: true
          type: number
        quoteLineId:
          description: Identifier of the Salesforce quote line to update
          nullable: true
          type: string
        shippingPrice:
          description: Line shipping price. Only allowed when the quote's Shipping Price Override is checked.
          nullable: true
          type: number
        subscriptionTerm:
          description: Subscription term in months; only accepted on Renewal opportunities
          format: int32
          nullable: true
          type: integer
      required:
        - quoteLineId
      type: object
    Partnerportal_UpdatePartnerPortalQuoteWSResponse:
      description: Response object containing the result of saving changes to a quote.
      properties:
        addedLineIds:
          description: Identifiers of the lines that were added, in request order
          items:
            description: Identifiers of the lines that were added, in request order
            nullable: true
            type: string
          nullable: true
          type: array
        deletedLineIds:
          description: Identifiers of the lines that were deleted
          items:
            description: Identifiers of the lines that were deleted
            nullable: true
            type: string
          nullable: true
          type: array
        error:
          nullable: true
          type: boolean
        errorCode:
          description: Stable, machine-readable code for the failure (one of the ApiErrorCode catalog) when error is true. Branch on this, not on errorMsg.
          nullable: true
          type: string
        errorMsg:
          nullable: true
          type: string
        quoteId:
          description: Identifier of the updated Salesforce quote
          nullable: true
          type: string
        recalcQueued:
          description: Whether a price recalculation was queued for the save
          nullable: true
          type: boolean
        savedAt:
          description: Date and time the save was recorded; prices are current once getQuote returns a lastCalculatedOn at or after this value
          nullable: true
          type: string
        updatedLineIds:
          description: Identifiers of the lines that were updated
          items:
            description: Identifiers of the lines that were updated
            nullable: true
            type: string
          nullable: true
          type: array
        warningMsg:
          nullable: true
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
      in: header
      name: x-auth-apikey
      type: apiKey
    oauth2:
      description: 'OAuth 2.0 authorization code flow with PKCE (`S256`). Send the access token as `Authorization: Bearer <token>`. Each operation lists the scopes it requires; a token without them is refused 403 with `WWW-Authenticate: Bearer error="insufficient_scope"`.'
      flows:
        authorizationCode:
          authorizationUrl: https://console.rhombus.com/oauth/authorize
          refreshUrl: https://auth-web.rhombussystems.com/oauth/token
          scopes:
            physical: Unlock doors and elevators, lockdown, alarms, speakers and robots
            read: View cameras, footage and settings
            write: Change settings and data
          tokenUrl: https://auth-web.rhombussystems.com/oauth/token
      type: oauth2
````
