@epilot/customer-portal-client
Version:
API Client for epilot portal API
1 lines • 168 kB
JavaScript
(()=>{"use strict";var e={914:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(r(534));t.default=s.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"},{"name":"portal_user_schema","x-displayName":"Portal User","description":"<SchemaDefinition schemaRef=\\"#/components/schemas/PortalUser\\" />\\n"}],"x-tagGroups":[{"name":"APIs","tags":["ECP","ECP Admin","Public"]},{"name":"Schemas","tags":["portal_user_schema"]}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]},{"EitherAuth":[]}],"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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPortalConfig"}}}},"responses":{"201":{"description":"Portal upserted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfig"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"requestBody":{"description":"Portal user payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"type":"object","required":["message","response"],"properties":{"message":{"type":"string","enum":["User created successfully"]}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/token/validate":{"post":{"operationId":"validateToken","summary":"validateToken","description":"Validates Portal Token is valid. Pass the token via Authorization Header.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"204":{"description":"Tokens is valid for the given organization."},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/token/revoke":{"post":{"operationId":"revokeToken","summary":"revokeToken","description":"Revokes all of the access tokens for the given Refresh Token.","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Token payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["refresh_token"],"properties":{"refresh_token":{"type":"string","description":"Refresh Token to be revoked","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}}}}}},"responses":{"200":{"description":"Access Tokens revoked successfully for the given Refresh Token.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["Token revoked successfully"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/PortalConfig"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"security":[{"EitherAuth":[]}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfig"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deletePortal","summary":"deletePortal","description":"Deletes the portal.","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]}],"responses":{"204":{"description":"Portal deleted successfully."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/extensions":{"get":{"operationId":"getPortalExtensions","summary":"getPortalExtensions","description":"Retrieves the installed portal extensions.","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Portal extensions retrieved successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Extension"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/public/extensions":{"get":{"operationId":"getPublicPortalExtensionDetails","summary":"getPublicPortalExtensionDetails","description":"Get public extension details shown to end customers and configuring users.","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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"responses":{"200":{"description":"Public details of extensions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicExtensionCapabilities"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/consumption":{"get":{"operationId":"getConsumption","summary":"Get Consumption","description":"Get energy consumption data between a given time period.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"extensionId","schema":{"type":"string"},"required":true,"description":"Extension ID for consumption data."},{"in":"query","name":"hookId","schema":{"type":"string"},"required":true,"description":"Hook ID for consumption data."},{"in":"query","name":"meter_id","schema":{"type":"string"},"required":true,"description":"Meter ID for consumption data."},{"in":"query","name":"from","schema":{"type":"string","format":"date-time"},"required":true,"description":"Start date for consumption data (ISO 8601 format)."},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"},"required":true,"description":"End date for consumption data (ISO 8601 format)."},{"in":"query","name":"interval","schema":{"type":"string","enum":["PT15M","PT1H","P1D","P1M"]},"required":true,"description":"Interval between consumption data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported."}],"responses":{"200":{"description":"Consumption data returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"consumptions":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the consumption record."},"value":{"type":"number","description":"The consumption value."},"type":{"type":"string","description":"Optional type of the consumption, such as \'nt\' (night time) or \'ht\' (high time)."}},"required":["value","unit","timestamp"]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/costs":{"get":{"operationId":"getCosts","summary":"Get Costs","description":"Get energy cost data between a given time period.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"extensionId","schema":{"type":"string"},"required":true,"description":"Extension ID for cost data."},{"in":"query","name":"hookId","schema":{"type":"string"},"required":true,"description":"Hook ID for cost data."},{"in":"query","name":"meter_id","schema":{"type":"string"},"required":true,"description":"Meter ID for cost data."},{"in":"query","name":"from","schema":{"type":"string","format":"date-time"},"required":true,"description":"Start date for cost data (ISO 8601 format)."},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"},"required":true,"description":"End date for cost data (ISO 8601 format)."},{"in":"query","name":"interval","schema":{"type":"string","enum":["PT15M","PT1H","P1D","P1M"]},"required":true,"description":"Interval between cost data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported."}],"responses":{"200":{"description":"Cost data returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"costs":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the cost record."},"unit_amount":{"type":"integer","description":"Cost in cents, e.g. 1234 for 12,34 €.","example":1234},"unit_amount_currency":{"type":"string","description":"ISO 4217:2015 currency.","example":"EUR"},"unit_amount_decimal":{"type":"string","description":"Cost in decimal format, e.g. \\"12.34\\".","example":"12.34"},"tax_behavior":{"type":"string","description":"Is the tax (typically Value Added Tax) included in the amounts. Typically should NOT be included - exclusive of tax.","enum":["inclusive","exclusive"],"example":"exclusive"},"tax_rate":{"type":"integer","description":"Tax rate in percent, e.g. 19 for 19%.","example":19}},"required":["timestamp","unit_amount","unit_amount_currency","unit_amount_decimal","tax_behavior","tax_rate"]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/prices":{"get":{"operationId":"getPrices","summary":"Get Prices","description":"Get energy prices data between a given time period.","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"extensionId","schema":{"type":"string"},"required":true,"description":"Extension ID for price data."},{"in":"query","name":"hookId","schema":{"type":"string"},"required":true,"description":"Hook ID for price data."},{"in":"query","name":"meter_id","schema":{"type":"string"},"required":true,"description":"Meter ID for price data."},{"in":"query","name":"from","schema":{"type":"string","format":"date-time"},"required":true,"description":"Start date for price data (ISO 8601 format)."},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"},"required":true,"description":"End date for price data (ISO 8601 format)."},{"in":"query","name":"interval","schema":{"type":"string","enum":["PT15M","PT1H","P1D","P1M"]},"required":true,"description":"Interval between price data points (e.g., PT15M for 15 minutes, PT1H for hourly). Not all intervals have to be supported."}],"responses":{"200":{"description":"Price data returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"prices":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the price record."},"unit_amount":{"type":"integer","description":"Cost in cents, e.g. 1234 for 12,34 €.","example":1234},"unit_amount_currency":{"type":"string","description":"ISO 4217:2015 currency.","example":"EUR"},"unit_amount_decimal":{"type":"string","description":"Cost in decimal format, e.g. \\"12.34\\".","example":"12.34"},"components":{"type":"object","description":"Optional price components.","properties":{"auction_price_amount":{"type":"integer","description":"Market price in cents, e.g. 1000 for 10,00 €.","example":1000},"auction_price_amount_decimal":{"type":"string","description":"Market price in decimal format, e.g. \\"10.00\\".","example":"10.00"},"taxes_levies_amount":{"type":"integer","description":"Taxes/Levies other than tax specified on the price level in cents, e.g. 50 for 00,50 €.","example":50},"taxes_levies_amount_decimal":{"type":"string","description":"Taxes/Levies other than tax specified on the price level in decimal format, e.g. \\"0.50\\".","example":"0.50"},"source_fee_amount":{"type":"integer","description":"Fee associated with the source, e.g. Green Energy Certificate fee in cents, e.g. 50 for 00,50 €.","example":50},"source_fee_amount_decimal":{"type":"string","description":"Fee associated with the source, e.g. Green Energy Certificate fee in decimal format, e.g. \\"0.50\\".","example":"0.50"},"grid_fee_amount":{"type":"integer","description":"Fee associated with the transmission/distribution in cents, e.g. 100 for 1,00 €.","example":100},"grid_fee_amount_decimal":{"type":"string","description":"Fee associated with the transmission/distribution in decimal format, e.g. \\"1.00\\".","example":"1.00"},"margin_amount":{"type":"integer","description":"Margin in cents, e.g. 34 for 0,34 €.","example":34},"margin_amount_decimal":{"type":"string","description":"Margin in decimal format, e.g. \\"0.34\\".","example":"0.34"}}},"tax_behavior":{"type":"string","description":"Is the tax (typically Value Added Tax) included in the amounts. Typically should NOT be included - exclusive of tax.","enum":["inclusive","exclusive"],"example":"exclusive"},"tax_rate":{"type":"integer","description":"Tax rate in percent, e.g. 19 for 19%.","example":19}},"required":["timestamp","unit_amount","unit_amount_currency","unit_amount_decimal","tax_behavior","tax_rate"]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/external-links":{"get":{"operationId":"getExternalLinks","summary":"getExternalLinks","description":"Retrieves the portal configuration external links.","tags":["ECP Admin","ECP"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"},{"in":"query","name":"contactId","required":false,"schema":{"$ref":"#/components/schemas/EntityId"},"description":"Contact ID of the user"}],"security":[{"EitherAuth":[]}],"responses":{"200":{"description":"Portal config links retrieved successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalLink"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/resolve:external-link/{id}":{"get":{"operationId":"getResolvedExternalLink","summary":"getResolvedExternalLink","description":"Retrieves a resolved portal external link.","tags":["ECP Admin","ECP"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"},"description":"ID of the External Link"},{"in":"query","name":"origin","required":false,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"},{"in":"query","name":"contactId","required":false,"schema":{"$ref":"#/components/schemas/EntityId"},"description":"Contact ID of the user"}],"security":[{"EitherAuth":[]}],"responses":{"200":{"description":"Resolved portal config link retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalLink"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfig"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"responses":{"200":{"description":"Portal config retrieved successfully.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PortalConfig"},{"type":"object","properties":{"certificate_details":{"type":"object","properties":{"status":{"type":"string","description":"Status of the certificate","enum":["PENDING_VALIDATION","ISSUED","INACTIVE","EXPIRED","VALIDATION_TIMED_OUT","REVOKED","FAILED","PENDING_AUTO_RENEWAL"]},"failed_reason":{"type":"string","description":"Reason for failed certificate","example":"CAA_ERROR"}}}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/PortalConfig"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"requestBody":{"description":"Email templates payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplates"}}}},"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":{"$ref":"#/components/schemas/EmailTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"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":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"responses":{"200":{"description":"Retrieved the email templates successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplates"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/public-widgets":{"get":{"operationId":"getPublicPortalWidgets","summary":"getPublicPortalWidgets","description":"Retrieves the public widgets of a portal","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"org_id","required":true,"schema":{"type":"string","description":"Organization ID","example":123}},{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"responses":{"200":{"description":"Retrieved the portal public widgets successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPortalWidget"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/widgets":{"post":{"operationId":"upsertPortalWidget","summary":"upsertPortalWidget","description":"Upsert widget for a portal of an organization.","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"requestBody":{"description":"Portal widgets payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPortalWidget"}}}},"responses":{"201":{"description":"Portal widget configuration upserted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPortalWidget"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"get":{"operationId":"getPortalWidgets","summary":"getPortalWidgets","description":"Retrieves the widgets of a portal","tags":["ECP Admin","ECP"],"security":[{"EitherAuth":[]}],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"},{"in":"query","name":"contract_id","required":false,"schema":{"$ref":"#/components/schemas/EntityId"},"description":"Contract context for widgets"}],"responses":{"200":{"description":"Retrieved the portal widgets successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPortalWidget"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/replace-ecp-template-variables":{"post":{"operationId":"replaceECPTemplateVariables","summary":"replaceECPTemplateVariables","description":"Replaces the template variables of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"ECPVariables payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/EntityId","description":"ID of the entity"},"is_main_entity":{"type":"boolean"}}}}}}},"responses":{"200":{"description":"Replaced portal template variables successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"customerPortal":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"},"newDocumentLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b"},"entityLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b"},"userEmailsOnEntity":{"type":"array","example":["john@doe.com","mary@doe.com"],"items":{"type":"string"}}}},"installerPortal":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://installer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"},"newDocumentLink":{"type":"string","example":"https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b"},"entityLink":{"type":"string","example":"https://installer-portal.ecp.dev.epilot.io/requests/opportunities/b8fef220-abe0-4382-a704-26848f60977b"},"userEmailsOnEntity":{"type":"array","example":["peter@doe.com","jane@doe.com"],"items":{"type":"string"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/OrganizationSettings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/schemas":{"get":{"operationId":"getSchemas","summary":"getSchemas","description":"Retrieves the schemas. Only schemas usable in the private part of the portal are returned.","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Retrieved schemas for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"$ref":"#/components/schemas/Schema"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/public/schemas":{"get":{"operationId":"getSchemasByDomain","summary":"getSchemasByDomain","description":"Retrieves schemas by domain. Only schemas and attributes used on public pages are returned.","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","description":"Domain of the portal","example":"ecp.dev.epilot.io"}}],"responses":{"200":{"description":"Retrieved schemas for an organization successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"$ref":"#/components/schemas/Schema"}}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/ExtraSchemaAttributes"},"contract":{"$ref":"#/components/schemas/ExtraSchemaAttributes"},"order":{"$ref":"#/components/schemas/ExtraSchemaAttributes"},"opportunity":{"$ref":"#/components/schemas/ExtraSchemaAttributes"},"meter":{"$ref":"#/components/schemas/ExtraSchemaAttributes"},"meter_counter":{"$ref":"#/components/schemas/ExtraSchemaAttributes"}}}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/validate/caa-records":{"post":{"operationId":"validateCaaRecords","summary":"validateCaaRecords","description":"Validates the CAA records of a portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"}}],"responses":{"200":{"description":"Validated CAA records successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"retry":{"type":"boolean","description":"Whether to retry the validation to continue the domain setup"},"message":{"type":"string","description":"Message of the validation"},"isDNSConfigured":{"type":"boolean","description":"Whether the DNS is configured from the customer side"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/contact":{"get":{"operationId":"getContact","summary":"getContact","description":"Retrieves the contact of the logged in user.","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":{"$ref":"#/components/schemas/Contact"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}},"journey_actions":{"type":"array","items":{"$ref":"#/components/schemas/JourneyActions"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Updates the contact details.","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"responses":{"200":{"description":"Updated the contact details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenByRule"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/EntityId"}}],"responses":{"200":{"description":"The contact returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/public/contact/exists":{"post":{"operationId":"checkContactExists","summary":"checkContactExists","description":"True if contact with given identifiers exists.","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"},"description":"Origin of the portal"}],"requestBody":{"description":"Request payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactExistsRequest"}}}},"responses":{"200":{"description":"Return result true|false if the contact with given identifiers exists.","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","description":"Whether the contact exists with the given identifier values","example":true},"contactId":{"$ref":"#/components/schemas/EntityId","description":"ID of the contact if exists"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/PortalUser"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"updatePortalUser","summary":"updatePortalUser","description":"Update the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"responses":{"200":{"description":"The portal user updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PortalUser"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"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":{"$ref":"#/components/schemas/EntityId"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/user/update/email":{"put":{"operationId":"updatePortalUserEmail","summary":"updatePortalUserEmail","description":"Update portal user email","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Request payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","description":"New email address of the portal user","example":"john@doe.com"},"password":{"type":"string","description":"Password of the portal user for confirmation"}}}}}},"responses":{"200":{"description":"Portal user email updated successfully and will receive a confirmation email soon.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["You will receive a confirmation mail soon on your updated email address."]}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/user/resend/confirmation-email/{id}":{"post":{"operationId":"resendConfirmationEmail","summary":"resendConfirmationEmail","description":"Resend confirmation email","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The ID of portal user id"}],"responses":{"200":{"description":"Confirmation email resent successfully for the portal user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["Confirmation email sent successfully."]}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/users/by-related-entity":{"get":{"operationId":"fetchPortalUsersByRelatedEntity","summary":"fetchPortalUsersByRelatedEntity","description":"Get all users for a given entity","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"entity_id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"responses":{"200":{"description":"Returns the portal users under the given entity.","content":{"application/json":{"schema":{"type":"object","properties":{"portalUsers":{"type":"array","items":{"$ref":"#/components/schemas/PortalUser"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/user/confirm":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"Confirm a portal user","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"confirmation_link_token","required":true,"schema":{"type":"string","description":"Confirmation link token"}},{"in":"query","name":"use_redirect","required":false,"schema":{"type":"boolean","description":"Should the operation result in a 301 redirect","default":true}}],"responses":{"200":{"description":"Returned in case of successful user confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"confirmed":{"type":"boolean","description":"Is the user confirmed","example":true},"user_already_confirmed":{"type":"boolean","description":"Is the user previously confirmed","example":true}}}}}},"301":{"description":"User is confirmed and redirected to the portal successfully."},"400":{"$ref":"#/components/responses/ConfirmUserInvalidRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/user/confirm/{id}":{"get":{"operationId":"confirmUserWithUserId","summary":"confirmUserWithUserId","description":"Confirm a portal user","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"$ref":"#/components/schemas/Origin"}},{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"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":{"$ref":"#/components/responses/InternalServerError"}}}},"/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}},{"in":"query","name":"origin","required":false,"description":"Checkes if user exists in the given portal origin. If not provided, checks in all origins.","schema":{"$ref":"#/components/schemas/Origin"}}],"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}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/recipients-to-notify":{"post":{"operationId":"getRecipientsToNotifyOnAutomation","summary":"getRecipientsToNotifyOnAutomation","description":"Get recipients to notify on automation","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["emails","template_id"],"properties":{"emails":{"type":"array","example":["john@doe.com"],"description":"Emails array that are part of the automation","items":{"type":"string"}},"template_id":{"$ref":"#/components/schemas/EntityId","description":"Email template ID that used on the automation"}}}}}},"responses":{"200":{"description":"Returns the valid recipients to notify successfully.","content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"recipients":{"type":"array","description":"Filtered recipients to notify","items":{"type":"object","required":["email","recipient_id"],"properties":{"email":{"type":"string","description":"Email of the recipient","example":"john@doe.com"},"recipient_id":{"$ref":"#/components/schemas/EntityId","description":"ID of the recipient"}}}},"message":{"type":"string","description":"Reason to not notify the user"}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/Origin"}}],"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":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/order":{"get":{"operationId":"getAllOrders","summary":"getAllOrders","description":"Get all orders for the portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"number","description":"Initial offset to set for the search results","example":0,"default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"number","description":"Size of the search results","example":100,"default":100}}],"responses":{"200":{"description":"The orders for the portal user returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Order"},{"type":"object","properties":{"journey_actions":{"$ref":"#/components/schemas/JourneyActions"}}}]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/order/{id}/acceptance":{"post":{"operationId":"postOrderAcceptance","summary":"postOrderAcceptance","description":"Accept/decline an offer by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The ID of order"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptanceDecision"}}}},"responses":{"200":{"description":"Order was accepted/declined successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/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":{"$ref":"#/components/schemas/EntityId"},"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":{"$ref":"#/components/schemas/Order"},"files":{"type":"array","description":"The related files of the requested order","items":{"$ref":"#/components/schemas/File"}},"relations":{"type":"array","description":"The related entities of the requested order","items":{"$ref":"#/components/schemas/EntityItem"}},"products":{"type":"array","description":"The related products of the requested order","items":{"$ref":"#/components/schemas/Product"}},"crossSellableProducts":{"type":"array","description":"The related cross sellable products of the requested order","items":{"$ref":"#/components/schemas/Product"}},"workflow":{"type":"array","description":"The related workflows of the requested order","items":{"$ref":"#/components/schemas/WorkflowExecution"}},"journey_actions":{"type":"array","items":{"$ref":"#/components/schemas/JourneyActions"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"updateOrder","summary":"updateOrder","description":"Update an order by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/EntityId"},"required":true,"description":"The ID of order"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"responses":{"200":{"description":"Updated the order details successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/opportunity":{"get":{"operationId":"getAllOpportunities","summary":"getAllOpportunities","description":"Get all opportunities of a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"number","description":"Initial offset to set for the search results","example":0,"default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"number","description":"Size of the search results","example":100,"default":100}}],"responses":{"200":{"description":"The opportunities is retrieved successfully for the portal user.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Opportunity"},{"type":"object","properties":{"journey_actions":{"$ref":"#/components/schemas/JourneyActions"}}}]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/opportunities/searchable-attributes":{"get":{"operationId":"getSearchableAttributesForOpportunities","summary":"getSearchableAttributesForOpportunities","description":"Get all opportunity searchable attributes for a portal user","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","name":"from","required":false,"schema":{"type":"number","description":"Initial offset to set for the search results","example":0,"default":0}},{"in":"query","name":"size","required":false,"schema":{"type":"number","description":"Size of the search results","example":1000,"default":1000}}],"responses":{"200":{"description":"The opportunities is retrieved successfully for the portal user.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Opportunity"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v2/portal/opportunities/search":{"post":{"operationId":"getSearchResultsForOpportunities","summary":"getSearchResultsForOpportunities","description":"Get all opportunity with the given serached attributes","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"query","na