openapi: 3.2.0 info: title: Kelowna Production myCC - Plants API version: v1 tags: - name: myCC - Plants paths: /Accounts/{accountId}/Plants: get: tags: - myCC - Plants summary: Fetches a list of plants for the primary plant settings table parameters: - name: accountId in: path description: MyCC account ID associated with plants. required: true schema: type: integer format: int32 - name: searchKey in: query description: Key used to filter plants based on display name, city, state, grouping, or manager schema: type: string - 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' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/PlantsTableArgsTableResults' application/json: schema: $ref: '#/components/schemas/PlantsTableArgsTableResults' text/json: schema: $ref: '#/components/schemas/PlantsTableArgsTableResults' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlants x-operation-id-source: derived put: tags: - myCC - Plants summary: Updates a plant and system production percentages. Pushes data to Salesforce parameters: - name: accountId in: path description: MyCC account ID associated with plant. required: true schema: type: integer format: int32 requestBody: description: Arguments for updating the plant. content: application/json: schema: $ref: '#/components/schemas/PlantUpdateArgs' text/json: schema: $ref: '#/components/schemas/PlantUpdateArgs' application/*+json: schema: $ref: '#/components/schemas/PlantUpdateArgs' responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: putAccountsByAccountIdPlants x-operation-id-source: derived /Accounts/{accountId}/Plants/MissingDetails: get: tags: - myCC - Plants summary: Fetches list of plant systems that are missing information either in Salesforce… parameters: - name: accountId in: path description: MyCC account ID associated with plants. required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/MissingSystemInfoArgs' application/json: schema: type: array items: $ref: '#/components/schemas/MissingSystemInfoArgs' text/json: schema: type: array items: $ref: '#/components/schemas/MissingSystemInfoArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsMissingDetails x-operation-id-source: derived /Accounts/{accountId}/Plants/Groups: get: tags: - myCC - Plants summary: Fetches a list of plant groups. parameters: - name: accountId in: path description: MyCC account ID associated with plants. required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/PlantGroupArgs' application/json: schema: type: array items: $ref: '#/components/schemas/PlantGroupArgs' text/json: schema: type: array items: $ref: '#/components/schemas/PlantGroupArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsGroups x-operation-id-source: derived put: tags: - myCC - Plants summary: Updates plant groups description: '- To add a plant to a group, include all plant IDs (including the one to add) in the `PlantIds` array. Set `PreviousGroupName` as null. - To remove a plant from a group, set `GroupName` to the relevant group and exclude the plant ID from the plantIds array. Include the plant IDs of plants that need to remain in the group. - To rename a group, set `PreviousGroupName` to the old name, `GroupName` to the new name, and include all Plants that should retain the new name in the `PlantIds` array.' parameters: - name: accountId in: path description: MyCC account ID associated with plants. required: true schema: type: integer format: int32 requestBody: description: Args used to update the groups. content: application/json: schema: $ref: '#/components/schemas/PlantGroupUpdateArgs' text/json: schema: $ref: '#/components/schemas/PlantGroupUpdateArgs' application/*+json: schema: $ref: '#/components/schemas/PlantGroupUpdateArgs' responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: putAccountsByAccountIdPlantsGroups x-operation-id-source: derived /Accounts/{accountId}/Plants/{plantId}: get: tags: - myCC - Plants summary: Fetches plant details, including a list of systems parameters: - name: accountId in: path description: MyCC account ID associated with plant. required: true schema: type: integer format: int32 - name: plantId in: path description: ID of plant to fetch details for. required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/PlantDetailsArgs' application/json: schema: $ref: '#/components/schemas/PlantDetailsArgs' text/json: schema: $ref: '#/components/schemas/PlantDetailsArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsByPlantId x-operation-id-source: derived /Accounts/{accountId}/Plants/System/{remoteUnitId}: get: tags: - myCC - Plants summary: Fetches system details parameters: - name: accountId in: path description: MyCC account ID associated with system. required: true schema: type: integer format: int32 - name: remoteUnitId in: path description: "ID of ready mix unit to fetch details for.\n Refers to the ReadyMixUnitId, but the frontend requires this outdated name." required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SystemArgsFull' application/json: schema: $ref: '#/components/schemas/SystemArgsFull' text/json: schema: $ref: '#/components/schemas/SystemArgsFull' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsSystemByRemoteUnitId x-operation-id-source: derived /Accounts/{accountId}/Plants/System: put: tags: - myCC - Plants summary: Updates system information. Pushes data to Salesforce parameters: - name: accountId in: path description: MyCC account ID associated with system. required: true schema: type: integer format: int32 requestBody: description: Args used to update system. content: application/json: schema: $ref: '#/components/schemas/SystemUpdateArgs' text/json: schema: $ref: '#/components/schemas/SystemUpdateArgs' application/*+json: schema: $ref: '#/components/schemas/SystemUpdateArgs' responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: putAccountsByAccountIdPlantsSystem x-operation-id-source: derived /Accounts/{accountId}/Plants/Dropdown: get: tags: - myCC - Plants summary: Gets a list of installed plants for group selection dropdown. 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/PlantArgsShort' application/json: schema: type: array items: $ref: '#/components/schemas/PlantArgsShort' text/json: schema: type: array items: $ref: '#/components/schemas/PlantArgsShort' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsDropdown x-operation-id-source: derived /Accounts/{accountId}/Plants/Image: get: tags: - myCC - Plants summary: Gets list of customer plant image upload records parameters: - name: accountId in: path description: ID of the myCC account. required: true schema: type: integer format: int32 - name: plantId in: query description: ID of the plant associated with the image. schema: type: integer format: int32 - name: remoteUnitId in: query description: "ID of the ready mix unit (lane) associated with the image.\n Refers to the ReadyMixUnitId, but the frontend requires this outdated name." schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/ImageUploadArgs' application/json: schema: type: array items: $ref: '#/components/schemas/ImageUploadArgs' text/json: schema: type: array items: $ref: '#/components/schemas/ImageUploadArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsImage x-operation-id-source: derived post: tags: - myCC - Plants summary: Uploads a list of images to S3 and creates corresponding DB records parameters: - name: accountId in: path description: ID of the myCC account. required: true schema: type: integer format: int32 - name: remoteUnitId in: query description: "ID of the ready mix unit (lane) associated with the image.\n Refers to the ReadyMixUnitId, but the frontend requires this outdated name." schema: type: integer format: int32 requestBody: content: multipart/form-data: schema: type: object properties: files: type: array items: type: string format: binary description: List of files to be uploaded. encoding: files: style: form responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdPlantsImage x-operation-id-source: derived delete: tags: - myCC - Plants summary: Deletes a list of images from the DB and S3 parameters: - name: accountId in: path description: ID of the myCC account. required: true schema: type: integer format: int32 - name: imageIds in: query description: IDs of the images to delete. schema: type: array items: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: deleteAccountsByAccountIdPlantsImage x-operation-id-source: derived /Accounts/{accountId}/Plants/Image/Url/{imageId}: get: tags: - myCC - Plants summary: Gets a presigned URL to download an image file parameters: - name: accountId in: path description: ID of the myCC account. required: true schema: type: integer format: int32 - name: imageId in: path description: ID of the image record to fetch a link for. required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: type: string application/json: schema: type: string text/json: schema: type: string security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdPlantsImageUrlByImageId x-operation-id-source: derived components: schemas: PlantUpdateArgs: type: object properties: plantId: type: integer format: int32 displayName: type: - string - 'null' groupNames: type: - array - 'null' items: type: string manager: type: - string - 'null' reportedAnnualProductionM3: type: - number - 'null' format: double goalAddressablePercentage: type: - integer - 'null' format: int32 residentialPercent: type: - number - 'null' format: double commercialPercent: type: - number - 'null' format: double dotPercent: type: - number - 'null' format: double lastSavedTimestamp: type: - string - 'null' description: Timestamp of last time changes were made to the plant or any of its associated systems. format: date-time lastSavedUserFullName: type: - string - 'null' systems: type: - array - 'null' items: $ref: '#/components/schemas/SystemArgsShort' additionalProperties: false PlantArgsShort: type: object properties: plantId: type: integer format: int32 displayName: type: - string - 'null' city: type: - string - 'null' state: type: - string - 'null' manager: type: - string - 'null' systemCount: type: integer format: int32 additionalProperties: false SystemArgsPartial: type: object properties: remoteUnitId: type: integer format: int32 systemDisplayName: type: - string - 'null' serial: type: - string - 'null' installDate: type: - string - 'null' format: date plantProductionPercent: type: - number - 'null' format: double stage: $ref: '#/components/schemas/SystemStage' hasMissingInfo: type: boolean additionalProperties: false PlantsTableArgs: type: object properties: plantId: type: integer format: int32 displayName: type: - string - 'null' city: type: - string - 'null' state: type: - string - 'null' groupNames: type: - array - 'null' items: type: string systemCount: type: integer format: int32 manager: type: - string - 'null' reportedAnnualProductionM3: type: number format: double goalAddressablePercentage: type: number format: double previousYearProductionCctM3: type: number format: double hasMissingInfo: type: boolean additionalProperties: false PlantsTableArgsTableResults: type: object properties: count: type: integer format: int32 results: type: - array - 'null' items: $ref: '#/components/schemas/PlantsTableArgs' additionalProperties: false MissingSystemInfoArgs: type: object properties: plantId: type: integer format: int32 remoteUnitId: type: integer format: int32 systemDisplayName: type: - string - 'null' serial: type: - string - 'null' city: type: - string - 'null' state: type: - string - 'null' groupNames: type: - array - 'null' items: type: string manager: type: - string - 'null' additionalProperties: false SystemArgsFull: type: object properties: remoteUnitId: type: integer format: int32 systemDisplayName: type: - string - 'null' serial: type: - string - 'null' installDate: type: - string - 'null' format: date plantProductionPercent: type: - number - 'null' format: double stage: $ref: '#/components/schemas/SystemStage' batchingSoftware: type: - string - 'null' averageLoadSizeM3: type: - number - 'null' format: double maxBatchSizeM3: type: - number - 'null' format: double mixerType: type: - string - 'null' avgDischargeTimeSeconds: type: - number - 'null' format: double inputVoltage: type: - string - 'null' outputVoltage: type: - string - 'null' systemVoltage: type: - string - 'null' ceOutputType: type: - string - 'null' requiredWireLength: type: - string - 'null' description: Free input field in Salesforce. Units are specified in the string as 'm' or 'ft'. dischargeHoseLength: type: - string - 'null' description: Free input field in Salesforce. Units are specified in the string as 'm' or 'ft'. lastSavedTimestamp: type: - string - 'null' description: Timestamp of last time changes were made to the plant or any of its associated systems. format: date-time lastSavedUserName: type: - string - 'null' enums: $ref: '#/components/schemas/SystemSettingsEnums' city: type: - string - 'null' state: type: - string - 'null' hasMissingInfo: type: boolean additionalProperties: false SystemArgsShort: type: object properties: remoteUnitId: type: integer format: int32 plantProductionPercent: type: - number - 'null' format: double additionalProperties: false SystemSettingsEnums: type: object properties: mixerType: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' batchingSoftware: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' inputVoltage: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' outputVoltage: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' systemVoltage: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' ceOutputType: type: - array - 'null' items: $ref: '#/components/schemas/EnumValue' additionalProperties: false PlantDetailsArgs: type: object properties: plantId: type: integer format: int32 displayName: type: - string - 'null' groupNames: type: - array - 'null' items: type: string manager: type: - string - 'null' reportedAnnualProductionM3: type: - number - 'null' format: double goalAddressablePercentage: type: - integer - 'null' format: int32 residentialPercent: type: - number - 'null' format: double commercialPercent: type: - number - 'null' format: double dotPercent: type: - number - 'null' format: double lastSavedTimestamp: type: - string - 'null' description: Timestamp of last time changes were made to the plant or any of its associated systems. format: date-time lastSavedUserFullName: type: - string - 'null' city: type: - string - 'null' state: type: - string - 'null' previousYearProductionCctM3: type: number format: double defaultCementCut: type: - number - 'null' format: double defaultCO2DosePercent: type: - number - 'null' format: double systems: type: - array - 'null' items: $ref: '#/components/schemas/SystemArgsPartial' additionalProperties: false ImageUploadArgs: type: object properties: imageId: type: integer format: int32 myCCAccountId: type: integer format: int32 remoteUnitId: type: integer format: int32 plantId: type: integer format: int32 name: type: - string - 'null' fileExtension: type: - string - 'null' additionalProperties: false SortOrder: enum: - Ascending - Descending type: string EnumValue: type: object properties: label: type: - string - 'null' value: type: - string - 'null' additionalProperties: false SystemUpdateArgs: type: object properties: remoteUnitId: type: integer format: int32 systemDisplayName: type: - string - 'null' serial: type: - string - 'null' installDate: type: - string - 'null' format: date plantProductionPercent: type: - number - 'null' format: double stage: $ref: '#/components/schemas/SystemStage' batchingSoftware: type: - string - 'null' averageLoadSizeM3: type: - number - 'null' format: double maxBatchSizeM3: type: - number - 'null' format: double mixerType: type: - string - 'null' avgDischargeTimeSeconds: type: - number - 'null' format: double inputVoltage: type: - string - 'null' outputVoltage: type: - string - 'null' systemVoltage: type: - string - 'null' ceOutputType: type: - string - 'null' requiredWireLength: type: - string - 'null' description: Free input field in Salesforce. Units are specified in the string as 'm' or 'ft'. dischargeHoseLength: type: - string - 'null' description: Free input field in Salesforce. Units are specified in the string as 'm' or 'ft'. additionalProperties: false PlantGroupUpdateArgs: type: object properties: groupName: type: - string - 'null' previousGroupName: type: - string - 'null' plantIds: type: - array - 'null' items: type: integer format: int32 additionalProperties: false PlantGroupArgs: type: object properties: groupName: type: - string - 'null' systemCount: type: integer format: int32 plants: type: - array - 'null' items: $ref: '#/components/schemas/PlantArgsShort' additionalProperties: false SystemStage: enum: - Onboarding - Paused - Active type: string 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: {}