Reporting API v1/v2 - price per component

Appxite

Introduction

This article explains the Price per Component Reporting API extensions that provide invoice reporting capabilities for offers configured with multiple product components. These API enable developers to retrieve detailed component-level pricing information from invoices, supporting better integration with billing systems and improved pricing transparency for complex product structures.

The API extensions complement the existing Price per Component UI feature, which allows configuring offers with multiple product components, such as storage, CPU, network, and memory, to be displayed as separate line items in invoices with individual pricing.

In this article:

API Overview

The Price per Component Reporting API provides extensions across two main API versions:

  1. Version 1 APIs - Invoice-Rows and Offers endpoints with component identification and naming
  2. Version 2 APIs - Invoice-Rows endpoints for requester and partner-specific reporting

Version 1 API Extensions

Invoice Endpoints

Endpoints:

  • GET /api/v1/reporting/invoices/invoice-rows/{requesterId}
  • GET /api/v1/reporting/invoices/invoice-rows/{requesterId}/preview

Response Fields:

The following fields are added to the response schema:

  • offerComponentId - Unique ID (GUID) of the offer component billed in the invoice row
    • Used for internal logic/UI mapping (not displayed in UI)
  • offerComponentName - Name of the offer component
    • Maps to UI column "Component" under Billings

Field Population Logic:

  • If OfferComponentId is valid, include OfferComponentName
  • If OfferComponentId is null or not found, OfferComponentName is null
  • Component name appears in the "Component" column in the Billings UI

Example Response:

  1. GET /api/v1/reporting/invoices/invoice-rows/{requesterId}
  2. GET /api/v1/reporting/invoices/invoice-rows/{requesterId}/preview

    Corresponding data in the Platform

    Response is matching given fields from the Billings section in the platform:

Offers Endpoint

Endpoint:

  • GET /api/v1/reporting/offers/{requesterId}

Response Fields:

  • pricePerComponentEnabled - Boolean flag indicating if price breakdown by components is enabled for the offer
    • Maps to Appxite Product Management → Offer → "Display Price Components" toggle, for example:

Implementation:

This field allows API consumers to determine whether an offer has component-level pricing enabled, helping to identify which offers will provide detailed component information in invoice reporting.

Example Response:

Version 2 API Extensions

Invoice-Rows Endpoints

Endpoints:

  • GET /api/v2/reporting/requesters/{requesterId}/invoices/row
  • GET/api/v2/reporting/requesters/{requesterId}/partners/{partnerId}/invoices/rows

Response Fields:

The same fields as Version 1 Invoice-Rows endpoints are added:

  • offerComponentId - Component unique identifier (GUID)
  • offerComponentName - Component display name

Field Population Logic:

Both endpoints follow the same field population logic as the v1 APIs:

  • If OfferComponentId is valid, include OfferComponentName
  • If OfferComponentId is null or not found, OfferComponentName is null
  • Component name maps to UI column "Component" under Billings

Example Response for Requester Invoice Rows:

Corresponding data in Platform

Response is matching given fields from the Billings section in the platform:

Example Response for Partner Invoice Rows:

Corresponding data in Platform

Response is matching given fields from the Billings section in the platform:

Limitations

  • Data Dependency: Component information is only available for offers where the Price per Component feature is enabled
  • Historical Data: Component information may not be available for invoices created before the feature was enabled for an offer

Summary

The Price per Component Reporting API extensions provide comprehensive access to component-level pricing information across both Version 1 and Version 2 invoice reporting endpoints. These enable developers to build more detailed billing integrations while maintaining full backward compatibility with existing implementations.

The API fields work seamlessly with the Price per Component UI feature, ensuring consistent component reporting across both user interfaces and programmatic access. Organizations can provide clearer cost breakdowns and improved pricing transparency for complex product structures through both UI and API channels.

Related Content

Was this article helpful?

0 out of 0 found this helpful

Add comment

Please sign in to leave a comment.