{"swagger":"2.0","info":{"version":"0.1.0","title":"AA DXT - CRM User Service"},"host":"aa-dxt-crm-user-service.dev.dxf.bosch.tech","tags":[{"name":"user"}],"schemes":["https"],"paths":{"/api/createOrUpdateUser":{"post":{"tags":["user"],"summary":"upsertUser","description":"Endpoint for writing user data.\nUpdates users in the connected Keycloak realm. The operation is either used to update new users after the registration process or to update existing users. In both cases the same data is used and the DXT interface checks what to do. Both operations are based on an already existing Keycloak account with a connected and valid CIAM ID.","operationId":"upsertUser","parameters":[{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/UpsertUserRequest"}}],"responses":{"200":{"description":"The user data was successfully updated in the store manager.","schema":{"type":"string"}},"400":{"description":"The provided user data is invalid or was not found"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend service was encountered"}}}},"/api/delete/{email}":{"delete":{"tags":["user"],"summary":"deleteUser","description":"Deletes the Keycloak account of a contact, e.g. if the user is no longer working for the customer and has no more relation to AA","operationId":"deleteUser","parameters":[{"name":"email","in":"path","description":"user email","required":true,"type":"string","x-example":"user.name@bosch.com"}],"responses":{"200":{"description":"The user data was successfully deleted.","schema":{"type":"string"}},"400":{"description":"The provided email is invalid"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend service was encountered"}}}},"/api/ready":{"get":{"operationId":"ready","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}}},"definitions":{"Customer":{"type":"object","required":["name","number"],"properties":{"name":{"type":"string","description":"The customer (store) name"},"number":{"type":"string","description":"The customer id"},"country":{"type":"string"},"classifications":{"type":"array","description":"A list of clusters that the user of this store should belong to","items":{"type":"string"}},"owner":{"type":"boolean","description":"If true then the user of the request is also the owner of this store"},"vkOrgs":{"type":"array","items":{"$ref":"#/definitions/VKOrg"}}}},"UpsertUserRequest":{"type":"object","required":["email","firstName","lastName"],"properties":{"email":{"type":"string","description":"The user email"},"firstName":{"type":"string","description":"The user's first name"},"lastName":{"type":"string","description":"The user's family name"},"customers":{"type":"array","description":"The customer entities this user belongs to. This information is used to determine the roles that the user should have.","items":{"$ref":"#/definitions/Customer"}}},"description":"This model contains all data for a single user update."},"VKOrg":{"type":"object","properties":{"salesOrg":{"type":"string"},"distChannel":{"type":"string"},"division":{"type":"string"}}}},"externalDocs":{"url":"https://inside-docupedia.bosch.com/confluence/x/1cjoS"}}