Gets all the invoice usage line items of an invoice for resellers, using pagination.

GET /v1/Invoices/{id}/reseller-usage-lineitems

Returns a subset of the invoice usage items of an invoice on each request for the reseller. Pass the continuation token in the headers to obtain the remaining items. Available to the roles: reseller

Headers

  • This header should not be set when the first page is desired. For the second page and onwards, pass the continuation token received in the response body.

  • X-Tenant string Required

    This header identifies which tenant to access with this request. This value should be an existent domain for the specified tenant.

  • Authorization string Required

    JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

    Default value is Bearer eyJ0eXAiO....

  • X-Correlation-Id string(UUID)

    This header is optional and by setting it you can correlate the audit logs made by this request.

Path parameters

  • id string(uuid) Required

    The id of the invoice.

Query parameters

  • pageSize integer(int32) Required

    The number of items to be returned at max per page. The size can range between 1 and 2000.

Responses

  • The request completed with success and returns the line items and the continuation token (if applicable).

    Hide response attributes Show response attributes object
    • items array[object] | null

      A model that represents a single charge of a usage invoice. In the case of the Microsoft provider each line item represents an Azure legacy charge.

      Hide items attributes Show items attributes object
      • customerId string(uuid) | null

        The id of the customer associated to this charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the customer wasn't in our system when that happened.

      • customerCompanyName string | null

        The company name of the customer.

      • domainName string | null

        The domain of the customer associated with the charge.

      • customerInternalId string | null

        The internal id of the customer associated with this charge.

      • orderId string | null

        The id that identifies the order associated with the charge.

      • subscriptionId string(uuid) | null

        The id of the subscription associated with the charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the subscription wasn't in our system when that happened.

      • subscriptionName string | null

        The name of the subscription associated with the charge.

      • The description of the subscription associated with the charge.

      • The internal id of the subscription associated with this charge.

      • offerId string(uuid) | null

        The id of the offer associated with the charge in CloudCockpit.

      • offerProviderId string | null

        The offer id on the provider's side that identifies the subscription associated with the charge.

      • offerName string | null

        The name of the offer associated with the subscription.

      • chargeStartDate string(date-time)

        The billing start date for this charge.

      • chargeEndDate string(date-time)

        The billing end date for this charge.

      • chargeType string | null

        The type of charge on this line item. Possible values include:

        • Assess usage fee for current cycle: Access usage fee for the current billing period.
        • Assess usage fee when cancel: Access usage fee upon cancellation for unpaid usage during the current billing period.
      • serviceName string | null

        The name of the service associated with the line item.

      • serviceType string | null

        The type of the service associated with the line item.

      • resourceGuid string | null

        The identifier of the resource associated with the charge.

      • resourceName string | null

        The name of the resource associated with the charge.

      • region string | null

        The region associated with the charge.

      • sku string | null

        The sku associated with the charge.

      • detailLineItemId integer(int32)

        The id of the line item from the provider side.

      • consumedQuantity number(double)

        The consumed quantity of the resource.

      • overageQuantity number(double)

        The overage quantity of the line item.

      • includedQuantity number(double)

        The quantity that is included free of charge on this line item.

      • currency string | null

        The currency of the line item.

      • unit string | null

        The unit of charge associated with the line item, for example GB or Months.

      • listPriceForReseller number(double) | null

        The price of each unit for the reseller.

      • listPriceForCustomer number(double) | null

        The price of each unit for customer (with reseller and customer margin).

      • subtotalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge before taxes.

      • subtotalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge before taxes.

      • taxesForReseller number(double) | null

        The taxes the resellers pays for the subscription on this charge.

      • taxesForCustomer number(double) | null

        The taxes the customer pays for the subscription on this charge.

      • totalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge after taxes.

      • totalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge after taxes.

      • customerProviderId string | null

        The id of customer on the provider's side associated with the charge.

      • The id of the subscription associated to this charge on the provider's side.

      • The purchase order number of the subscription associated with this charge.

      • id string(uuid)

        The id that uniquely identifies a usage invoice line item.

      • billingCycleType string | null

        The billing cycle of the subscription associated with charge.

      • customerPriceMargin number(double) | null

        The customer price margin according to the CustomerPriceMarginRule.

      • The customer price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • subscriptionPriceMargin number(double) | null

        The subscription price margin according to the SubscriptionPriceMarginRule.

      • The subscription price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • providerData object | null

        A dictionary that maps from strings to strings that contains specific provider invoice data.
        If this line item is associated to a Microsoft invoice then the possible values are: ServiceName: The name of the service associated with the charge. For example: "Storage".

        Hide providerData attributes Show providerData attributes
    • continuationToken string | null

      The token to continue to retrieve the paginated items. Should not be set if the first page of items is desired.

    Hide response attributes Show response attributes object
    • items array[object] | null

      A model that represents a single charge of a usage invoice. In the case of the Microsoft provider each line item represents an Azure legacy charge.

      Hide items attributes Show items attributes object
      • customerId string(uuid) | null

        The id of the customer associated to this charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the customer wasn't in our system when that happened.

      • customerCompanyName string | null

        The company name of the customer.

      • domainName string | null

        The domain of the customer associated with the charge.

      • customerInternalId string | null

        The internal id of the customer associated with this charge.

      • orderId string | null

        The id that identifies the order associated with the charge.

      • subscriptionId string(uuid) | null

        The id of the subscription associated with the charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the subscription wasn't in our system when that happened.

      • subscriptionName string | null

        The name of the subscription associated with the charge.

      • The description of the subscription associated with the charge.

      • The internal id of the subscription associated with this charge.

      • offerId string(uuid) | null

        The id of the offer associated with the charge in CloudCockpit.

      • offerProviderId string | null

        The offer id on the provider's side that identifies the subscription associated with the charge.

      • offerName string | null

        The name of the offer associated with the subscription.

      • chargeStartDate string(date-time)

        The billing start date for this charge.

      • chargeEndDate string(date-time)

        The billing end date for this charge.

      • chargeType string | null

        The type of charge on this line item. Possible values include:

        • Assess usage fee for current cycle: Access usage fee for the current billing period.
        • Assess usage fee when cancel: Access usage fee upon cancellation for unpaid usage during the current billing period.
      • serviceName string | null

        The name of the service associated with the line item.

      • serviceType string | null

        The type of the service associated with the line item.

      • resourceGuid string | null

        The identifier of the resource associated with the charge.

      • resourceName string | null

        The name of the resource associated with the charge.

      • region string | null

        The region associated with the charge.

      • sku string | null

        The sku associated with the charge.

      • detailLineItemId integer(int32)

        The id of the line item from the provider side.

      • consumedQuantity number(double)

        The consumed quantity of the resource.

      • overageQuantity number(double)

        The overage quantity of the line item.

      • includedQuantity number(double)

        The quantity that is included free of charge on this line item.

      • currency string | null

        The currency of the line item.

      • unit string | null

        The unit of charge associated with the line item, for example GB or Months.

      • listPriceForReseller number(double) | null

        The price of each unit for the reseller.

      • listPriceForCustomer number(double) | null

        The price of each unit for customer (with reseller and customer margin).

      • subtotalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge before taxes.

      • subtotalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge before taxes.

      • taxesForReseller number(double) | null

        The taxes the resellers pays for the subscription on this charge.

      • taxesForCustomer number(double) | null

        The taxes the customer pays for the subscription on this charge.

      • totalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge after taxes.

      • totalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge after taxes.

      • customerProviderId string | null

        The id of customer on the provider's side associated with the charge.

      • The id of the subscription associated to this charge on the provider's side.

      • The purchase order number of the subscription associated with this charge.

      • id string(uuid)

        The id that uniquely identifies a usage invoice line item.

      • billingCycleType string | null

        The billing cycle of the subscription associated with charge.

      • customerPriceMargin number(double) | null

        The customer price margin according to the CustomerPriceMarginRule.

      • The customer price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • subscriptionPriceMargin number(double) | null

        The subscription price margin according to the SubscriptionPriceMarginRule.

      • The subscription price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • providerData object | null

        A dictionary that maps from strings to strings that contains specific provider invoice data.
        If this line item is associated to a Microsoft invoice then the possible values are: ServiceName: The name of the service associated with the charge. For example: "Storage".

        Hide providerData attributes Show providerData attributes
    • continuationToken string | null

      The token to continue to retrieve the paginated items. Should not be set if the first page of items is desired.

    Hide response attributes Show response attributes object
    • items array[object] | null

      A model that represents a single charge of a usage invoice. In the case of the Microsoft provider each line item represents an Azure legacy charge.

      Hide items attributes Show items attributes object
      • customerId string(uuid) | null

        The id of the customer associated to this charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the customer wasn't in our system when that happened.

      • customerCompanyName string | null

        The company name of the customer.

      • domainName string | null

        The domain of the customer associated with the charge.

      • customerInternalId string | null

        The internal id of the customer associated with this charge.

      • orderId string | null

        The id that identifies the order associated with the charge.

      • subscriptionId string(uuid) | null

        The id of the subscription associated with the charge. Can be null, for example when the CSP removed the relationship with the customer on the provider side and the subscription wasn't in our system when that happened.

      • subscriptionName string | null

        The name of the subscription associated with the charge.

      • The description of the subscription associated with the charge.

      • The internal id of the subscription associated with this charge.

      • offerId string(uuid) | null

        The id of the offer associated with the charge in CloudCockpit.

      • offerProviderId string | null

        The offer id on the provider's side that identifies the subscription associated with the charge.

      • offerName string | null

        The name of the offer associated with the subscription.

      • chargeStartDate string(date-time)

        The billing start date for this charge.

      • chargeEndDate string(date-time)

        The billing end date for this charge.

      • chargeType string | null

        The type of charge on this line item. Possible values include:

        • Assess usage fee for current cycle: Access usage fee for the current billing period.
        • Assess usage fee when cancel: Access usage fee upon cancellation for unpaid usage during the current billing period.
      • serviceName string | null

        The name of the service associated with the line item.

      • serviceType string | null

        The type of the service associated with the line item.

      • resourceGuid string | null

        The identifier of the resource associated with the charge.

      • resourceName string | null

        The name of the resource associated with the charge.

      • region string | null

        The region associated with the charge.

      • sku string | null

        The sku associated with the charge.

      • detailLineItemId integer(int32)

        The id of the line item from the provider side.

      • consumedQuantity number(double)

        The consumed quantity of the resource.

      • overageQuantity number(double)

        The overage quantity of the line item.

      • includedQuantity number(double)

        The quantity that is included free of charge on this line item.

      • currency string | null

        The currency of the line item.

      • unit string | null

        The unit of charge associated with the line item, for example GB or Months.

      • listPriceForReseller number(double) | null

        The price of each unit for the reseller.

      • listPriceForCustomer number(double) | null

        The price of each unit for customer (with reseller and customer margin).

      • subtotalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge before taxes.

      • subtotalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge before taxes.

      • taxesForReseller number(double) | null

        The taxes the resellers pays for the subscription on this charge.

      • taxesForCustomer number(double) | null

        The taxes the customer pays for the subscription on this charge.

      • totalForReseller number(double) | null

        The cost the reseller pays for the subscription on this charge after taxes.

      • totalForCustomer number(double) | null

        The price the customer pays for the subscription on this charge after taxes.

      • customerProviderId string | null

        The id of customer on the provider's side associated with the charge.

      • The id of the subscription associated to this charge on the provider's side.

      • The purchase order number of the subscription associated with this charge.

      • id string(uuid)

        The id that uniquely identifies a usage invoice line item.

      • billingCycleType string | null

        The billing cycle of the subscription associated with charge.

      • customerPriceMargin number(double) | null

        The customer price margin according to the CustomerPriceMarginRule.

      • The customer price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • subscriptionPriceMargin number(double) | null

        The subscription price margin according to the SubscriptionPriceMarginRule.

      • The subscription price margin rule. The possible values are: markup, margin, splitmargin and erpminusdiscount.

      • providerData object | null

        A dictionary that maps from strings to strings that contains specific provider invoice data.
        If this line item is associated to a Microsoft invoice then the possible values are: ServiceName: The name of the service associated with the charge. For example: "Storage".

        Hide providerData attributes Show providerData attributes
    • continuationToken string | null

      The token to continue to retrieve the paginated items. Should not be set if the first page of items is desired.

  • There is an error in the parameters sent in the request.

    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
  • 401

    Please use a valid authorization token.

  • 403

    You don't have enough permissions to access this information.

  • The requested usage invoice does not exist. Any line items previously obtained should be discarded.

    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
  • A server error has happened during the request. Please try again later or contact support.

    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
    Hide response attributes Show response attributes object
