Source Collector API Configuration

Modified on Fri, 12 Jun at 11:14 AM

Overview

The Source Collector API, sc.varibill.com, allows billing data to be submitted into Varibill from external systems or custom Source Collectors.

This article is specific to the Source Collector API sc.varibill.com and should not be confused with the main Varibill API, api.varibill.com.

Source Collectors define how billing data is retrieved or received. Product-level configuration in Varibill determines how that data is processed for billing.

Use this article to understand the base endpoint, authentication requirements, and key setup areas required before submitting data through the Source Collector API.

Base Endpoint

https://sc.varibill.com

Before You Begin

  • Ensure that you have access to the relevant Varibill environment
  • Ensure that a Source Collector has been configured in Varibill
  • Retrieve the required credentials from the Source Collector configuration
  • If testing in staging:
    • Confirm whether your Tenant exists in staging
    • If not, log a request with Varibill Support to provision staging access

Note: For setup instructions, please refer to Configuring a New Source Collector

Where to Find Source Collector API Credentials

The Tenant Key, Source Collector Key, and Source Collector Secret are available from the relevant Source Collector configuration in the Varibill User Interface.

To find these details:

  1. Navigate to Billing DataSource Collector.
  2. Open the relevant Source Collector.
  3. Scroll to the API Authentication Details section.
  4. Copy the required values:
    • Tenant Key
    • Source Collector Key
    • Source Collector Secret
API Authentication Details Window
API Authentication Details Window

These credentials are specific to the selected Source Collector and environment.

Tip: The Source Key and Source Secret can be regenerated using the Regenerate button to the right of each field. Use this option when credentials need to be rotated or are no longer considered secure. After regenerating a Key or Secret, update any integrations that use the previous values.

How Authentication Works

The Source Collector API uses Basic Authentication.

  • Username = TenantKey#SourceCollectorKey
  • Password = SourceCollectorSecret

Available Endpoints

GET /api/v1/SourceCollectors

Returns Source Collector information.

POST /api/v1/SourceCollectors/Rated

Creates new rated records. Use when data already includes monetary values (cost, price, charge).

POST /api/v1/SourceCollectors/Unrated

Creates new unrated records. Use when submitting quantities or usage data where pricing is applied within Varibill.

Request Structure

Requests must contain an array of records. Each object in the array represents a single data record.

Example Payload (Rated)

The example shown below is for a Rated payload. An Unrated payload will exclude Cost and Total.

[
  {
    "ClientIdentifier": "ExampleClient",
    "ProductIdentifier": "ExampleProduct",
    "Quantity": 3.0,
    "Cost": 10.0,
    "Total": 20.0,
    "LastSeenDate": "2026-04-22T00:00:00",
    "RecordIdentifier": "Record1",
    "Tag": "ExampleTag",
    "UniqueIdentifier": "Unique1"
  }
]

Using Postman

  • Set method to POST
  • Enter the endpoint URL
  • Under Authorization:
    • Type: Basic Authentication
    • Username: TenantKey#SourceCollectorKey
    • Password: SourceCollectorSecret
  • Set body to raw JSON
  • Send request
  • Response Handling

Successful responses return:

[
  {
    "Successful": true,
    "Message": "...",
    "ValidationResults": []
  }
]

Validating Submitted Data

After submitting data, collected data can be validated using either of the following methods.

  1. Through the Source Collector Editor page:
    1. From Billing Data > Source Collector, open the relevant Source Collector.
    2. Scroll to Batches.
    3. Review the batch status, date, and record counts.
    4. Confirm that the expected Rated Records and Unrated Records counts are displayed.
  2. Through the Source Data page:
    1. From Billing Data > Source Data, open the Source Data page.
    2. Select the relevant Source Collector from the Source Collector drop-down in the top menu.
    3. Select a date range that includes the period in which the submitted data is expected to appear.
    4. Search or filter the grid further, if needed, to locate the submitted records.
    5. Review the displayed source data to confirm that the expected records were submitted successfully.

Before moving to production:

  • Confirm whether your Tenant is available in the staging environment
  • If not, log a request with Varibill
  • Once provisioned, use the staging API endpoint
  • Authenticate using staging credentials
  • Submit test data and verify results in the staging UI

Batching and Record Limits

Each request can contain multiple records.

  • Each object in the request array counts as one record
  • A single request can contain up to 50,000 records

Batching allows efficient submission of large datasets in a single API call.

401 Unauthorized

Important! If you receive a 401 Unauthorized response:

  • Verify username format: TenantKey#SourceCollectorKey
  • Confirm correct SourceCollectorSecret
  • Ensure credentials match the correct environment (staging vs production)

Data Not Appearing in Source Data

Important!

  • Confirm correct Source Collector is referenced
  • Validate payload structure

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article