openapi: 3.2.0 info: title: Kelowna Production Public API version: v1 tags: - name: Public paths: /Public/Counter/{corporationId}: get: tags: - Public summary: Gets a summary of a corporation's stats for a given timerange description: 'Used for tickers on customer websites. Ideally, we should restrict this endpoint to customers who have opted to use such a ticker, so that the info isn''t publicly accessible if they don''t want it to be.' parameters: - name: corporationId in: path description: The ID of the corporation to get data for required: true schema: type: integer format: int32 - name: divisionId in: query description: The ID of the division to get data for schema: type: integer format: int32 - name: range in: query description: The range of data to include schema: $ref: '#/components/schemas/CustomerCounterTimerange' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/CustomerCounterResponse' application/json: schema: $ref: '#/components/schemas/CustomerCounterResponse' text/json: schema: $ref: '#/components/schemas/CustomerCounterResponse' deprecated: true security: - {} - {} - {} operationId: getPublicCounterByCorporationId x-operation-id-source: derived /Public/Counter/Account/{accountId}: get: tags: - Public summary: Gets a summary of a myCC account's stats for a given timerange description: 'Used for tickers on customer websites. Ideally, we should restrict this endpoint to customers who have opted to use such a ticker, so that the info isn''t publicly accessible if they don''t want it to be.' parameters: - name: accountId in: path description: The ID of the myCC account to get data for required: true schema: type: integer format: int32 - name: range in: query description: The range of data to include schema: $ref: '#/components/schemas/CustomerCounterTimerange' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/CustomerCounterResponse' application/json: schema: $ref: '#/components/schemas/CustomerCounterResponse' text/json: schema: $ref: '#/components/schemas/CustomerCounterResponse' security: - {} - {} - {} operationId: getPublicCounterAccountByAccountId x-operation-id-source: derived /Public/Counter: get: tags: - Public summary: Gets a production counter since a year ago and for all time based on daily… description: Used for Carbon Cure's counter on the main site. responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/CounterResponse' application/json: schema: $ref: '#/components/schemas/CounterResponse' text/json: schema: $ref: '#/components/schemas/CounterResponse' security: - {} - {} - {} operationId: getPublicCounter x-operation-id-source: derived components: schemas: CounterResponseEntry: type: object properties: cO2AvoidedTonnes: type: number format: double ticketCount: type: integer format: int32 creditRevenueSharedUsd: type: number format: double additionalProperties: false CustomerCounterTimerange: enum: - AllTime - LastYear type: string CounterResponse: type: object properties: all: $ref: '#/components/schemas/CounterResponseEntry' sinceYearAgo: $ref: '#/components/schemas/CounterResponseEntry' additionalProperties: false CustomerCounterResponse: type: object properties: totalConcreteM3: type: - number - 'null' format: double cO2AvoidedTonnes: type: - number - 'null' format: double ticketCount: type: - integer - 'null' format: int32 additionalProperties: false securitySchemes: OrcaAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {} MyCCAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {} M2MAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {}