openapi: 3.2.0 info: title: Kelowna Production myCC - Accounts API version: v1 tags: - name: myCC - Accounts paths: /Accounts: get: tags: - myCC - Accounts summary: Get a list of the myCC accounts parameters: - 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/AccountArgsTableResults' application/json: schema: $ref: '#/components/schemas/AccountArgsTableResults' text/json: schema: $ref: '#/components/schemas/AccountArgsTableResults' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccounts x-operation-id-source: derived post: tags: - myCC - Accounts summary: Create a new myCC account requestBody: description: Details of the new account content: application/json: schema: $ref: '#/components/schemas/AccountCreationArgs' text/json: schema: $ref: '#/components/schemas/AccountCreationArgs' application/*+json: schema: $ref: '#/components/schemas/AccountCreationArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/AccountArgs' application/json: schema: $ref: '#/components/schemas/AccountArgs' text/json: schema: $ref: '#/components/schemas/AccountArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccounts x-operation-id-source: derived /Accounts/{accountId}: get: tags: - myCC - Accounts summary: Get the details of a single myCC account 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: $ref: '#/components/schemas/AccountArgs' application/json: schema: $ref: '#/components/schemas/AccountArgs' text/json: schema: $ref: '#/components/schemas/AccountArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountId x-operation-id-source: derived post: tags: - myCC - Accounts summary: Update a myCC account (by CarbonCure staff) parameters: - name: accountId in: path description: The account to update required: true schema: type: integer format: int32 requestBody: description: The new details for the account content: application/json: schema: $ref: '#/components/schemas/AccountCreationArgs' text/json: schema: $ref: '#/components/schemas/AccountCreationArgs' application/*+json: schema: $ref: '#/components/schemas/AccountCreationArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/AccountArgs' application/json: schema: $ref: '#/components/schemas/AccountArgs' text/json: schema: $ref: '#/components/schemas/AccountArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountId x-operation-id-source: derived delete: tags: - myCC - Accounts summary: Archive a myCC account parameters: - name: accountId in: path description: The account to archive required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: deleteAccountsByAccountId x-operation-id-source: derived /Accounts/{accountId}/Update: post: tags: - myCC - Accounts summary: Update a myCC account (by client) parameters: - name: accountId in: path description: The account to update required: true schema: type: integer format: int32 requestBody: description: The new details for the account content: application/json: schema: $ref: '#/components/schemas/ClientAccountUpdateArgs' text/json: schema: $ref: '#/components/schemas/ClientAccountUpdateArgs' application/*+json: schema: $ref: '#/components/schemas/ClientAccountUpdateArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/AccountArgs' application/json: schema: $ref: '#/components/schemas/AccountArgs' text/json: schema: $ref: '#/components/schemas/AccountArgs' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdUpdate x-operation-id-source: derived /Accounts/{accountId}/EnableTicker: post: tags: - myCC - Accounts summary: Enable the option of a website ticker for this account description: 'Having the ticker be enabled means that anyone on the internet has access to the customer''s production, so we prefer to have it be disabled until the user enables it. The permissions are minimal because we don''t want to add friction to the ticker user flow. However, if this endpoint is hit by a CCT staff user (email ending in carboncure.com) then it will do nothing.' parameters: - name: accountId in: path description: The account to update required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdEnableTicker x-operation-id-source: derived /Accounts/Icon/{accountId}: post: tags: - myCC - Accounts summary: Uploads an image to be used as an account icon. parameters: - name: accountId in: path description: Account to add icon for. required: true schema: type: integer format: int32 requestBody: content: multipart/form-data: schema: required: - file type: object properties: file: type: string description: The image file to upload format: binary encoding: file: style: form responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/MyCCAsset' application/json: schema: $ref: '#/components/schemas/MyCCAsset' text/json: schema: $ref: '#/components/schemas/MyCCAsset' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsIconByAccountId x-operation-id-source: derived /Accounts/Names: get: tags: - myCC - Accounts summary: Gets a list of myCC account names + IDs description: For use in dropdowns. Is sorted by name. responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/AccountDropdown' application/json: schema: type: array items: $ref: '#/components/schemas/AccountDropdown' text/json: schema: type: array items: $ref: '#/components/schemas/AccountDropdown' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsNames x-operation-id-source: derived /Accounts/CorporationNames: get: tags: - myCC - Accounts summary: Gets a list of corporation names + IDs description: For use in dropdowns. Is sorted by name. responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/CorporationDropdown' application/json: schema: type: array items: $ref: '#/components/schemas/CorporationDropdown' text/json: schema: type: array items: $ref: '#/components/schemas/CorporationDropdown' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsCorporationNames x-operation-id-source: derived /Accounts/DivisionNames: get: tags: - myCC - Accounts summary: Gets a list of division names + IDs description: For use in dropdowns. Is sorted by name. responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/DivisionDropdown' application/json: schema: type: array items: $ref: '#/components/schemas/DivisionDropdown' text/json: schema: type: array items: $ref: '#/components/schemas/DivisionDropdown' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsDivisionNames x-operation-id-source: derived /Accounts/CorporationStaff: get: tags: - myCC - Accounts summary: Gets the CarbonCure staff members assigned to a given corporation in Salesforce parameters: - name: corporationId in: query description: The ID of the corporation to get staff members for schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/StaffMembers' application/json: schema: $ref: '#/components/schemas/StaffMembers' text/json: schema: $ref: '#/components/schemas/StaffMembers' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsCorporationStaff x-operation-id-source: derived /Accounts/CorporationLanes: get: tags: - myCC - Accounts summary: Gets the lanes of a given corporation parameters: - name: corporationId in: query description: The ID of the corporation to get lane details for schema: type: integer format: int32 - name: divisionId in: query description: The ID of the division to get lane details for 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: getAccountsCorporationLanes x-operation-id-source: derived components: schemas: StaffMembers: type: object properties: technicalRepId: type: - integer - 'null' format: int32 salesRepId: type: - integer - 'null' format: int32 strategicAccountManagerId: type: - integer - 'null' format: int32 installEquipmentRepId: type: - integer - 'null' format: int32 additionalProperties: false CorporationDropdown: type: object properties: corporationId: type: integer format: int32 name: type: - string - 'null' 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 Language: enum: - English - Spanish - NL - FR - DE - IT - ES - ES_MX - PT - PT_BR - JP - ZH_TW - ZH_CN - KO - ID - EN_GB - EN_US - EN_CA - TL - TH type: string AccountCreationArgs: type: object properties: name: type: - string - 'null' isPartner: type: boolean corporationId: type: - integer - 'null' format: int32 divisionId: type: - integer - 'null' format: int32 parentAccountId: type: - integer - 'null' format: int32 isMetric: type: boolean hasCreditsDashboard: type: boolean hasOnboardingPortal: type: boolean startDate: type: string format: date language: $ref: '#/components/schemas/Language' technicalRepId: type: - integer - 'null' format: int32 salesRepId: type: - integer - 'null' format: int32 strategicAccountManagerId: type: - integer - 'null' format: int32 installEquipmentRepId: type: - integer - 'null' format: int32 iconLocation: type: - string - 'null' childAccountIds: type: - array - 'null' items: type: integer format: int32 additionalProperties: false MyCCAsset: required: - name type: object properties: name: minLength: 1 type: string fileExtension: type: - string - 'null' sizeBytes: type: - number - 'null' format: double myCCAssetId: type: integer format: int32 mongoId: type: - string - 'null' path: type: - string - 'null' assetType: $ref: '#/components/schemas/AssetType' description: type: - string - 'null' link: type: - string - 'null' lastUpdatedTimestamp: type: - string - 'null' format: date-time thumbnailLink: type: - string - 'null' isKeyResource: type: - boolean - 'null' thumbnailS3BucketPath: type: - string - 'null' hasThumbnail: type: boolean readOnly: true myCCAccountId: type: - integer - 'null' format: int32 myCCAccountName: type: - string - 'null' readOnly: true isHidden: type: boolean additionalProperties: false PlantType: enum: - ReadyMix - Masonry - Precast type: string RepresentativeArgs: type: object properties: repId: type: integer format: int32 name: type: - string - 'null' phone: type: - string - 'null' email: type: - string - 'null' iconUrl: type: - string - 'null' additionalProperties: false SortOrder: enum: - Ascending - Descending type: string ChildAccountArgs: type: object properties: myCCAccountId: type: integer format: int32 name: type: - string - 'null' plantCount: type: integer format: int32 additionalProperties: false DivisionDropdown: type: object properties: divisionId: type: integer format: int32 name: type: - string - 'null' corporationId: type: integer format: int32 isImperial: type: boolean additionalProperties: false AccountArgs: type: object properties: myCCAccountId: type: integer format: int32 name: type: - string - 'null' isPartner: type: boolean corporationId: type: - integer - 'null' format: int32 corporationName: type: - string - 'null' divisionId: type: - integer - 'null' format: int32 divisionName: type: - string - 'null' isMetric: type: boolean startDate: type: string format: date parentAccountId: type: - integer - 'null' format: int32 parentAccountName: type: - string - 'null' lastActivityTimestamp: type: string format: date-time language: $ref: '#/components/schemas/Language' technicalRep: $ref: '#/components/schemas/RepresentativeArgs' salesRep: $ref: '#/components/schemas/RepresentativeArgs' strategicAccountManager: $ref: '#/components/schemas/RepresentativeArgs' installEquipmentRep: $ref: '#/components/schemas/RepresentativeArgs' iconLocation: type: - string - 'null' isTickerEnabled: type: boolean plantCount: type: integer format: int32 userCount: type: integer format: int32 technologies: type: - array - 'null' items: type: string hasCreditsDashboard: type: boolean hasOnboardingPortal: type: boolean childAccounts: type: - array - 'null' items: $ref: '#/components/schemas/ChildAccountArgs' additionalProperties: false AccountArgsTableResults: type: object properties: count: type: integer format: int32 results: type: - array - 'null' items: $ref: '#/components/schemas/AccountArgs' additionalProperties: false ClientAccountUpdateArgs: type: object properties: isMetric: type: boolean iconLocation: type: - string - 'null' additionalProperties: false AccountDropdown: type: object properties: myCCAccountId: type: integer format: int32 name: type: - string - 'null' additionalProperties: false AssetType: enum: - File - Folder - ExternalLink - Icon 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: {}