openapi: 3.2.0 info: title: Kelowna Production myCC - Users API version: v1 tags: - name: myCC - Users paths: /ForgotPassword: get: tags: - myCC - Users summary: Sends a password reset link to the email provided description: 'The endpoint returns a 200 regardless of whether or not there is an account by that email, and regardless of whether or not we were able to send the email. This prevents attackers from gaining any information.' parameters: - name: email in: query description: The email of the user account we forgot the password to schema: type: string responses: '200': description: OK security: - {} - {} - {} operationId: getForgotPassword x-operation-id-source: derived /CheckChangePasswordId: post: tags: - myCC - Users summary: Check if a Change Password Id is valid description: This returns true if a user exists with the given Change Password ID, and False if no user exists requestBody: content: application/json: schema: type: string text/json: schema: type: string application/*+json: schema: type: string responses: '200': description: OK content: text/plain: schema: type: boolean application/json: schema: type: boolean text/json: schema: type: boolean security: - {} - {} - {} operationId: postCheckChangePasswordId x-operation-id-source: derived /Users/ChangePasswordLoggedOut: post: tags: - myCC - Users summary: Changes the password of a myCC user when given the Change Password Id requestBody: description: The current password, and the password id content: application/json: schema: $ref: '#/components/schemas/ChangePasswordLoggedOutArgs' text/json: schema: $ref: '#/components/schemas/ChangePasswordLoggedOutArgs' application/*+json: schema: $ref: '#/components/schemas/ChangePasswordLoggedOutArgs' responses: '200': description: OK security: - {} - {} - {} operationId: postUsersChangePasswordLoggedOut x-operation-id-source: derived /Users/CarbonCureStaff: get: tags: - myCC - Users summary: Gets the CarbonCure users registered in the system responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/StaffUserResponse' application/json: schema: type: array items: $ref: '#/components/schemas/StaffUserResponse' text/json: schema: type: array items: $ref: '#/components/schemas/StaffUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getUsersCarbonCureStaff x-operation-id-source: derived post: tags: - myCC - Users summary: Adds a new CarbonCure staff user to the myCC system requestBody: description: The details of the new user content: application/json: schema: $ref: '#/components/schemas/MyCCUserArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/StaffUserResponse' application/json: schema: $ref: '#/components/schemas/StaffUserResponse' text/json: schema: $ref: '#/components/schemas/StaffUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersCarbonCureStaff x-operation-id-source: derived /Users/CarbonCureStaff/{userId}: post: tags: - myCC - Users summary: Updates a CarbonCure staff user parameters: - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 requestBody: description: The new details for the user content: application/json: schema: $ref: '#/components/schemas/MyCCUserArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/StaffUserResponse' application/json: schema: $ref: '#/components/schemas/StaffUserResponse' text/json: schema: $ref: '#/components/schemas/StaffUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersCarbonCureStaffByUserId x-operation-id-source: derived delete: tags: - myCC - Users summary: Deletes a CarbonCure staff user parameters: - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: deleteUsersCarbonCureStaffByUserId x-operation-id-source: derived /Users/CarbonCureStaff/{userId}/ResendInvite: post: tags: - myCC - Users summary: Resends the invitation email to a CarbonCure staff user parameters: - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersCarbonCureStaffByUserIdResendInvite x-operation-id-source: derived /Accounts/{accountId}/Users: get: tags: - myCC - Users summary: Gets the users associated with a 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: type: array items: $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: type: array items: $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: type: array items: $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getAccountsByAccountIdUsers x-operation-id-source: derived post: tags: - myCC - Users summary: Adds a new user to a myCC account description: When a user is excluded from receiving an email invite, the user is registered in Kelowna, but not externally. parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: shouldExcludeFromInvite in: query description: Indicates whether the user should be invited to set a password. schema: type: boolean default: false requestBody: description: The details of the new user content: application/json: schema: $ref: '#/components/schemas/MyCCUserArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdUsers x-operation-id-source: derived /Accounts/{accountId}/InviteUser/{userId}: post: tags: - myCC - Users summary: Sends invite email to a user for the first time. parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdInviteUserByUserId x-operation-id-source: derived /Accounts/{accountId}/Users/{userId}: post: tags: - myCC - Users summary: Updates a myCC user parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 requestBody: description: The new details for the user content: application/json: schema: $ref: '#/components/schemas/MyCCUserArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdUsersByUserId x-operation-id-source: derived delete: tags: - myCC - Users summary: Deletes a myCC user parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: deleteAccountsByAccountIdUsersByUserId x-operation-id-source: derived /Accounts/{accountId}/Users/{userId}/ResendInvite: post: tags: - myCC - Users summary: Resends the invitation email to a myCC user description: 'Note: This endpoint will invalidate previously-sent invite emails!' parameters: - name: accountId in: path description: The ID of the myCC account required: true schema: type: integer format: int32 - name: userId in: path description: The ID of the user required: true schema: type: integer format: int32 responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postAccountsByAccountIdUsersByUserIdResendInvite x-operation-id-source: derived /Users/Me: get: tags: - myCC - Users summary: Gets the details of the current user responses: '200': description: OK content: text/plain: schema: oneOf: - $ref: '#/components/schemas/UserResponse' - $ref: '#/components/schemas/StaffUserResponse' - $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: oneOf: - $ref: '#/components/schemas/UserResponse' - $ref: '#/components/schemas/StaffUserResponse' - $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: oneOf: - $ref: '#/components/schemas/UserResponse' - $ref: '#/components/schemas/StaffUserResponse' - $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: getUsersMe x-operation-id-source: derived /Users/Me/BasicInfo: put: tags: - myCC - Users summary: Updates basic information for the currently logged in user description: 'This endpoint only updates the name, job, and phone number fields. It is meant to be used by customer staff and manager users. Admin users should use `POST /Accounts/{accountId}/Users/{userId}`.' requestBody: description: The new details for the user content: application/json: schema: $ref: '#/components/schemas/MyCCUserArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserArgs' responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/MyCCUserResponse' application/json: schema: $ref: '#/components/schemas/MyCCUserResponse' text/json: schema: $ref: '#/components/schemas/MyCCUserResponse' security: - {} - MyCCAuth: - applicationId - roles - {} operationId: putUsersMeBasicInfo x-operation-id-source: derived /Users/ChangePasswordLoggedIn: post: tags: - myCC - Users summary: Changes the password of a myCC user when given the Current Password requestBody: description: The current password, and new password content: application/json: schema: $ref: '#/components/schemas/ChangePasswordLoggedInArgs' text/json: schema: $ref: '#/components/schemas/ChangePasswordLoggedInArgs' application/*+json: schema: $ref: '#/components/schemas/ChangePasswordLoggedInArgs' responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersChangePasswordLoggedIn x-operation-id-source: derived /Users/Settings: post: tags: - myCC - Users summary: Changes the settings of a myCC user requestBody: description: The new settings content: application/json: schema: $ref: '#/components/schemas/MyCCUserSettingArgs' text/json: schema: $ref: '#/components/schemas/MyCCUserSettingArgs' application/*+json: schema: $ref: '#/components/schemas/MyCCUserSettingArgs' responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersSettings x-operation-id-source: derived /Users/AcceptPolicies: post: tags: - myCC - Users summary: Accepts the myCC privacy policy for the current user responses: '200': description: OK security: - {} - MyCCAuth: - applicationId - roles - {} operationId: postUsersAcceptPolicies x-operation-id-source: derived components: schemas: MyCCUserResponse: allOf: - $ref: '#/components/schemas/UserResponse' - type: object properties: permissionGroup: $ref: '#/components/schemas/PermissionGroup' primaryContactType: $ref: '#/components/schemas/PrimaryContactType' isPrimaryContact: type: boolean myCCAccountId: type: integer format: int32 additionalProperties: false MyCCNotificationsResponse: type: object properties: hasNewFeatureSub: type: boolean hasPositionSub: type: boolean hasTestingSub: type: boolean hasActionItemsSub: type: boolean hasPlantUpdatesSub: type: boolean hasNewOnboardingTaskSub: type: boolean hasOngoingTasksSub: type: boolean hasCreditUpdatesSub: type: boolean subscriptionsChangedTimestamp: type: - string - 'null' format: date-time additionalProperties: false MyCCUserArgs: type: object properties: email: type: - string - 'null' firstName: type: - string - 'null' lastName: type: - string - 'null' permissionGroup: $ref: '#/components/schemas/PermissionGroup' jobTitle: type: - string - 'null' jobField: type: - array - 'null' items: type: string phone: type: - string - 'null' primaryContactType: $ref: '#/components/schemas/PrimaryContactType' isPrimaryContact: type: - boolean - 'null' photoUrl: type: - string - 'null' repType: type: - array - 'null' items: type: string 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 MyCCUserNotificationSettingsArgs: type: object properties: hasNewFeatureSub: type: boolean hasPositionSub: type: boolean hasTestingSub: type: boolean hasActionItemsSub: type: boolean hasPlantUpdatesSub: type: boolean hasCreditUpdatesSub: type: boolean hasNewOnboardingTaskSub: type: boolean hasOngoingTasksSub: type: boolean additionalProperties: false UserResponse: type: object properties: userId: type: integer format: int32 email: type: - string - 'null' firstName: type: - string - 'null' lastName: type: - string - 'null' isDisabled: type: boolean naiveFullName: type: - string - 'null' externalUserId: type: - string - 'null' wasInviteSent: type: boolean isRegisteredInFusionAuth: type: boolean jobTitle: type: - string - 'null' jobField: type: - array - 'null' items: type: string phone: type: - string - 'null' language: $ref: '#/components/schemas/Language' numericFormat: type: - string - 'null' allowsFunctionalCookies: type: - boolean - 'null' allowsAnalyticsCookies: type: - boolean - 'null' enviroContactName: type: - string - 'null' enviroContactPhone: type: - string - 'null' enviroContactEmail: type: - string - 'null' enviroContactWebsite: type: - string - 'null' settingsChangedTimestamp: type: - string - 'null' format: date-time policiesAcceptedTimestamp: type: - string - 'null' format: date-time lastActivityTimestamp: type: - string - 'null' description: The time of the latest activity by this user in myCarbonCure format: date-time wantsNewFeatureEmail: type: boolean wantsPositionEmail: type: boolean wantsTestingEmail: type: boolean wantsCreditProgramEmail: type: boolean notificationPreferences: $ref: '#/components/schemas/MyCCNotificationsResponse' additionalProperties: false PrimaryContactType: enum: - Owner - QcManager - Operations - ItContact - Other type: string ChangePasswordLoggedInArgs: type: object properties: currentPassword: type: - string - 'null' newPassword: type: - string - 'null' additionalProperties: false MyCCUserSettingArgs: type: object properties: language: $ref: '#/components/schemas/Language' numericFormat: type: - string - 'null' wantsNewFeatureEmail: type: boolean wantsPositionEmail: type: boolean wantsTestingEmail: type: boolean allowsCookies: type: - boolean - 'null' allowsFunctionalCookies: type: - boolean - 'null' allowsAnalyticsCookies: type: - boolean - 'null' enviroContactName: type: - string - 'null' enviroContactPhone: type: - string - 'null' enviroContactEmail: type: - string - 'null' enviroContactWebsite: type: - string - 'null' subscriptionSettings: $ref: '#/components/schemas/MyCCUserNotificationSettingsArgs' additionalProperties: false ChangePasswordLoggedOutArgs: type: object properties: changePasswordId: type: - string - 'null' newPassword: type: - string - 'null' additionalProperties: false PermissionGroup: enum: - Staff - Manager - Admin type: string StaffUserResponse: allOf: - $ref: '#/components/schemas/UserResponse' - type: object properties: photoUrl: type: - string - 'null' description: 'For backwards compatibility until public assets are deprecated. Refer to IconId for asset reference instead.' iconId: type: - integer - 'null' format: int32 alarmNotificationsEnabled: type: boolean rwAlarmNotificationsEnabled: type: boolean 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: {}