--- swagger: "2.0" info: description: "Please use the API manual" version: "v2" title: "Tradecloud User API" termsOfService: "https://www.tradecloud1.com/en/terms-and-conditions" contact: name: "Tradecloud API support" url: "https://tradecloud.gitbook.io/api/support" email: "support@tradecloud1.com" license: name: "Proprietary" url: "https://www.tradecloud1.com/en/terms-and-conditions" paths: /user/search/email: post: tags: - "user" summary: "Find user by email." operationId: "searchUserByEmailRoute" produces: - "application/json" parameters: - name: "body" in: "body" description: "Find user by email body" required: true schema: $ref: "#/definitions/SearchUserByEmail" responses: 200: description: "The user that was found." schema: $ref: "#/definitions/UserView" 404: description: "User could not be found" 403: description: "Not authorized to view user details" 500: description: "Internal server error" security: - accessToken: [] securityDefinitions: accessToken: description: "Use the access token to authenticate." type: "apiKey" name: "Authorization" in: "header" definitions: CompanyRole: type: "string" enum: - "buyer" - "supplier" - "actAsSupplier" example: "buyer" MessageMeta: type: "object" description: "Includes meta information about this UserView. Only provided when the requesting identity is part of the same company." required: - "messageId" - "source" - "createdDateTime" properties: messageId: type: "string" format: "uuid" description: "Globally unique Tradecloud identifier of this message." source: $ref: "#/definitions/MessageSource" createdDateTime: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Mandatory ISO date and time, in UTC time zone, at which this message was created." MessageSource: type: "object" description: "Includes meta information about the source of this message." required: - "traceId" properties: traceId: type: "string" format: "uuid" description: "Globally unique Tradecloud trace identifier of this message. All related messages will have the same tradeId." userId: type: "string" format: "uuid" description: "Globally unique Tradecloud user identifier which triggered the first message in a flow." companyId: type: "string" format: "uuid" description: "Globally unique Tradecloud company identifier which triggered the first message in a flow." NotificationInterval: type: "string" enum: - "realtime" - "tenminutes" - "onehour" - "daily" - "off" NotificationSettings: type: "object" required: - "interval" - "unassignedTasksSubscription" properties: interval: $ref: "#/definitions/NotificationInterval" unassignedTasksSubscription: type: "boolean" example: "false" SearchUserByEmail: type: "object" required: - email properties: email: type: "string" example: "johndoe@example.com" UserProfile: type: object required: - "firstName" - "lastName" properties: firstName: type: "string" example: "John" lastName: type: "string" example: "Doe" position: type: "string" example: "Company Employee" phoneNumber: type: "string" example: "012345678" linkedInProfile: type: "string" example: "linkedin/in/johndoe" profilePictureId: type: "string" format: "uuid" example: "384cb2dc-b7d9-4b55-a81b-6244fcf67c56" UserRole: type: "string" enum: - "admin" - "integration" - "super_user" - "support" example: "admin" UserSettings: description: "Setting that this user has configured. Only provided when the requesting identity is part of the same company." type: "object" required: - "notification" properties: externalUsername: type: "string" example: "johndoe" notification: $ref: "#/definitions/NotificationSettings" languageCode: type: "string" description: "The UI language preferred by this user. Use the ISO-639 language code." enum: - "en" - "nl" UserView: type: "object" required: - "id" - "companyId" - "roles" - "companyRoles" - "status" - "profile" properties: id: description: "The unique identifier of this user." type: "string" format: "uuid" example: "00f03b98-2511-489f-9695-13791b3f66b6" email: description: "The conctact email address of this user. Only provided when the requesting identity is part of the same company." type: "string" example: "user@example.com" companyId: description: "The unique identifier of the company that this user is part of." type: "string" format: "uuid" example: "384cb2dc-b7d9-4b55-a81b-6244fcf67c56" companyName: description: "The name of the company that this user is part of. Only provided for UserViews returned by `/search*` and `/suggest` endpoints" type: "string" example: "Business Corp." roles: description: "List of roles that this user has." type: "array" items: $ref: "#/definitions/UserRole" companyRoles: description: "List of company roles that the company has that this user is part of." type: "array" items: $ref: "#/definitions/CompanyRole" status: description: "The current status of this user." type: "string" example: "active" profile: $ref: "#/definitions/UserProfile" settings: $ref: "#/definitions/UserSettings" createdAt: description: "The date and time that this user was created. Only provided when the requesting identity is part of the same company." type: "string" format: "date-time" example: "2019-11-23T08:59:59Z" meta: $ref: "#/definitions/MessageMeta"