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

# Quote a change

> What the change would cost and when it would take effect. Nothing is
changed. Needs `services.view`.



## OpenAPI

````yaml /api-reference/console/openapi.json post /services/{service}/changes/quote
openapi: 3.1.2
info:
  title: PerfGrid API
  version: 1.0.0
  description: >-
    The PerfGrid customer API. A member creates a token for one billing account
    under *API tokens* in the panel; it can do what both the token's permissions
    and the member's own permissions allow, the same as the panel.


    Send it as `Authorization: Bearer pgapi_...`. Each token may make 120
    requests a minute, of which 30 change something; a `429` response says when
    to try again (`Retry-After`). Ids are the ULIDs the API returns; amounts are
    decimal strings next to their currency; lists are newest first and paged
    with `cursor` (`meta.next_cursor`). Messages are in English, or Danish with
    `Accept-Language: da`.


    The same tokens work with the MCP server at `/mcp` for AI assistants.
servers:
  - url: https://console.perfgrid.com/api/v1
security:
  - http: []
tags:
  - name: Account
  - name: Invoices
  - name: Services
  - name: Domains
  - name: Support
paths:
  /services/{service}/changes/quote:
    post:
      tags:
        - Services
      summary: Quote a change
      description: |-
        What the change would cost and when it would take effect. Nothing is
        changed. Needs `services.view`.
      operationId: v1.services.changes.quote
      parameters:
        - name: service
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeServiceRequest'
      responses:
        '200':
          description: '`ServiceChangeQuoteResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ServiceChangeQuoteResource'
                required:
                  - data
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ChangeServiceRequest:
      type: object
      description: |-
        One change to a service, as the console offers it: a new package
        (`product`), new option choices (`options`), a new billing cycle
        (`cycle`), an addon to add (`addon`, with `quantity`), or an addon's
        quantity (`quantity` with `addon_service`). The ids are the ones
        `GET /services/{service}/change-options` gives; a quote says whether the
        change is possible.
      properties:
        addon_service:
          type:
            - string
            - 'null'
          description: >-
            The addon service the change is about (a quantity change); the
            service itself when left out.
          minLength: 26
          maxLength: 26
        product:
          type:
            - string
            - 'null'
          description: The package to move to.
          minLength: 26
          maxLength: 26
        options:
          type:
            - array
            - 'null'
          description: >-
            Option id => value id (select), a number (quantity) or true/false
            (yes/no). Options not given keep their choice.
          items:
            type: string
        cycle:
          anyOf:
            - $ref: '#/components/schemas/BillingCycle'
            - type: 'null'
        addon:
          type:
            - string
            - 'null'
          description: An addon to add.
          minLength: 26
          maxLength: 26
        quantity:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 1000
        promo_code:
          type:
            - string
            - 'null'
          maxLength: 64
      title: ChangeServiceRequest
    ServiceChangeQuoteResource:
      type: object
      properties:
        type:
          type: string
          enum:
            - upgrade
            - downgrade
            - option_change
            - addon_added
            - cycle_change
            - price_change
            - due_date_move
            - domain_change
            - follow_up
            - option_discount
        currency:
          type: string
        amount:
          type:
            - string
            - 'null'
        needs_payment:
          type: boolean
        effective_on:
          type:
            - string
            - 'null'
        covered_until:
          type:
            - string
            - 'null'
        promo_code:
          type:
            - string
            - 'null'
        from:
          type: object
          properties:
            product:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            addon:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            billing_cycle:
              type: string
              enum:
                - one_time
                - monthly
                - quarterly
                - semi_annually
                - annually
            price:
              type:
                - string
                - 'null'
            quantity:
              type: integer
          required:
            - product
            - addon
            - billing_cycle
            - price
            - quantity
        to:
          type: object
          properties:
            product:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            addon:
              type:
                - object
                - 'null'
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            billing_cycle:
              type: string
              enum:
                - one_time
                - monthly
                - quarterly
                - semi_annually
                - annually
            price:
              type:
                - string
                - 'null'
            quantity:
              type: integer
          required:
            - product
            - addon
            - billing_cycle
            - price
            - quantity
      required:
        - type
        - currency
        - amount
        - needs_payment
        - effective_on
        - covered_until
        - promo_code
        - from
        - to
      title: ServiceChangeQuoteResource
    BillingCycle:
      type: string
      description: >
        How often a service is billed: once (`one_time`, never renewed), or
        every month, three months, six months or year.
      enum:
        - one_time
        - monthly
        - quarterly
        - semi_annually
        - annually
      title: BillingCycle
  responses:
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: >-
        An API token from *API tokens* in the console, sent as `Authorization:
        Bearer pgapi_...`. It works for one billing account, and its permissions
        decide which endpoints it may call.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.