@epilot/customer-portal-client 0.8.21 → 0.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +5 -2
- package/package.json +1 -1
- package/src/openapi.d.ts +3161 -0
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={914:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(i(534));t.default=o.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Portal API","description":"Backend for epilot portals - End Customer Portal & Installer Portal","version":"1.0.0"},"tags":[{"name":"ECP","description":"APIs defined for a portal user"},{"name":"ECP Admin","description":"APIs defined for a ECP Admin"},{"name":"Public","description":"Public APIs"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"paths":{"/v2/portal/portal":{"post":{"operationId":"upsertPortal","summary":"upsertPortal","description":"Upserts the settings for a portal of an organization.","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}}}}},"responses":{"201":{"description":"Portal upserted successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/user":{"post":{"operationId":"createUser","summary":"createUser","description":"Registers a portal user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal user payload","required":true,"content":{"application/json":{"schema":{"required":["email","orgId","password"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},{"properties":{"orgId":{"type":"string","example":728,"description":"ID of the organization"},"password":{"type":"string","example":"124n$aAJs*d41h4","description":"User\'s password"},"secondaryIdentifier":{"type":"string","example":123456,"description":"Secondary identifier to identify a contact"},"contactId":{"type":"string","example":123456,"description":"ID of the contact"}}}]}}}},"responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"type":"object","required":["message","response"],"properties":{"message":{"type":"string","enum":["User created successfully"]},"response":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/sso/user":{"post":{"operationId":"createSSOUser","summary":"createSSOUser","description":"Creates a portal user as an SSO user.","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal user payload","required":true,"content":{"application/json":{"schema":{"required":["email"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}}]}}}},"responses":{"201":{"description":"SSO User created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/config":{"get":{"operationId":"getPortalConfigByDomain","summary":"getPortalConfigByDomain","description":"Retrieves the portal configuration by domain.","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","example":"example.com","description":"Domain of the portal"}}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"Retrieves the portal configuration.","tags":["ECP Admin","ECP"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deletePortal","summary":"deletePortal","description":"Deletes the portal.","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]}],"responses":{"204":{"description":"Portal deleted successfully."},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/portal/config":{"get":{"operationId":"getPublicPortalConfig","summary":"getPublicPortalConfig","description":"Retrieves the public portal configuration.","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":12324,"description":"Organization ID"}},{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/org/portal/config":{"get":{"operationId":"getOrgPortalConfig","summary":"getOrgPortalConfig","description":"Retrieves the portal configuration for the organization.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/configs":{"get":{"operationId":"getAllPortalConfigs","summary":"getAllPortalConfigs","description":"Retrieves all portal configurations.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"All portal configs retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/email-templates":{"post":{"operationId":"upsertEmailTemplates","summary":"upsertEmailTemplates","description":"Upserts the email templates of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Email templates payload","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}},"responses":{"200":{"description":"Upserted email templates of the portal successfully.","content":{"application/json":{"schema":{"type":"object","required":["message","emailTemplates"],"properties":{"message":{"type":"string","enum":["Email Templates upserted successfully"]},"emailTemplates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"get":{"operationId":"getEmailTemplates","summary":"getEmailTemplates","description":"Retrieves the email templates of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Retrieved the email templates successfully.","content":{"application/json":{"schema":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/replace-ecp-template-variables":{"post":{"operationId":"replaceECPTemplateVariables","summary":"replaceECPTemplateVariables","description":"Replaces the template variables of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"ECPVariables payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","example":"7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51","description":"ID of the contact"}}}}}},"responses":{"200":{"description":"Replaced portal template variables successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"portalUser":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/register/existing-customer?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/org/settings":{"get":{"operationId":"getOrganizationSettings","summary":"getOrganizationSettings","description":"Retrieves the organization settings.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieved the settings for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation entity mapping"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation preview"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable central inbox preview setting"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable contracts preview setting"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable Ivy"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable double opt-in"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce catalog preview"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce opportunities preview"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce preview"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable end customer portal"}}},"installer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable installer portal"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable entity schema builder"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable logic editor preview"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable new navigation"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable partnering"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable product availability"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable single sign-on (SSO)"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable submission preview"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable user roles preview"}}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/schemas":{"get":{"operationId":"getSchemas","summary":"getSchemas","description":"Retrieves the schemas.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieved schemas for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of the schema","example":"contact"}},"additionalProperties":true}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/extra-permission-attributes":{"get":{"operationId":"extraPermissionAttributes","summary":"extraPermissionAttributes","description":"Retrieves the extra permission attributes.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Retrieved extra permission attributes successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"contract":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"order":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"opportunity":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"meter":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"meter_counter":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}}}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact":{"get":{"operationId":"getContact","summary":"getContact","description":"Retrieves the contact by ID.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieves the mapped contact of the logged in user successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]},"files":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Updates the contact details.","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the contact details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/ecp/contact":{"get":{"operationId":"getECPContact","summary":"getECPContact","description":"Get the Contact by id","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"id","required":true,"schema":{"description":"ID of the mapped contact","type":"string","example":1234}}],"responses":{"200":{"description":"The contact returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact/email/count":{"get":{"operationId":"getCountByEmail","summary":"getCountByEmail","description":"Check Contact by email","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","description":"Portal user Email Address","example":"test@test.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","description":"Organization ID","example":123}}],"responses":{"200":{"description":"Contact count for the requested email successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Count of Contact","example":2}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact/valid/secondary/attributes":{"get":{"operationId":"getValidSecondaryAttributes","summary":"getValidSecondaryAttributes","description":"Get valid secondary attributes that are used while mapping a contact on registration","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Valid secondary attributes for the contact entity are returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the secondary attribute","example":"first_name"},"type":{"type":"string","description":"Type of the secondary attribute","example":"string"}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/user":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"Get the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Portal user returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updatePortalUser","summary":"updatePortalUser","description":"Update the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The portal user updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deletePortalUser","summary":"deletePortalUser","description":"Delete the portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Portal user deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["User Succesfully Deleted"]},"data":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/user/confirm/{id}":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"Confirm a portal user","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}},{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of portal user id"},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123},"description":"Organization ID"}],"responses":{"301":{"description":"User is confirmed and redirected to the portal successfully."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/user/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the portal","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","description":"Email Address of the portal user","example":"user@example.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","description":"Organization ID","example":123}}],"responses":{"200":{"description":"Returned whether the user exists in the portal or not successfully.","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean","description":"Whether the user exists in the portal","example":true},"user":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/configure-distribution":{"get":{"operationId":"configureDistribution","summary":"configureDistribution","description":"Configure the distribution for the portal\'s custom domain","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"The cloudfront distribution has been configure successfully for the custom domain.","content":{"application/json":{"schema":{"type":"object","properties":{"domainName":{"type":"string","description":"The domain name of the configured distribution","example":"dsj8op4ha01jha23.cloudfront.net"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/order":{"get":{"operationId":"getAllOrders","summary":"getAllOrders","description":"Get all orders for the portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The orders for the portal user returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/order/{id}":{"get":{"operationId":"getOrder","summary":"getOrder","description":"Get an order by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of order"}],"responses":{"200":{"description":"The requested order has been retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]},"files":{"type":"array","description":"The related files of the requested order","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested order","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"products":{"type":"array","description":"The related products of the requested order","items":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]}},"crossSellableProducts":{"type":"array","description":"The related cross sellable products of the requested order","items":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]}},"workflow":{"type":"array","description":"The related workflows of the requested order","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateOrder","summary":"updateOrder","description":"Update an order by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of order"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the order details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/opportunity":{"get":{"operationId":"getAllOpportunities","summary":"getAllOpportunities","description":"Get all opportunities of a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The opportunities is retrieved successfully for the portal user.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/opportunities/{id}":{"get":{"operationId":"getOpportunity","summary":"getOpportunity","description":"Get an opportunity by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of opportunity"}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]},"orders":{"type":"array","description":"The related orders of the requested opportunity","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}},"files":{"type":"array","description":"The related files of the requested opportunity","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested opportunity","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"workflow":{"type":"array","description":"The related workflows of the requested opportunity","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateOpportunity","summary":"updateOpportunity","description":"Update an opportunity by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of opportunity"}],"requestBody":{"description":"Requested opportunity body to update","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the opportunity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contract":{"get":{"operationId":"getAllContracts","summary":"getAllContracts","description":"Get all contracts for a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Contracts have been retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contract/{id}":{"get":{"operationId":"getContract","summary":"getContract","description":"Get a contract by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the contract"}],"responses":{"200":{"description":"The requested contract returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]},"orders":{"type":"array","description":"The related orders of the requested contract","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}},"files":{"type":"array","description":"The related files of the requested contract","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested contract","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"workflow":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateContract","summary":"updateContract","description":"Update a contract by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the contract"}],"requestBody":{"description":"Requested contract body to update","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the contract successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/identifiers/{slug}":{"get":{"operationId":"getEntityIdentifiers","summary":"getEntityIdentifiers","description":"Retrieve a list of entity identifiers used for entity search by portal users.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"}],"responses":{"200":{"description":"The identifiers of the requested entity returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the identifier","example":"contract_number"},"type":{"type":"string","description":"The type of the identifier","example":"string"}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/by-identifiers/{slug}":{"post":{"operationId":"getEntitiesByIdentifiers","summary":"getEntitiesByIdentifiers","description":"Get entities by identifiers by portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"}],"requestBody":{"description":"The entities are retrieved successfully.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true,"example":"```json\\n {\\n \\"name\\": \\"My Contract\\",\\n \\"contract_number\\": \\"123\\"\\n }\\n```\\n"}}}},"responses":{"200":{"description":"The returned Entities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/add-end-customer/{slug}/{id}":{"put":{"operationId":"addEndCustomerRelationToEntity","summary":"addEndCustomerRelationToEntity","description":"Add portal user relation to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"},{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the Entity"}],"responses":{"200":{"description":"Portal user is added as a relation to the requested entity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/file":{"post":{"operationId":"saveEntityFile","summary":"saveEntityFile","description":"Add files to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"The request of an file entity","required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_entity_id":{"type":"string","example":12345,"description":"File entity ID"},"document_type":{"type":"string","example":12345,"description":"Document type"},"access_control":{"type":"string","default":"private","enum":["private","public-read"],"description":"Access control level for the file"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}}}}},"responses":{"201":{"description":"The files have been saved to the entitiy successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deleteEntityFile","summary":"deleteEntityFile","description":"Delete files from an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Delete file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345},"description":"Array of file entity IDs"}}}}}},"responses":{"202":{"description":"The files are removed from the requested entity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFiles":{"type":"array","items":{"type":"string","description":"File ID","example":"00250c75-afd4-4c94-ba7a-ba0df638eba5"}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/portal/files":{"post":{"operationId":"savePortalFiles","summary":"savePortalFiles","description":"Add files to portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"portal files request","required":true,"content":{"application/json":{"schema":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_type":{"type":"string","example":"orderRightTeaser","description":"File type"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}}}}},"responses":{"201":{"description":"The files have been saved to the portal successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}}},"components":{"responses":{"InvalidRequest":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"Unauthorized":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"Forbidden":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}},"securitySchemes":{"PortalAuth":{"type":"http","scheme":"bearer","description":"Portal Cognito Token"},"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id as internal user"},"AsContact":{"type":"apiKey","in":"header","name":"x-contact-id","description":"Set contact id as internal user"},"AsCustomer":{"type":"apiKey","in":"header","name":"x-portal-user-id","description":"Set portal id as customer"}},"schemas":{"ErrorResp":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}},"EmailTemplates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"DeleteEntityFile":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345},"description":"Array of file entity IDs"}}},"SaveEntityFile":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_entity_id":{"type":"string","example":12345,"description":"File entity ID"},"document_type":{"type":"string","example":12345,"description":"Document type"},"access_control":{"type":"string","default":"private","enum":["private","public-read"],"description":"Access control level for the file"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}},"SavePortalFile":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_type":{"type":"string","example":"orderRightTeaser","description":"File type"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}},"ExtraSchemaAttributes":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"Origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"UpsertPortalConfig":{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},"PortalConfig":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"description":"Default admin user for pending user notification to notify","type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]},"UserRequest":{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},"CreateUserRequest":{"required":["email","orgId","password"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},{"properties":{"orgId":{"type":"string","example":728,"description":"ID of the organization"},"password":{"type":"string","example":"124n$aAJs*d41h4","description":"User\'s password"},"secondaryIdentifier":{"type":"string","example":123456,"description":"Secondary identifier to identify a contact"},"contactId":{"type":"string","example":123456,"description":"ID of the contact"}}}]},"CreateSSOUserRequest":{"required":["email"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}}]},"OrganizationSettings":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation entity mapping"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation preview"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable central inbox preview setting"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable contracts preview setting"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable Ivy"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable double opt-in"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce catalog preview"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce opportunities preview"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce preview"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable end customer portal"}}},"installer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable installer portal"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable entity schema builder"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable logic editor preview"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable new navigation"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable partnering"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable product availability"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable single sign-on (SSO)"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable submission preview"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable user roles preview"}}}}},"AuthConfig":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"AWS Cognito User Pool ID"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"AWS Cognito User Pool Client ID"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1","description":"AWS Cognito User Pool Identity Pool ID"},"portal_id":{"type":"string","example":"7h2hwdj7hhjsdcjkq03eidna3ep","description":"Portal ID"}},"required":["user_pool_id","user_pool_client_id","portal_id"]},"Exists":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean","description":"Indicate whether the item exists"},"active":{"type":"boolean","description":"Indicate whether the item is active"}},"example":{"exists":true,"active":false}},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"EntityId":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"BaseEntity":{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},"Schema":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of the schema","example":"contact"}},"additionalProperties":true},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]},"PortalUser":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]},"Contact":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]},"Order":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]},"Opportunity":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]},"Contract":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]},"File":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]},"Product":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]},"AdminUser":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"Grant":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]},"WorkflowExecution":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}')}},t={},i=function i(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,i),a.exports}(914),r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var e={914:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(i(534));t.default=o.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Portal API","description":"Backend for epilot portals - End Customer Portal & Installer Portal","version":"1.0.0"},"tags":[{"name":"ECP","description":"APIs defined for a portal user"},{"name":"ECP Admin","description":"APIs defined for a ECP Admin"},{"name":"Public","description":"Public APIs"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"paths":{"/v2/portal/portal":{"post":{"operationId":"upsertPortal","summary":"upsertPortal","description":"Upserts the settings for a portal of an organization.","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}}}}},"responses":{"201":{"description":"Portal upserted successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/user":{"post":{"operationId":"createUser","summary":"createUser","description":"Registers a portal user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal user payload","required":true,"content":{"application/json":{"schema":{"required":["email","orgId","password"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},{"properties":{"orgId":{"type":"string","example":728,"description":"ID of the organization"},"password":{"type":"string","example":"124n$aAJs*d41h4","description":"User\'s password"},"secondaryIdentifier":{"type":"string","example":123456,"description":"Secondary identifier to identify a contact"},"contactId":{"type":"string","example":123456,"description":"ID of the contact"}}}]}}}},"responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"type":"object","required":["message","response"],"properties":{"message":{"type":"string","enum":["User created successfully"]},"response":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/sso/user":{"post":{"operationId":"createSSOUser","summary":"createSSOUser","description":"Creates a portal user as an SSO user.","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Portal user payload","required":true,"content":{"application/json":{"schema":{"required":["email"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}}]}}}},"responses":{"201":{"description":"SSO User created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/config":{"get":{"operationId":"getPortalConfigByDomain","summary":"getPortalConfigByDomain","description":"Retrieves the portal configuration by domain.","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","example":"example.com","description":"Domain of the portal"}}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"Retrieves the portal configuration.","tags":["ECP Admin","ECP"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deletePortal","summary":"deletePortal","description":"Deletes the portal.","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]}],"responses":{"204":{"description":"Portal deleted successfully."},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/portal/config":{"get":{"operationId":"getPublicPortalConfig","summary":"getPublicPortalConfig","description":"Retrieves the public portal configuration.","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":12324,"description":"Organization ID"}},{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/org/portal/config":{"get":{"operationId":"getOrgPortalConfig","summary":"getOrgPortalConfig","description":"Retrieves the portal configuration for the organization.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/configs":{"get":{"operationId":"getAllPortalConfigs","summary":"getAllPortalConfigs","description":"Retrieves all portal configurations.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"All portal configs retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/email-templates":{"post":{"operationId":"upsertEmailTemplates","summary":"upsertEmailTemplates","description":"Upserts the email templates of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"Email templates payload","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}},"responses":{"200":{"description":"Upserted email templates of the portal successfully.","content":{"application/json":{"schema":{"type":"object","required":["message","emailTemplates"],"properties":{"message":{"type":"string","enum":["Email Templates upserted successfully"]},"emailTemplates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"get":{"operationId":"getEmailTemplates","summary":"getEmailTemplates","description":"Retrieves the email templates of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"responses":{"200":{"description":"Retrieved the email templates successfully.","content":{"application/json":{"schema":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/replace-ecp-template-variables":{"post":{"operationId":"replaceECPTemplateVariables","summary":"replaceECPTemplateVariables","description":"Replaces the template variables of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"description":"Origin of the portal"}],"requestBody":{"description":"ECPVariables payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","example":"7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51","description":"ID of the contact"}}}}}},"responses":{"200":{"description":"Replaced portal template variables successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"portalUser":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/register/existing-customer?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/org/settings":{"get":{"operationId":"getOrganizationSettings","summary":"getOrganizationSettings","description":"Retrieves the organization settings.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieved the settings for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation entity mapping"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation preview"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable central inbox preview setting"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable contracts preview setting"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable Ivy"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable double opt-in"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce catalog preview"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce opportunities preview"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce preview"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable end customer portal"}}},"installer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable installer portal"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable entity schema builder"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable logic editor preview"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable new navigation"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable partnering"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable product availability"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable single sign-on (SSO)"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable submission preview"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable user roles preview"}}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/schemas":{"get":{"operationId":"getSchemas","summary":"getSchemas","description":"Retrieves the schemas.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieved schemas for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of the schema","example":"contact"}},"additionalProperties":true}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/extra-permission-attributes":{"get":{"operationId":"extraPermissionAttributes","summary":"extraPermissionAttributes","description":"Retrieves the extra permission attributes.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Retrieved extra permission attributes successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"contract":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"order":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"opportunity":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"meter":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"meter_counter":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}}}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact":{"get":{"operationId":"getContact","summary":"getContact","description":"Retrieves the contact by ID.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieves the mapped contact of the logged in user successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]},"files":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Updates the contact details.","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the contact details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/ecp/contact":{"get":{"operationId":"getECPContact","summary":"getECPContact","description":"Get the Contact by id","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"id","required":true,"schema":{"description":"ID of the mapped contact","type":"string","example":1234}}],"responses":{"200":{"description":"The contact returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact/email/count":{"get":{"operationId":"getCountByEmail","summary":"getCountByEmail","description":"Check Contact by email","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","description":"Portal user Email Address","example":"test@test.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","description":"Organization ID","example":123}}],"responses":{"200":{"description":"Contact count for the requested email successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","description":"Count of Contact","example":2}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contact/valid/secondary/attributes":{"get":{"operationId":"getValidSecondaryAttributes","summary":"getValidSecondaryAttributes","description":"Get valid secondary attributes that are used while mapping a contact on registration","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Valid secondary attributes for the contact entity are returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the secondary attribute","example":"first_name"},"type":{"type":"string","description":"Type of the secondary attribute","example":"string"}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/user":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"Get the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Portal user returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updatePortalUser","summary":"updatePortalUser","description":"Update the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The portal user updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deletePortalUser","summary":"deletePortalUser","description":"Delete the portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Portal user deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["User Succesfully Deleted"]},"data":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/user/confirm/{id}":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"Confirm a portal user","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}},{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of portal user id"},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123},"description":"Organization ID"}],"responses":{"301":{"description":"User is confirmed and redirected to the portal successfully."},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/public/user/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the portal","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","description":"Email Address of the portal user","example":"user@example.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","description":"Organization ID","example":123}}],"responses":{"200":{"description":"Returned whether the user exists in the portal or not successfully.","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean","description":"Whether the user exists in the portal","example":true},"user":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/configure-distribution":{"get":{"operationId":"configureDistribution","summary":"configureDistribution","description":"Configure the distribution for the portal\'s custom domain","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"The cloudfront distribution has been configure successfully for the custom domain.","content":{"application/json":{"schema":{"type":"object","properties":{"domainName":{"type":"string","description":"The domain name of the configured distribution","example":"dsj8op4ha01jha23.cloudfront.net"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/order":{"get":{"operationId":"getAllOrders","summary":"getAllOrders","description":"Get all orders for the portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The orders for the portal user returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/order/{id}":{"get":{"operationId":"getOrder","summary":"getOrder","description":"Get an order by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of order"}],"responses":{"200":{"description":"The requested order has been retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]},"files":{"type":"array","description":"The related files of the requested order","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested order","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"products":{"type":"array","description":"The related products of the requested order","items":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]}},"crossSellableProducts":{"type":"array","description":"The related cross sellable products of the requested order","items":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]}},"workflow":{"type":"array","description":"The related workflows of the requested order","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateOrder","summary":"updateOrder","description":"Update an order by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of order"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the order details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/opportunity":{"get":{"operationId":"getAllOpportunities","summary":"getAllOpportunities","description":"Get all opportunities of a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The opportunities is retrieved successfully for the portal user.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/opportunities/{id}":{"get":{"operationId":"getOpportunity","summary":"getOpportunity","description":"Get an opportunity by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of opportunity"}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]},"orders":{"type":"array","description":"The related orders of the requested opportunity","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}},"files":{"type":"array","description":"The related files of the requested opportunity","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested opportunity","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"workflow":{"type":"array","description":"The related workflows of the requested opportunity","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateOpportunity","summary":"updateOpportunity","description":"Update an opportunity by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of opportunity"}],"requestBody":{"description":"Requested opportunity body to update","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the opportunity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contract":{"get":{"operationId":"getAllContracts","summary":"getAllContracts","description":"Get all contracts for a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Contracts have been retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/contract/{id}":{"get":{"operationId":"getContract","summary":"getContract","description":"Get a contract by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the contract"}],"responses":{"200":{"description":"The requested contract returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]},"orders":{"type":"array","description":"The related orders of the requested contract","items":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]}},"files":{"type":"array","description":"The related files of the requested contract","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}},"relations":{"type":"array","description":"The related entities of the requested contract","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}},"workflow":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"patch":{"operationId":"updateContract","summary":"updateContract","description":"Update a contract by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the contract"}],"requestBody":{"description":"Requested contract body to update","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Updated the contract successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/identifiers/{slug}":{"get":{"operationId":"getEntityIdentifiers","summary":"getEntityIdentifiers","description":"Retrieve a list of entity identifiers used for entity search by portal users.","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"}],"responses":{"200":{"description":"The identifiers of the requested entity returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the identifier","example":"contract_number"},"type":{"type":"string","description":"The type of the identifier","example":"string"}}}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/by-identifiers/{slug}":{"post":{"operationId":"getEntitiesByIdentifiers","summary":"getEntitiesByIdentifiers","description":"Get entities by identifiers by portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"}],"requestBody":{"description":"The entities are retrieved successfully.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true,"example":"```json\\n {\\n \\"name\\": \\"My Contract\\",\\n \\"contract_number\\": \\"123\\"\\n }\\n```\\n"}}}},"responses":{"200":{"description":"The returned Entities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/add-end-customer/{slug}/{id}":{"put":{"operationId":"addEndCustomerRelationToEntity","summary":"addEndCustomerRelationToEntity","description":"Add portal user relation to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"required":true,"description":"The slug of an entity"},{"in":"path","name":"id","schema":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"required":true,"description":"The ID of the Entity"}],"responses":{"200":{"description":"Portal user is added as a relation to the requested entity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]}}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/entity/file":{"post":{"operationId":"saveEntityFile","summary":"saveEntityFile","description":"Add files to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"The request of an file entity","required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_entity_id":{"type":"string","example":12345,"description":"File entity ID"},"document_type":{"type":"string","example":12345,"description":"Document type"},"access_control":{"type":"string","default":"private","enum":["private","public-read"],"description":"Access control level for the file"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}}}}},"responses":{"201":{"description":"The files have been saved to the entitiy successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}},"delete":{"operationId":"deleteEntityFile","summary":"deleteEntityFile","description":"Delete files from an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Delete file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345},"description":"Array of file entity IDs"}}}}}},"responses":{"202":{"description":"The files are removed from the requested entity successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFiles":{"type":"array","items":{"type":"string","description":"File ID","example":"00250c75-afd4-4c94-ba7a-ba0df638eba5"}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}},"/v2/portal/portal/files":{"post":{"operationId":"savePortalFiles","summary":"savePortalFiles","description":"Add files to portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"portal files request","required":true,"content":{"application/json":{"schema":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_type":{"type":"string","example":"orderRightTeaser","description":"File type"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}}}}},"responses":{"201":{"description":"The files have been saved to the portal successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]}}}}}}},"400":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"401":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"403":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"404":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}}}}},"components":{"responses":{"InvalidRequest":{"description":"The request could not be validated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"Unauthorized":{"description":"Could not authenticate the user","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"Forbidden":{"description":"The user is not allowed to access this resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}}}}},"securitySchemes":{"PortalAuth":{"type":"http","scheme":"bearer","description":"Portal Cognito Token"},"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id as internal user"},"AsContact":{"type":"apiKey","in":"header","name":"x-contact-id","description":"Set contact id as internal user"},"AsCustomer":{"type":"apiKey","in":"header","name":"x-portal-user-id","description":"Set portal id as customer"}},"schemas":{"ErrorResp":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}},"EmailTemplates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"DeleteEntityFile":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345},"description":"Array of file entity IDs"}}},"SaveEntityFile":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456,"description":"Entity ID"},"entity_type":{"type":"string","example":"order","description":"Entity type"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_entity_id":{"type":"string","example":12345,"description":"File entity ID"},"document_type":{"type":"string","example":12345,"description":"Document type"},"access_control":{"type":"string","default":"private","enum":["private","public-read"],"description":"Access control level for the file"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}},"SavePortalFile":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345,"description":"File name"},"file_type":{"type":"string","example":"orderRightTeaser","description":"File type"},"_tags":{"type":"array","items":{"type":"string"},"example":12345,"description":"Array of file tags"},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345,"description":"S3 bucket name"},"key":{"type":"string","example":12345,"description":"S3 key"}}}}}}}},"ExtraSchemaAttributes":{"type":"array","items":{"type":"object","required":["name","label","group"],"properties":{"name":{"type":"string","description":"Attribute name"},"label":{"type":"string","description":"Attribute label"},"group":{"type":"string","description":"Attribute group"}}}},"Origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"UpsertPortalConfig":{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},"PortalConfig":{"allOf":[{"type":"object","required":["design_id"],"properties":{"enabled":{"type":"boolean","description":"Enable/Disable the portal access"},"name":{"type":"string","description":"A short name to identify your portal","example":"Installer Portal"},"domain":{"type":"string","description":"The URL on which the portal is accessible","example":"abc.com"},"is_epilot_domain":{"type":"boolean","description":"Mark true if the domain is an Epilot domain"},"design_id":{"type":"string","description":"ID of the design used to build the portal","example":"9ba94f20-b872-4217-a259-2a90a8ee1a29"},"default_user_to_notify":{"type":"object","description":"Default 360 user to notify upon an internal notification","properties":{"onPendingUser":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"description":"Default admin user for pending user notification to notify"}}},"self_registration":{"type":"boolean","description":"Allow portal user self-registration without a mapped contact","example":false},"cognito_details":{"type":"object","description":"AWS Cognito Pool details for the portal","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"Cognito user pool client ID"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341","description":"Cognito user pool ARN"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"Cognito user pool ID"}}},"config":{"type":"string","description":"Stringified object with configuration details"},"contact_secondary_identifier":{"type":"string","description":"Secondary identifier to identify a contact other than the email","example":"full_name"},"email_templates":{"type":"object","description":"Email templates used for authentication and internal processes","properties":{"confirmAccount":{"type":"string","description":"ID of the confirmation email template upon registration","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","description":"ID of the email template for forgot password","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","description":"ID of the email template for invitation","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"},"onNewQuote":{"type":"string","description":"ID of the email template for new quote","example":"b03e2b88-8f3f-4a93-8118-1fb07e9198a1"},"onMapAPendingUser":{"type":"string","description":"ID of the email template for mapping a pending portal user with a contact","example":"940134fa-50f2-4204-a08a-fd3afddbf39a"}}},"grants":{"type":"array","description":"Permissions granted to a portal user while accessing entities","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]}},"images":{"type":"object","description":"Teaser & Banner Image web links","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg","description":"URL of the order left teaser image"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg","description":"URL of the order right teaser image"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg","description":"URL of the welcome banner image"}}},"entity_identifiers":{"type":"object","description":"Identifiers used to identify an entity by a portal user","properties":{"type":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable/Disable the entity identifier"},"attributes":{"type":"array","description":"Attributes used to identify an entity","items":{"type":"string","example":"contract_number"}}}}}},"entity_actions":{"type":"array","description":"Journey actions allowed on an entity by a portal user","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","description":"Name of the organization","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]},"UserRequest":{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},"CreateUserRequest":{"required":["email","orgId","password"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}},{"properties":{"orgId":{"type":"string","example":728,"description":"ID of the organization"},"password":{"type":"string","example":"124n$aAJs*d41h4","description":"User\'s password"},"secondaryIdentifier":{"type":"string","example":123456,"description":"Secondary identifier to identify a contact"},"contactId":{"type":"string","example":123456,"description":"ID of the contact"}}}]},"CreateSSOUserRequest":{"required":["email"],"allOf":[{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com","description":"User\'s email address"},"first_name":{"type":"string","example":"John","description":"First Name of the portal user"},"last_name":{"type":"string","example":"Doe","description":"Last Name of the portal user"}}}]},"OrganizationSettings":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation entity mapping"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable automation preview"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable central inbox preview setting"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable contracts preview setting"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable Ivy"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable double opt-in"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce catalog preview"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce opportunities preview"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable ecommerce preview"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable end customer portal"}}},"installer_portal":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable installer portal"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable entity schema builder"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable logic editor preview"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable new navigation"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable partnering"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable product availability"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable single sign-on (SSO)"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable submission preview"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable/Disable user roles preview"}}}}},"AuthConfig":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb","description":"AWS Cognito User Pool ID"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest","description":"AWS Cognito User Pool Client ID"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1","description":"AWS Cognito User Pool Identity Pool ID"},"portal_id":{"type":"string","example":"7h2hwdj7hhjsdcjkq03eidna3ep","description":"Portal ID"}},"required":["user_pool_id","user_pool_client_id","portal_id"]},"Exists":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean","description":"Indicate whether the item exists"},"active":{"type":"boolean","description":"Indicate whether the item is active"}},"example":{"exists":true,"active":false}},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"},"EntityId":{"type":"string","description":"Entity ID","example":"5da0a718-c822-403d-9f5d-20d4584e0528"},"BaseEntity":{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},"Schema":{"type":"object","properties":{"slug":{"type":"string","description":"Slug of the schema","example":"contact"}},"additionalProperties":true},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","enum":["contact","contract","file","order","opportunity","product","price"],"example":"contact"}}}]},"PortalUser":{"description":"The portal user entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["portal_user"]}}}]},"Contact":{"description":"The mapped contact of the portal user","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contact"]}}}]},"Order":{"description":"The order entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["order"]}}}]},"Opportunity":{"description":"The opportunity entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["opportunity"]}}}]},"Contract":{"description":"The contract entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["contract"]}}}]},"File":{"description":"The file entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["file"]}}}]},"Product":{"description":"The product entity","allOf":[{"type":"object","properties":{"_id":{"description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6","type":"string"},"_title":{"type":"string","description":"Title of the entity","example":"Example Entity"},"_org":{"type":"string","description":"Organization ID the entity belongs to","example":"123"},"_tags":{"type":"array","items":{"type":"string"},"description":"Array of entity tags","example":["example","mock"]},"_created_at":{"type":"string","format":"date-time","description":"Creation timestamp of the entity","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","format":"date-time","description":"Last update timestamp of the entity","example":"2021-02-09T12:41:43.662Z"}},"required":["_id","_title","_org","_created_at","_updated_at"]},{"type":"object","properties":{},"additionalProperties":true},{"type":"object","required":["_schema"],"properties":{"_schema":{"type":"string","enum":["product"]}}}]},"AdminUser":{"type":"object","additionalProperties":true,"properties":{"type":{"type":"string","example":"user"},"user_id":{"type":"string","example":"123456"},"display_name":{"type":"string","example":"John"},"image_uri":{"type":"object","properties":{"original":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original"},"thumbnail_32":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=32&h=32"},"thumbnail_64":{"type":"string","example":"https://fuafjvoHKsu.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/fuafjvoHKsudhfagweucjasdvga/original?w=64&h=64"},"key":{"type":"string","example":"fuafjvoHKsudhfagweucjasdvga"}}},"org_id":{"type":"string","example":"123"},"email":{"type":"string","example":"j.doe@epilot.cloud"},"phone":{"type":"string","example":"12345 67890"}}},"Grant":{"type":"object","properties":{"action":{"type":"string","example":"entity-read","description":"Action for granting permission"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947","description":"Resource for granting permission"},"effect":{"type":"string","default":"allow","enum":["allow","deny"],"description":"Effect of the permission"}},"required":["action"]},"WorkflowExecution":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}')}},t={},i=function i(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,i),a.exports}(914),r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|