Revenue Cloud API Tutorial - A Developer's Guide

Revenue Cloud API Tutorial

Revenue Cloud is API-first—everything in the UI is accessible programmatically. This guide covers authentication, key APIs, and practical examples. All verified against official documentation.

Postman Collections: There’s a Subscription Management collection in the Salesforce Platform APIs (setup guide). A comprehensive RLM collection hasn’t been published yet. Legacy CPQ has a separate collection.

Quick Reference

API Versions (minimum requirements):

API Min Version Docs
Pricing 60.0 Link
Transaction Management 60.0 Link
Product Catalog 61.0 Link
Product Configurator 61.0 Link

Endpoint Pattern: /services/data/v65.0/connect/{service}/...

  • Pricing: /connect/pricing/...
  • Quotes/Orders: /connect/qoc/...
  • Catalog: /connect/pcm/...

Authentication

Use OAuth 2.0 Bearer Token. Full documentation.

Get an access token (Username-Password flow for dev/testing):

curl -X POST https://login.salesforce.com/services/oauth2/token \
  -d "grant_type=password" \
  -d "client_id=YOUR_CONSUMER_KEY" \
  -d "client_secret=YOUR_CONSUMER_SECRET" \
  -d "username=YOUR_USERNAME" \
  -d "password=YOUR_PASSWORD_AND_SECURITY_TOKEN"

Use the token in all API calls:

Authorization: Bearer {access_token}
Flow Best For
Username-Password Dev/testing only
JWT Bearer Production server-to-server
Named Credentials Apex callouts (recommended)

Key APIs

Transaction Management (Quotes & Orders)

Create quotes/orders with integrated pricing. Docs

Create a quote:

curl -X POST https://yourinstance.salesforce.com/services/data/v65.0/connect/qoc/sales-transactions \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionType": "Quote",
    "accountId": "001XXXXXXXXXXXX",
    "pricebookId": "01sXXXXXXXXXXXX",
    "lineItems": [{"productId": "01tXXXXXXXXXXXX", "quantity": 1}]
  }'

Key endpoints:

Pricing Business APIs

Calculate prices, manage pricing recipes. Docs

Product Configurator APIs

Headless configuration with rules and instant pricing. Docs

Capabilities: load/save instances, add/update/delete nodes, rule enforcement (Validate, Exclude, Require, Auto-Add), instant pricing, custom UI support.

Product Catalog APIs

Serve catalog definitions. Docs Data Model

ConnectApi (Apex)

Native Apex access to these APIs—no auth handling needed. Docs

Rate Limits

Standard Salesforce limits apply. Full reference

Limit Value
Daily requests (Enterprise) 100K + 1K per license
Concurrent requests 25 (5 for dev orgs)
Bulk API batches/day 15,000

Check usage: GET /services/data/v65.0/limits

Apex Example

public class RevenueCloudAPI {
    public static HttpResponse callAPI(String endpoint, String body) {
        HttpRequest req = new HttpRequest();
        req.setEndpoint(URL.getOrgDomainUrl().toExternalForm() + endpoint);
        req.setMethod('POST');
        req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());
        req.setHeader('Content-Type', 'application/json');
        req.setBody(body);
        return new Http().send(req);
    }
}

For production, use Named Credentials instead of UserInfo.getSessionId().

Troubleshooting

Error Solution
401 Unauthorized Token expired—get new one
400 Bad Request Check payload structure
403 Forbidden Check permission sets
404 Not Found Verify API version and IDs

Debug checklist:

  1. Test auth: GET /services/data/v65.0/
  2. Verify API version is 60.0+
  3. Check user has Revenue Cloud permissions
  4. Use Workbench to test interactively

Resources


📅 Let's Work Together!
Revenue Cloud API Tutorial - A Developer's Guide
Older post

Product Configurator in Salesforce Revenue Cloud Advanced (RLM)

Learn how to customize Salesforce RLM's Product Configurator, from modifying flows to assigning them to products, for a tailored and efficient configuration process.

Newer post

Revenue Cloud Developer Roadmap - Skills You Actually Need

A practical guide to the skills needed for Salesforce Revenue Cloud work. Focus on what matters in real implementations, not certification checklists.

Revenue Cloud API Tutorial - A Developer's Guide