STACKIT Costs API
The Costs API from STACKIT — 3 operation(s) for costs.
Operations 3
GET
/v3/costs/{customerAccountId}/customers
V3 Costs for all projects of all related sub-customers
#
The Costs API from STACKIT — 3 operation(s) for costs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/stackit:stackit-costs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Stackit Costs API
version: '3.0'
termsOfService: https://stackit.de/en/imprint
x-refined-note:
- x-source differs across the merged source definitions and was not carried
description: 'Operations tagged Costs across 2 of this provider''s published API definitions: stackit-cost-v3.json, stackit-cost-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cost.api.stackit.cloud
variables:
region:
default: global
security:
- bearerAuth: []
tags:
- name: Costs
paths:
/v3/costs/{customerAccountId}:
parameters:
- description: ID of a customer account
in: path
name: customerAccountId
required: true
schema:
format: uuid
type: string
get:
description: Get costs for all projects in a customer account
operationId: ListCostsForCustomer
parameters:
- $ref: '#/components/parameters/from'
- $ref: '#/components/parameters/to'
- $ref: '#/components/parameters/depth'
- $ref: '#/components/parameters/granularity'
- $ref: '#/components/parameters/includeZeroCosts'
- description: Desired content type
in: header
name: Accept
schema:
enum:
- application/json
- text/csv
type: string
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ProjectCost'
type: array
text/csv:
examples:
Project Costs with detailed service costs:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,start,end,charge,discount,quantity,quantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,giga
'
Project costs with report data:
value: 'customerAccountId,projectId,projectName,start,end,charge,discount,quantity,quantityDecimal
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-02-28,2022-02-28,469.13578024,691.35780246,2,2.1
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-03-01,2022-03-01,469.13578024,691.35780246,2,2.1
'
Project costs with summarized services:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,totalCharge,totalDiscount,totalQuantity,totalQuantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,703.70367036,1037.03670369,3,3.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,703.70367036,1037.03670369,3,3.1,giga
'
Summarized Project Costs:
value: 'customerAccountId,projectId,projectName,totalCharge,totalDiscount
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,1407.4073407199998,2074.07340738
'
schema:
type: string
description: OK
headers:
Last-Modified:
description: The UTC date/time when the costs were last updated.
schema:
format: date-time
type: string
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Bad request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Not found
summary: V3 Costs for all projects
x-stackit-authorization:
actions:
- cost-management.billing.get
resource-id: customerAccountId
resource-id-type: dynamic
resource-type: organization
tags:
- Costs
servers:
- url: https://cost.api.stackit.cloud
variables:
region:
default: global
/v3/costs/{customerAccountId}/customers:
parameters:
- description: ID of a customer account
in: path
name: customerAccountId
required: true
schema:
format: uuid
type: string
get:
description: Get costs for all projects of all related sub-customer accounts
operationId: ListCostsForReseller
parameters:
- $ref: '#/components/parameters/from'
- $ref: '#/components/parameters/to'
- $ref: '#/components/parameters/depth'
- $ref: '#/components/parameters/granularity'
- $ref: '#/components/parameters/includeZeroCosts'
- description: Desired content type
in: header
name: Accept
schema:
enum:
- application/json
- text/csv
type: string
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ProjectCost'
type: array
text/csv:
examples:
Project Costs with detailed service costs:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,start,end,charge,discount,quantity,quantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,giga
'
Project costs with report data:
value: 'customerAccountId,projectId,projectName,start,end,charge,discount,quantity,quantityDecimal
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-02-28,2022-02-28,469.13578024,691.35780246,2,2.1
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-03-01,2022-03-01,469.13578024,691.35780246,2,2.1
'
Project costs with summarized services:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,totalCharge,totalDiscount,totalQuantity,totalQuantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,703.70367036,1037.03670369,3,3.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,703.70367036,1037.03670369,3,3.1,giga
'
Summarized Project Costs:
value: 'customerAccountId,projectId,projectName,totalCharge,totalDiscount
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,1407.4073407199998,2074.07340738
'
schema:
type: string
description: OK
headers:
Last-Modified:
description: The UTC date/time when the costs were last updated.
schema:
format: date-time
type: string
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Bad request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Not found
summary: V3 Costs for all projects of all related sub-customers
x-stackit-authorization:
actions:
- cost-management.partner-cost.get
resource-id: customerAccountId
resource-id-type: dynamic
resource-type: organization
tags:
- Costs
servers:
- url: https://cost.api.stackit.cloud
variables:
region:
default: global
/v3/costs/{customerAccountId}/projects/{projectId}:
parameters:
- description: ID of a customer account
in: path
name: customerAccountId
required: true
schema:
format: uuid
type: string
- description: ID of a project
in: path
name: projectId
required: true
schema:
format: uuid
type: string
get:
description: Get costs for a certain project in a customer account
operationId: GetCostsForProject
parameters:
- $ref: '#/components/parameters/from'
- $ref: '#/components/parameters/to'
- $ref: '#/components/parameters/depth'
- $ref: '#/components/parameters/granularity'
- $ref: '#/components/parameters/includeZeroCosts'
- description: Desired content type
in: header
name: Accept
schema:
enum:
- application/json
- text/csv
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectCost'
text/csv:
examples:
Project Costs with detailed service costs:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,start,end,charge,discount,quantity,quantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,2022-02-28,2022-02-28,234.56789012,345.67890123,1,1.1,giga
'
Project costs with report data:
value: 'customerAccountId,projectId,projectName,start,end,charge,discount,quantity,quantityDecimal
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-02-28,2022-02-28,469.13578024,691.35780246,2,2.1
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,2022-03-01,2022-03-01,469.13578024,691.35780246,2,2.1
'
Project costs with summarized services:
value: 'customerAccountId,projectId,projectName,sku,serviceName,serviceCategoryName,totalCharge,totalDiscount,totalQuantity,totalQuantityDecimal,unitLabel
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku 2,service 2,bar,703.70367036,1037.03670369,3,3.1,hour
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,sku name,service name,foo,703.70367036,1037.03670369,3,3.1,giga
'
Summarized Project Costs:
value: 'customerAccountId,projectId,projectName,totalCharge,totalDiscount
9caede67-72ce-4ce1-be58-90b6d1216540,491c5413-f561-44a5-adae-941fcd2d7a8a,testProject,1407.4073407199998,2074.07340738
'
schema:
type: string
description: OK
headers:
Last-Modified:
description: The UTC date/time when the costs were last updated.
schema:
format: date-time
type: string
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Bad request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/authErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
text/csv:
schema:
type: string
description: Not found
summary: V3 Costs for a certain project
x-stackit-authorization:
actions:
- cost-management.billing.get
resource-id: projectId
resource-id-type: dynamic
resource-type: project
tags:
- Costs
servers:
- url: https://cost.api.stackit.cloud
variables:
region:
default: global
components:
parameters:
granularity:
description: 'Define granularity of costs – Default is "none" which does NOT include detailed report data.
If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period.
If not, they are normalized accordingly.
If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days.'
in: query
name: granularity
schema:
default: none
enum:
- daily
- weekly
- monthly
- yearly
- none
example: daily
type: string
depth:
description: Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level.
in: query
name: depth
schema:
default: auto
enum:
- project
- service
- auto
example: project
type: string
includeZeroCosts:
description: Whether costs of 0 should be included in the response
in: query
name: includeZeroCosts
schema:
default: false
type: boolean
to:
description: Inclusive end date of the selection range. Internally, usages are recorded in UTC. This means all usages starting up to and including 23:59:59 UTC on the specified date are included.
in: query
name: to
required: true
schema:
example: '2020-05-30'
format: date
type: string
from:
description: Inclusive start date of the selection range. Internally, usages are recorded in UTC. This means all usages starting on and after 00:00:00 UTC on the specified date are included.
in: query
name: from
required: true
schema:
example: '2020-05-30'
format: date
type: string
schemas:
SummarizedServiceCost:
description: Summarized costs for a project
properties:
customerAccountId:
example: 9caede67-72ce-4ce1-be58-90b6d1216540
format: uuid
type: string
projectId:
example: ba04b091-ec32-4423-81e6-976f1b8a8363
format: uuid
type: string
projectName:
example: sit.dev
type: string
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
required:
- customerAccountId
- projectId
- projectName
- totalCharge
- totalDiscount
title: V3 Summarized Service Costs
type: object
errorResponse:
properties:
msg:
type: string
required:
- msg
title: Error
type: object
authErrorResponse:
properties:
error:
type: string
message:
type: string
path:
type: string
status:
format: int32
type: integer
timeStamp:
format: date-time
type: string
required:
- timeStamp
- path
- status
- error
- message
type: object
ProjectCostWithDetailedServices:
description: Detailed costs for a project including service costs
properties:
customerAccountId:
example: 9caede67-72ce-4ce1-be58-90b6d1216540
format: uuid
type: string
projectId:
example: ba04b091-ec32-4423-81e6-976f1b8a8363
format: uuid
type: string
projectName:
example: sit.dev
type: string
services:
description: Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details.
items:
$ref: '#/components/schemas/DetailedServiceCost'
type: array
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
required:
- customerAccountId
- projectId
- projectName
- totalCharge
- totalDiscount
title: V3 Project Costs with detailed service costs
type: object
DetailedServiceCost:
description: Costs for a single service
properties:
reportData:
description: Detailed service costs which are ONLY included if granularity is provided
items:
$ref: '#/components/schemas/ReportData'
type: array
serviceCategoryName:
description: Service category name
example: Compute Engine
maxLength: 64
minLength: 1
type: string
serviceName:
description: Name of the service
example: SAP_DB
maxLength: 128
minLength: 1
type: string
sku:
description: Service key
example: ST-0010801
maxLength: 64
minLength: 1
type: string
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
totalQuantity:
description: Total quantity
example: 321
format: int32
type: integer
totalQuantityDecimal:
description: 'Total quantity in decimal format, returned as string to preserve precision.
NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal.
'
example: '321.1'
type: string
unitLabel:
description: Label for unit
example: Giga Hours
maxLength: 64
minLength: 1
type: string
required:
- totalQuantity
- totalQuantityDecimal
- totalCharge
- totalDiscount
- unitLabel
- sku
- serviceName
- serviceCategoryName
title: Service Costs
type: object
ReportData:
description: Costs report for a certain period of time
properties:
charge:
description: Charge, value in cents
example: 20103023.912003
format: double
type: number
discount:
description: Discount, value in cents
example: 103023.912003
format: double
type: number
quantity:
description: Quantity
example: 123
format: int32
type: integer
quantityDecimal:
description: 'Quantity in decimal format, returned as string to preserve precision.
NOTE: This field will be removed in future versions and `totalQuantity` will become a decimal.
'
example: '123.3'
type: string
timePeriod:
description: Time period according to desired granularity
format: date
properties:
end:
example: '2021-11-30'
format: date
type: string
start:
example: '2021-11-29'
format: date
type: string
type: object
required:
- timePeriod
- charge
- discount
- quantity
- quantityDecimal
title: Costs
type: object
ProjectCostWithReports:
description: Detailed costs for a project
properties:
customerAccountId:
example: 9caede67-72ce-4ce1-be58-90b6d1216540
format: uuid
type: string
projectId:
example: ba04b091-ec32-4423-81e6-976f1b8a8363
format: uuid
type: string
projectName:
example: sit.dev
type: string
reportData:
description: Detailed project costs which are ONLY included if granularity is provided AND depth is "project"
items:
$ref: '#/components/schemas/ReportData'
type: array
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
required:
- customerAccountId
- projectId
- projectName
- totalCharge
- totalDiscount
title: v3 Project costs with report data
type: object
ProjectCost:
anyOf:
- $ref: '#/components/schemas/SummarizedProjectCost'
- $ref: '#/components/schemas/ProjectCostWithReports'
- $ref: '#/components/schemas/ProjectCostWithSummarizedServices'
- $ref: '#/components/schemas/ProjectCostWithDetailedServices'
title: v3 Project Costs
type: object
ProjectCostWithSummarizedServices:
description: Costs for a project including summarized service costs
properties:
customerAccountId:
example: 9caede67-72ce-4ce1-be58-90b6d1216540
format: uuid
type: string
projectId:
example: ba04b091-ec32-4423-81e6-976f1b8a8363
format: uuid
type: string
projectName:
example: sit.dev
type: string
services:
description: Summarized service costs
items:
$ref: '#/components/schemas/SummarizedServiceCost'
type: array
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
required:
- customerAccountId
- projectId
- projectName
- totalCharge
- totalDiscount
title: v3 Project costs with summarized services
type: object
SummarizedProjectCost:
description: Summarized costs for a project
properties:
customerAccountId:
example: 9caede67-72ce-4ce1-be58-90b6d1216540
format: uuid
type: string
projectId:
example: ba04b091-ec32-4423-81e6-976f1b8a8363
format: uuid
type: string
projectName:
example: sit.dev
type: string
totalCharge:
description: Total charge (including discounts) for all services and the whole requested date range (value in cents)
example: 20103023.912003
format: double
type: number
totalDiscount:
description: Total discount for all services and the whole requested date range (value in cents)
example: 103023.912003
format: double
type: number
required:
- customerAccountId
- projectId
- projectName
- totalCharge
- totalDiscount
title: v3 Summarized Project Costs
type: object
x-refined-from:
- stackit-cost-v3.json
- stackit-cost-openapi.yml