Knowledge Base

Billing Line Details API Details

Billing Line Details API Details

API

Details

GET /api/resellers/{resellerId}/billing/reports/BillingLineDetails

Returns detailed, paginated billing lines.

Additional Info

  • When splitByCostCenter is false (the default), costCenters is null . It is only returned as an array when splitByCostCenter=true.

  • The response model is fixed. Every field is always present in the schema; non-applicable fields are returned as null/empty rather than omitted.


Request Details

Parameter

In

Type

Required

Description

resellerId

path

GUID

Yes

Reseller identifier.

startDate

query

date

Yes

  • Start of billing period (inclusive).

    • YYYY-MM-DD

endDate

query

date

Yes

  • End of billing period (inclusive).

    • YYYY-MM-DD

organizationIds

query

GUID[]

No

Filter by organization. Repeatable.

organizationGroupIds

query

GUID[]

No

Filter by organization group. Repeatable.

serviceIds

query

GUID[]

No

Filter by service. Repeatable.

splitByCostCenter

query

boolean

No

When true, populates the costCenters breakdown per line. Default is false.

convertToCurrency

query

string

No

If convertToCurrency is omitted, amounts are returned in the default sales/cost currency. If supplied, it must be a valid 3-letter ISO 4217 code.

pageToken

header

string

No

Page token from a previous response's nextPageToken header. See pagination section for more details in the API Guide for Billing Integration.

Response Details

Field

Type

Description

billingLineId

GUID

Unique identifier of the billing line.

billingDate

date

Date the billing was generated for this line (varies by service).

serviceId

GUID

Identifier of the service the line belongs to.

serviceName

string

Name of the service.

organizationId

GUID

Identifier of the end-customer organization being billed.

organizationName

string

Display name of the organization being billed.

customerNumber

string

Reseller assigned customer number for the organization.

productId

string

The product identifier.

productName

string

Name of the product.

itemCode

string

Vendor item/SKU code for the billed item.

quantity

decimal

Number of units / licenses / seats billed on this line.

unitCostPrice

decimal

Cost price per unit.

unitSalesPrice

decimal

Sales price per unit.

unitRecommendedPrice

decimal

The recommended sales price per unit.

totalCost

decimal

Total reseller cost for the line (quantity × unitCostPrice).

totalSales

decimal

Total customer price for the line (quantity × unitSalesPrice).

totalRecommendedPrice

decimal

Total recommended price (quantity × unitRecommendedPrice).

totalDifferenceFromRecommended

decimal

How far the actual sales price deviates from the recommended (totalSales − totalRecommendedPrice).

marginAmount

decimal

Gross margin (totalSales − totalCost).

marginPercentage

decimal

Margin as a percentage of sales ((totalSales − totalCost) / totalSales × 100).

priceLevel

int

Pricing level applied to the line from the Cloudmore pricing configuration.

Value

Name

Description

null / 0

Not Set

Not determined.

1

Default

The vendor/seller recommended price.

2

Broker

Price set at the reseller/broker level.

3

Organization

Price set at the end-customer organization level.

4

Subscription

Price set on the individual subscription.

5

Broker Level Price Adjustment

A margin/adjustment applied at broker level.

6

Organization Level Price Adjustment

A margin/adjustment applied at org level.

priceRuleType

int

Type of pricing rule that produced the price.

Value

Name

Description

null / 0

Not Set

Not determined.

1

Recommended

Price follows the vendor's recommended price.

3

Fixed Margin on Cost

A fixed margin % added on top of the cost price

4

Discount on Recommended

A discount % applied to the recommended price

5

Fixed Price

A fixed price set manually.

costCurrencyCode

string

Currency of the cost price.

salesCurrencyCode

string

Currency of the sales price.

subscriptionPeriod

string

  • Term/commitment length of the subscription.

    • 1 Month

    • 3 Months

    • 1 Year

    • 3 Years

    • 4 Years

    • 5 Years

paymentFrequency

string

  • How often the subscription is billed

    • One-time

    • Monthly

    • Every 3 months

    • Every 6 months

    • Annual

    • Every 2 years

    • Every 3 years

    • Every 4 years

    • Every 5 years

purchaseOrderNumber

string

Optional purchase order number set by the reseller on the subscription.

subscriptionId

GUID

Identifier of the subscription the line belongs to.

subscriptionName

string

Friendly name of the subscription.

billingLineDetails

string

Human readable description of the charge.

organizationGroups

string[]

Names of the organization groups the organization belongs to.

organizationRegistrationNumber

string

Company registration number of the organization.

primaryDomain

string

Primary domain of the organization.

chargeType

string

Type of charge that generated the line (e.g. new, addQuantity, cycleCharge).

chargeStartDate

date

Start of the period the charge covers.