GET /v1/Invoices/{id}/reseller-usage-lineitems
curl \
 -X GET https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/Invoices/{id}/reseller-usage-lineitems?pageSize=42 \
 -H "X-ContinuationToken: string" \
 -H "X-Tenant: string" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string"
Response examples (200)
{
  "items": [
    {
      "customerId": "2C741C83-E111-4A77-BC5F-C2F065275FA9",
      "customerCompanyName": "Customer test",
      "domainName": "test@pte.onmicrosoft.com",
      "customerInternalId": "CustomerTest",
      "orderId": "168579460714324057",
      "subscriptionId": "03DE5ECE-EC93-42A9-8F15-9A770AC1F832",
      "subscriptionName": "Azure subscription",
      "subscriptionDescription": "Azure",
      "subscriptionInternalId": "SubscriptionTest",
      "offerId": "607b94ab-27d3-4ce7-a0af-91db5c930ffc",
      "offerProviderId": "9DBADD95-5F52-454F-9002-C666A8AFF87D",
      "offerName": "Hot GRS Write Operations - Tiered Block Blob",
      "chargeStartDate": "2023-04-01T00:00:00",
      "chargeEndDate": "2023-04-30T23:59:59",
      "chargeType": "Assess usage fee for current cycle",
      "serviceName": "Azure Data Factory v2",
      "serviceType": "string",
      "resourceGuid": "9d6f5dbf-90a1-46bc-85b7-e9c3f92bae35",
      "resourceName": "Cloud Data Movement",
      "region": "IE",
      "sku": "7UD-00001",
      "detailLineItemId": 1,
      "consumedQuantity": 146.6,
      "overageQuantity": 146.6,
      "includedQuantity": 0,
      "currency": "EUR",
      "unit": "10K",
      "listPriceForReseller": 0.18473412,
      "listPriceForCustomer": 0.21082354,
      "subtotalForReseller": 27.082022,
      "subtotalForCustomer": 30.906729,
      "taxesForReseller": 0,
      "taxesForCustomer": 0,
      "totalForReseller": 27.082022,
      "totalForCustomer": 30.906729,
      "customerProviderId": "CB0A371A-046A-46A9-A299-96BD755E67A8",
      "subscriptionProviderId": "FA2A91FD-7286-4DCD-9718-20048CCA832A",
      "subscriptionPONumber": "8543943821",
      "id": "7828D90D-2AC6-4F20-A95B-EE850BCD32A0",
      "billingCycleType": "Monthly",
      "customerPriceMargin": 0,
      "customerPriceMarginRule": "erpminusdiscount",
      "subscriptionPriceMargin": 42.0,
      "subscriptionPriceMarginRule": "string",
      "providerData": {
        "ServiceName": "Storage"
      }
    }
  ],
  "continuationToken": "string"
}
Response examples (200)
{
  "items": [
    {
      "customerId": "2C741C83-E111-4A77-BC5F-C2F065275FA9",
      "customerCompanyName": "Customer test",
      "domainName": "test@pte.onmicrosoft.com",
      "customerInternalId": "CustomerTest",
      "orderId": "168579460714324057",
      "subscriptionId": "03DE5ECE-EC93-42A9-8F15-9A770AC1F832",
      "subscriptionName": "Azure subscription",
      "subscriptionDescription": "Azure",
      "subscriptionInternalId": "SubscriptionTest",
      "offerId": "607b94ab-27d3-4ce7-a0af-91db5c930ffc",
      "offerProviderId": "9DBADD95-5F52-454F-9002-C666A8AFF87D",
      "offerName": "Hot GRS Write Operations - Tiered Block Blob",
      "chargeStartDate": "2023-04-01T00:00:00",
      "chargeEndDate": "2023-04-30T23:59:59",
      "chargeType": "Assess usage fee for current cycle",
      "serviceName": "Azure Data Factory v2",
      "serviceType": "string",
      "resourceGuid": "9d6f5dbf-90a1-46bc-85b7-e9c3f92bae35",
      "resourceName": "Cloud Data Movement",
      "region": "IE",
      "sku": "7UD-00001",
      "detailLineItemId": 1,
      "consumedQuantity": 146.6,
      "overageQuantity": 146.6,
      "includedQuantity": 0,
      "currency": "EUR",
      "unit": "10K",
      "listPriceForReseller": 0.18473412,
      "listPriceForCustomer": 0.21082354,
      "subtotalForReseller": 27.082022,
      "subtotalForCustomer": 30.906729,
      "taxesForReseller": 0,
      "taxesForCustomer": 0,
      "totalForReseller": 27.082022,
      "totalForCustomer": 30.906729,
      "customerProviderId": "CB0A371A-046A-46A9-A299-96BD755E67A8",
      "subscriptionProviderId": "FA2A91FD-7286-4DCD-9718-20048CCA832A",
      "subscriptionPONumber": "8543943821",
      "id": "7828D90D-2AC6-4F20-A95B-EE850BCD32A0",
      "billingCycleType": "Monthly",
      "customerPriceMargin": 0,
      "customerPriceMarginRule": "erpminusdiscount",
      "subscriptionPriceMargin": 42.0,
      "subscriptionPriceMarginRule": "string",
      "providerData": {
        "ServiceName": "Storage"
      }
    }
  ],
  "continuationToken": "string"
}
Response examples (400)
{
  "statusCode": 400,
  "type": "ValidationException",
  "description": "Validation failed: \n -- PageSize: The page size must be between 1 and 2000 Severity: Error",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}
Response examples (400)
{
  "statusCode": 400,
  "type": "ValidationException",
  "description": "Validation failed: \n -- PageSize: The page size must be between 1 and 2000 Severity: Error",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}
Response examples (404)
{
  "statusCode": 404,
  "type": "EntityNotFoundException",
  "description": "No providers found for the tenant.",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}
Response examples (404)
{
  "statusCode": 404,
  "type": "EntityNotFoundException",
  "description": "No providers found for the tenant.",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}
Response examples (500)
{
  "statusCode": 500,
  "type": "NullReferenceException",
  "description": "An error happened processing your request. Please contact support.",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}
Response examples (500)
{
  "statusCode": 500,
  "type": "NullReferenceException",
  "description": "An error happened processing your request. Please contact support.",
  "correlationId": "685043EA-6D49-4ACE-8BDB-CCE9D3E2DBD0"
}