Salesforce Calculate API

The Calculate API from Salesforce — 1 operation(s) for calculate.

Operations 1

POST /data/v64.0/commerce/pricing/salestransaction/actions/calculate-price Salesforce Calculate Price (new Sale) #

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/salesforce-calculate-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

salesforce-calculate-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Salesforce Calculate API
  description: 'Find the resources you need to start building. '
  contact: {}
  version: '1.0'
servers:
- url: https://login.salesforce.com
  variables: {}
- url: https://id
  variables: {}
- url: https://services
  variables: {}
- url: '{{url}}{{site}}/services/oauth2'
  variables:
    url:
      default: DefaultParameterValue
    site:
      default: DefaultParameterValue
security:
- oauth2:
  - api
tags:
- name: Calculate
paths:
  /data/v64.0/commerce/pricing/salestransaction/actions/calculate-price:
    parameters: []
    post:
      tags:
      - Calculate
      summary: Salesforce Calculate Price (new Sale)
      description: 'Calculate the price of a new sale that contains two order items: a term-defined subscription order for a bronze-level SLA, and an evergreen subscription order for a virtual router. The payload for the term-defined order contains both a start date and an end date. Instead of an end date, you can also include a start date and a subscription term.


        See [Calculate Price](https://developer.salesforce.com/docs/revenue/subscription-management/references/prices?meta=Summary).'
      operationId: CalculatePrice(NewSale)
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CalculatePriceNewSaleRequest'
              - examples:
                - listPricebookId: '{{standardPricebook}}'
                  pricingFlow: GET_PRICE_USING_CONTEXT
                  graph:
                    graphId: '1'
                    records:
                    - referenceId: ref_sales_txn
                      record:
                        attributes:
                          type: SalesTransactionShape
                        CurrencyIsoCode: USD
                    - referenceId: Item_1_Evergreen
                      record:
                        attributes:
                          type: SalesTransactionItemShape
                        SalesTransactionShapeId: '@{ref_sales_txn.Id}'
                        StartDate: '2023-01-01T00:00:00.000Z'
                        ProductId: '{{SLA_BronzeProduct}}'
                        ProductSellingModelId: '{{EvergreenMonthlyPSM}}'
                        Quantity: 3
                        PricingTransactionType: NewSale
                        CurrencyIsoCode: USD
                    - referenceId: Item_2_Termed
                      record:
                        attributes:
                          type: SalesTransactionItemShape
                        SalesTransactionShapeId: '@{ref_sales_txn.Id}'
                        StartDate: '2023-01-01T00:00:00.000Z'
                        EndDate: '2023-12-31T00:00:00.000Z'
                        ProductId: '{{VirtualRouterProduct}}'
                        ProductSellingModelId: '{{TermMonthlyPSM}}'
                        Quantity: 100
                        PricingTransactionType: NewSale
                        CurrencyIsoCode: USD
              contentMediaType: application/json
            example:
              listPricebookId: '{{standardPricebook}}'
              pricingFlow: GET_PRICE_USING_CONTEXT
              graph:
                graphId: '1'
                records:
                - referenceId: ref_sales_txn
                  record:
                    attributes:
                      type: SalesTransactionShape
                    CurrencyIsoCode: USD
                - referenceId: Item_1_Evergreen
                  record:
                    attributes:
                      type: SalesTransactionItemShape
                    SalesTransactionShapeId: '@{ref_sales_txn.Id}'
                    StartDate: '2023-01-01T00:00:00.000Z'
                    ProductId: '{{SLA_BronzeProduct}}'
                    ProductSellingModelId: '{{EvergreenMonthlyPSM}}'
                    Quantity: 3
                    PricingTransactionType: NewSale
                    CurrencyIsoCode: USD
                - referenceId: Item_2_Termed
                  record:
                    attributes:
                      type: SalesTransactionItemShape
                    SalesTransactionShapeId: '@{ref_sales_txn.Id}'
                    StartDate: '2023-01-01T00:00:00.000Z'
                    EndDate: '2023-12-31T00:00:00.000Z'
                    ProductId: '{{VirtualRouterProduct}}'
                    ProductSellingModelId: '{{TermMonthlyPSM}}'
                    Quantity: 100
                    PricingTransactionType: NewSale
                    CurrencyIsoCode: USD
        required: true
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Graph2:
      title: Graph2
      required:
      - graphId
      - records
      type: object
      properties:
        graphId:
          type: string
          example: '500123'
        records:
          type: array
          items:
            $ref: '#/components/schemas/Record16'
          description: ''
          example: []
      examples:
      - graphId: '1'
        records:
        - referenceId: ref_sales_txn
          record:
            attributes:
              type: SalesTransactionShape
            CurrencyIsoCode: USD
        - referenceId: Item_1_Evergreen
          record:
            attributes:
              type: SalesTransactionItemShape
            SalesTransactionShapeId: '@{ref_sales_txn.Id}'
            StartDate: '2023-01-01T00:00:00.000Z'
            ProductId: '{{SLA_BronzeProduct}}'
            ProductSellingModelId: '{{EvergreenMonthlyPSM}}'
            Quantity: 3
            PricingTransactionType: NewSale
            CurrencyIsoCode: USD
        - referenceId: Item_2_Termed
          record:
            attributes:
              type: SalesTransactionItemShape
            SalesTransactionShapeId: '@{ref_sales_txn.Id}'
            StartDate: '2023-01-01T00:00:00.000Z'
            EndDate: '2023-12-31T00:00:00.000Z'
            ProductId: '{{VirtualRouterProduct}}'
            ProductSellingModelId: '{{TermMonthlyPSM}}'
            Quantity: 100
            PricingTransactionType: NewSale
            CurrencyIsoCode: USD
    Attributes3:
      title: Attributes3
      required:
      - type
      type: object
      properties:
        type:
          type: string
          example: example_value
      examples:
      - type: Account
    Record17:
      title: Record17
      required:
      - attributes
      - CurrencyIsoCode
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/Attributes3'
        CurrencyIsoCode:
          type: string
          example: example_value
        SalesTransactionShapeId:
          type: string
          example: '500123'
        StartDate:
          type: string
          example: example_value
        ProductId:
          type: string
          example: '500123'
        ProductSellingModelId:
          type: string
          example: '500123'
        Quantity:
          type: number
          example: 42.5
        PricingTransactionType:
          type: string
          example: example_value
        EndDate:
          type: string
          example: example_value
      examples:
      - attributes:
          type: SalesTransactionShape
        CurrencyIsoCode: USD
    Record16:
      title: Record16
      required:
      - referenceId
      - record
      type: object
      properties:
        referenceId:
          type: string
          example: '500123'
        record:
          $ref: '#/components/schemas/Record17'
      examples:
      - referenceId: ref_sales_txn
        record:
          attributes:
            type: SalesTransactionShape
          CurrencyIsoCode: USD
    CalculatePriceNewSaleRequest:
      title: CalculatePriceNewSaleRequest
      required:
      - listPricebookId
      - pricingFlow
      - graph
      type: object
      properties:
        listPricebookId:
          type: string
          example: '500123'
        pricingFlow:
          type: string
          example: example_value
        graph:
          $ref: '#/components/schemas/Graph2'
      examples:
      - listPricebookId: '{{standardPricebook}}'
        pricingFlow: GET_PRICE_USING_CONTEXT
        graph:
          graphId: '1'
          records:
          - referenceId: ref_sales_txn
            record:
              attributes:
                type: SalesTransactionShape
              CurrencyIsoCode: USD
          - referenceId: Item_1_Evergreen
            record:
              attributes:
                type: SalesTransactionItemShape
              SalesTransactionShapeId: '@{ref_sales_txn.Id}'
              StartDate: '2023-01-01T00:00:00.000Z'
              ProductId: '{{SLA_BronzeProduct}}'
              ProductSellingModelId: '{{EvergreenMonthlyPSM}}'
              Quantity: 3
              PricingTransactionType: NewSale
              CurrencyIsoCode: USD
          - referenceId: Item_2_Termed
            record:
              attributes:
                type: SalesTransactionItemShape
              SalesTransactionShapeId: '@{ref_sales_txn.Id}'
              StartDate: '2023-01-01T00:00:00.000Z'
              EndDate: '2023-12-31T00:00:00.000Z'
              ProductId: '{{VirtualRouterProduct}}'
              ProductSellingModelId: '{{TermMonthlyPSM}}'
              Quantity: 100
              PricingTransactionType: NewSale
              CurrencyIsoCode: USD
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: '{DefaultParameterValue}{DefaultParameterValue}/services/oauth2/authorize'
          scopes:
            api: ''