chargeEndDate

date

End of the period the charge covers.

tenantId

string

Vendor tenant identifier (e.g. the Microsoft tenant) associated with the line.

invoiceId

string

Vendor invoice identifier the line originated from.

invoiceDate

date

Date of the vendor invoice.

vendorPricingTags

string[]

Human readable tags explaining how the price was derived (discounts, FX conversion, price guarantees, term pricing, etc.).

customProperties

object[]

Custom name/value properties defined on the subscription.

costCenters

object[]

Per-cost-center breakdown of this line. null unless splitByCostCenter=true.

costCenters[] object fields

Field

Type

Description

costCenterId

GUID

Identifier of the cost center.

costCenterName

string

Name of the cost center.

quantity

decimal

Portion of the line's quantity attributed to this cost center.

totalCost

decimal

Cost attributed to this cost center.

totalSales

decimal

Sales attributed to this cost center.

totalMarginAmount

decimal

Margin (totalSales − totalCost) for this cost center.

totalRecommendedPrice

decimal

Recommended price for the attributed portion.

totalDifferenceFromRecommended

decimal

Difference from recommended for the attributed portion.

Response Example

This is an example with all line items populated and is not representative of real billing data. The purpose is to show what the data could possibly look like. Not all services will return data for a field. For example, vendorPricingTags may be populated for Azure Consumption billing but not for Custom Services.

[
  {
    "billingLineId": "7f3c9a2e-4b81-4d6a-9c5f-2e8b1a0d3c47",
    "billingDate": "2026-01-06",
    "serviceId": "b1e4a8d2-9f37-4c6b-a1d8-5e2f9c0b3a76",
    "serviceName": "Microsoft 365 CSP Direct",
    "organizationId": "3d9f7c1a-6b24-4e8d-bf52-9a1c4e7b2d80",
    "organizationName": "Brightwave Media AB",
    "customerNumber": "SE-100482",
    "productId": "CFQ7TTC0LCHC",
    "productName": "Microsoft 365 Business Premium",
    "itemCode": "CFQ7TTC0LCHC:0001:P1Y:Annual",
    "quantity": 25.0,
    "unitCostPrice": 187.50,
    "unitSalesPrice": 225.00,
    "unitRecommendedPrice": 210.00,
    "totalCost": 4687.50,
    "totalSales": 5625.00,
    "totalRecommendedPrice": 5250.00,
    "totalDifferenceFromRecommended": 375.00,
    "marginAmount": 937.50,
    "marginPercentage": 16.67,
    "priceLevel": 3,
    "priceRuleType": 1,
    "costCurrencyCode": "SEK",
    "salesCurrencyCode": "SEK",
    "subscriptionPeriod": "1 Year",
    "paymentFrequency": "Annual",
    "purchaseOrderNumber": "PO-2026-0042",
    "subscriptionId": "e8a2f5c9-1d47-4b3a-8e6f-2c9b5a1d7f04",
    "subscriptionName": "Microsoft 365 Business Premium",
    "billingLineDetails": "renew. From 01 Jan 2026 to 31 Jan 2026 (31 days)",
    "organizationGroups": ["Nordic Enterprise"],
    "organizationRegistrationNumber": "556789-1234",
    "primaryDomain": "brightwavemedia.onmicrosoft.com",
    "chargeType": "renew",
    "chargeStartDate": "2026-01-01",
    "chargeEndDate": "2026-01-31",
    "tenantId": "4a7e2c9f-1b58-4d6a-8e30-9c2b5a1f7d04",
    "invoiceId": "G147820391",
    "invoiceDate": "2026-01-06",
    "vendorPricingTags": [
      "Price for given billing period",
      "Partner discount applied",
      "Price for given term"
    ],
    "customProperties": [
      { "name": "Department", "value": "Information Technology" },
      { "name": "ReferenceId", "value": "PRJ-2041" }
    ],
    "costCenters": [
      {
        "costCenterId": "a4d7e9b1-3c52-4f8a-9d6b-1e0c8f3a7b25",
        "costCenterName": "Sales",
        "quantity": 10.0,
        "totalCost": 1875.00,
        "totalSales": 2250.00,
        "totalMarginAmount": 375.00,
        "totalRecommendedPrice": 2100.00,
        "totalDifferenceFromRecommended": 150.00
      },
      {
        "costCenterId": "c9b3f6a2-7d14-4e9c-8b5a-3f1d2c0e9a68",
        "costCenterName": "Finance",
        "quantity": 15.0,
        "totalCost": 2812.50,
        "totalSales": 3375.00,
        "totalMarginAmount": 562.50,
        "totalRecommendedPrice": 3150.00,
        "totalDifferenceFromRecommended": 225.00
      }
    ]
  }
]