openapi: 3.2.0 info: title: Kelowna Production myCC - Lanes API version: v1 tags: - name: myCC - Lanes paths: /Accounts/{accountId}/Lanes/GoalProgress: get: tags: - myCC - Lanes summary: Gets the progress being made by a list of lanes towards their production goals parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: remoteUnitIds in: query description: "The ready mix units to get data for.\n OBSOLETE: Use `rmIds` instead: https://carboncure.atlassian.net/browse/KEL-3073" schema: type: array items: type: integer format: int32 - name: startDate in: query description: Start of the custom timerange to get production data for schema: type: string format: date - name: endDate in: query description: End of the custom timerange to get production data for schema: type: string format: date - name: rmIds in: query description: IDs of ready mix units to fetch data for. schema: type: array items: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/VolumeGoalProgress' application/json: schema: $ref: '#/components/schemas/VolumeGoalProgress' text/json: schema: $ref: '#/components/schemas/VolumeGoalProgress' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesGoalProgress x-operation-id-source: derived /Accounts/{accountId}/Lanes/Lagging: get: tags: - myCC - Lanes summary: Gets lanes and groups that are lagging behind their production goals parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/LaggingPlantOrGroup' application/json: schema: type: array items: $ref: '#/components/schemas/LaggingPlantOrGroup' text/json: schema: type: array items: $ref: '#/components/schemas/LaggingPlantOrGroup' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesLagging x-operation-id-source: derived /Accounts/{accountId}/Lanes/SuggestedActions: get: tags: - myCC - Lanes summary: Gets monthly production with suggested mix designs to improve it parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: remoteUnitIds in: query description: "The ready mix units to get data for.\n OBSOLETE: Use `rmIds` instead: https://carboncure.atlassian.net/browse/KEL-3073" schema: type: array items: type: integer format: int32 - name: rmIds in: query description: IDs of ready mix units to fetch data for. schema: type: array items: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/RemoteUnitProduction' application/json: schema: type: array items: $ref: '#/components/schemas/RemoteUnitProduction' text/json: schema: type: array items: $ref: '#/components/schemas/RemoteUnitProduction' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesSuggestedActions x-operation-id-source: derived /Accounts/{accountId}/Lanes: get: tags: - myCC - Lanes summary: Returns lanes under an account parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: includeDecommissioned in: query description: Whether decommissioned lanes should be included in the response schema: type: boolean default: false responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/LaneArgs' application/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' text/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanes x-operation-id-source: derived post: tags: - myCC - Lanes summary: Updates a lane parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 requestBody: description: Updated attributes for the lane content: application/json: schema: $ref: '#/components/schemas/LaneArgs' text/json: schema: $ref: '#/components/schemas/LaneArgs' application/*+json: schema: $ref: '#/components/schemas/LaneArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/LaneArgs' application/json: schema: $ref: '#/components/schemas/LaneArgs' text/json: schema: $ref: '#/components/schemas/LaneArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdLanes x-operation-id-source: derived /Accounts/{accountId}/Lanes/Paginated: get: tags: - myCC - Lanes summary: Returns lanes under an account parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: Limit in: query description: Limit number of responses. Used for pagination. schema: type: integer format: int32 - name: Offset in: query description: Skip this many rows in the query. Used for pagination. schema: type: integer format: int32 - name: SortColumn in: query description: The name of the column to sort by. schema: type: string - name: SortOrder in: query description: The order with which to sort the table by the sort column. schema: $ref: '#/components/schemas/SortOrder' - name: searchKey in: query description: Search key (optional) schema: type: string - name: includeDecommissioned in: query description: Whether decommissioned lanes should be included in the response schema: type: boolean default: false responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/LaneArgsTableResults' application/json: schema: $ref: '#/components/schemas/LaneArgsTableResults' text/json: schema: $ref: '#/components/schemas/LaneArgsTableResults' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesPaginated x-operation-id-source: derived /Accounts/{accountId}/Lanes/RecentProduction: get: tags: - myCC - Lanes summary: Returns data about the last 6 months of production for lanes description: Used in the myCC production page to render the map parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/LaneProductionArgs' application/json: schema: type: array items: $ref: '#/components/schemas/LaneProductionArgs' text/json: schema: type: array items: $ref: '#/components/schemas/LaneProductionArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesRecentProduction x-operation-id-source: derived /Accounts/{accountId}/Lanes/UpdateMany: post: tags: - myCC - Lanes summary: Updates multiple lanes parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 requestBody: description: Updated attributes for the lanes content: application/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' text/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' application/*+json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/LaneArgs' application/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' text/json: schema: type: array items: $ref: '#/components/schemas/LaneArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdLanesUpdateMany x-operation-id-source: derived /Accounts/{accountId}/Lanes/DailySummary: get: tags: - myCC - Lanes summary: Gets a daily summary of production and co2 savings description: The production values are summed together over all of the given lanes. parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: remoteUnitIds in: query description: "The ready mix units to get the summary for.\n OBSOLETE: Use `rmIds` instead: https://carboncure.atlassian.net/browse/KEL-3073" schema: type: array items: type: integer format: int32 - name: rmIds in: query description: IDs of ready mix units to fetch summary data for. schema: type: array items: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/DailySummary' application/json: schema: type: array items: $ref: '#/components/schemas/DailySummary' text/json: schema: type: array items: $ref: '#/components/schemas/DailySummary' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdLanesDailySummary x-operation-id-source: derived components: schemas: MixDesignProduction: type: object properties: mixDesignId: type: integer format: int32 mixCode: type: - string - 'null' mixProduction: type: - array - 'null' items: $ref: '#/components/schemas/ProductionPoint' additionalProperties: false VolumeGoalProgress: type: object properties: goalProgressTodayPercent: type: - number - 'null' format: double goalProgressThisWeekPercent: type: - number - 'null' format: double goalProgressThisMonthPercent: type: - number - 'null' format: double totalConcreteBetweenDatesM3: type: - number - 'null' format: double additionalProperties: false PlantType: enum: - ReadyMix - Masonry - Precast type: string DailySummary: type: object properties: date: type: string format: date injectionCount: type: integer format: int32 truckloadCount: type: integer format: int32 totalConcreteM3: type: number format: double injectedCO2Kg: type: number format: double cementAvoidedTonnes: type: number format: double avoidedCO2Tonnes: type: number format: double additionalProperties: false LaneArgsTableResults: type: object properties: count: type: integer format: int32 results: type: - array - 'null' items: $ref: '#/components/schemas/LaneArgs' additionalProperties: false SortOrder: enum: - Ascending - Descending type: string LaneProductionArgs: type: object properties: remoteUnitId: type: integer format: int32 averageDailyProductionM3: type: - number - 'null' format: double isExceedingGoal: type: boolean additionalProperties: false RemoteUnitProduction: type: object properties: remoteUnitId: type: integer format: int32 projectProduction: type: - array - 'null' items: $ref: '#/components/schemas/ProductionPoint' nonProjectProduction: type: - array - 'null' items: $ref: '#/components/schemas/ProductionPoint' description: 'This is the sum of production volumes of baseline mixes that are not included in the MixDesigns field. Summing together ProjectProduction + NonProjectProduction + MixDesigns should equal 100% of production.' mixDesigns: type: - array - 'null' items: $ref: '#/components/schemas/MixDesignProduction' additionalProperties: false LaneArgs: type: object properties: remoteUnitId: type: integer format: int32 plantId: type: integer format: int32 latitude: type: - number - 'null' format: double longitude: type: - number - 'null' format: double displayName: type: - string - 'null' city: type: - string - 'null' state: type: - string - 'null' grouping: type: - array - 'null' items: type: string manager: type: - string - 'null' annualProductionM3: type: - number - 'null' format: double targetProjectPercent: type: - integer - 'null' format: int32 monthlyProductionGoal: type: - number - 'null' format: double weeklyProductionGoal: type: - number - 'null' format: double dailyProductionGoal: type: - number - 'null' format: double plantType: $ref: '#/components/schemas/PlantType' installedTimestamp: type: - string - 'null' format: date-time isDecommissioned: type: boolean additionalProperties: false LaggingPlantOrGroup: type: object properties: remoteUnitId: type: - integer - 'null' format: int32 group: type: - string - 'null' lagBehindTargetPercent: type: integer format: int32 additionalProperties: false ProductionPoint: type: object properties: month: type: string format: date volumeM3: type: number format: double 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: {}