openapi: 3.2.0 info: title: Fenergo Nebula Review Query Product Rule API description: Review Query API is part of FenX eco-system to manage EntityRule and Review Instances. All the operations require valid access token obtained from Identity service. version: '1.0' servers: - url: /reviewquery security: - Bearer: [] tags: - name: ProductRule paths: /api/product-rule: get: tags: - ProductRule summary: Get ProductRule description: 'Returns all ProductRule Returns only ProductRule by default. Required permissions: Following permissions are required: ReviewJourneySchedulingAccess' operationId: GetAllProductRules parameters: - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: Success. List of Product rule data is returned content: application/json: schema: $ref: '#/components/schemas/ProductRuleDtoIEnumerableServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '500': description: Internal server exception. Please, contact your provider. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: null messages: - message: Internal server exception. Please, contact your provider. type: Error errorCode: INTERNAL_SERVER_ERROR '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/StringServiceResponse' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT /api/product-rule/{productRuleId}: get: tags: - ProductRule summary: Get Product rule by id description: 'Returns the active, currently in effect, published Product rule version for a given id. Required permissions: Following permissions are required: ReviewJourneySchedulingAccess' operationId: GetProductRuleById parameters: - name: productRuleId in: path description: Product rule id required: true schema: type: string format: uuid - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: Success. Product rule is returned content: application/json: schema: $ref: '#/components/schemas/ProductRuleVersionDtoServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: Not Found. Product rule with given id does not exist type: Error errorCode: Error Code '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '500': description: Internal server exception. Please, contact your provider. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: null messages: - message: Internal server exception. Please, contact your provider. type: Error errorCode: INTERNAL_SERVER_ERROR '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/StringServiceResponse' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT /api/product-rule/{productRuleId}/version/{versionNumber}: get: tags: - ProductRule summary: Get Product rule by id and version description: 'Returns Product rule for a given id and version number. Required permissions: Following permissions are required: ReviewJourneySchedulingAccess' operationId: GetProductRuleVersionById parameters: - name: productRuleId in: path description: Product rule id required: true schema: type: string format: uuid - name: versionNumber in: path description: Product rule version number required: true schema: type: integer format: int32 - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: Success. Product rule is returned content: application/json: schema: $ref: '#/components/schemas/ProductRuleVersionDtoServiceResponse' '400': description: Bad request. The request has missing/invalid values content: application/json: schema: $ref: '#/components/schemas/ServiceResponse' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: Not Found. Product rule with given id/version does not exist type: Error errorCode: Error Code '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '500': description: Internal server exception. Please, contact your provider. content: application/json: schema: $ref: '#/components/schemas/ObjectServiceResponse' example: data: null messages: - message: Internal server exception. Please, contact your provider. type: Error errorCode: INTERNAL_SERVER_ERROR '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/StringServiceResponse' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT components: schemas: Approver: type: object properties: subject: type: - string - 'null' successor: allOf: - $ref: '#/components/schemas/Approver' action: allOf: - $ref: '#/components/schemas/ApproveAction' hasProcessedRequest: type: boolean readOnly: true additionalProperties: false ServiceResponse: type: object properties: data: type: - string - 'null' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false ProductRuleDtoIEnumerableServiceResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ProductRuleDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false ProductRuleVersionDto: allOf: - $ref: '#/components/schemas/BaseVersionDto' - type: object properties: id: type: string description: The UiD of the productRule set version format: uuid example: 118313c6-91e6-4b05-a537-5a1ab906418f productRuleId: type: string description: The UiD of the productRule that the version belongs to format: uuid example: 118313c6-91e6-4b05-a537-5a1ab906418f name: type: - string - 'null' description: Product Rule name example: Standard Product Rule description: type: - string - 'null' description: Description of the Product Rule example: Rule to trigger a one year review journeyType: type: - string - 'null' description: Configured journey type used at launch example: Maintenance launchJourneyIn: type: integer description: Launch journey in months format: int32 advanceLaunchBy: type: integer description: Launch journey in advance in days format: int32 conditions: type: - array - 'null' items: $ref: '#/components/schemas/ConditionDto' description: Conditions under which the entity rule can be applied journeyTypesScope: type: - array - 'null' items: type: string description: List of journey types on completion of which a review should be launched usePolicyDateField: type: boolean description: Whether to use a date field from policy instead of calculated months example: false policyDateField: type: - string - 'null' description: The policy date field identifier when using policy date field example: d0871fbf-9c5f-45f5-9a9c-7563b07e9387 publicationDate: type: - string - 'null' description: The date that the version got published format: date-time example: '2021-01-01T14:48:00.000Z' additionalProperties: false description: Response DTO representing product rule version data ValueField: type: object properties: dataSource: type: - string - 'null' field: type: - string - 'null' additionalProperties: false ProductRuleVersionDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/ProductRuleVersionDto' description: Response DTO representing product rule version data messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false BaseVersionDto: type: object properties: versionNumber: type: integer description: The versions number format: int32 example: 1 effectiveFrom: type: string description: The date that the version takes effect when published format: date-time example: '2021-01-01T14:48:00.000Z' effectiveUntil: type: - string - 'null' description: The calculated date that the version ceases being active format: date-time example: '2021-01-01T14:48:00.000Z' publicationDate: type: - string - 'null' description: The date that the version got published format: date-time readOnly: true example: '2021-01-01T14:48:00.000Z' status: allOf: - $ref: '#/components/schemas/VersionStatus' description: The status of the version example: Published created: type: string description: The creation date of the version format: date-time example: '2021-01-01T14:48:00.000Z' isActive: type: boolean description: 'The calculated flag to annotate whether this is the model''s latest version at the time of the query (not necessarily published)' example: true signees: type: - array - 'null' items: $ref: '#/components/schemas/Signee' description: The defined list of signees for the version version: type: integer description: Version number for given Aggregate (concurrency check) format: int32 example: 1 additionalProperties: false description: Response DTO representing data group version data ProductRuleDto: type: object properties: id: type: string description: The UiD of the product rule format: uuid example: 118313c6-91e6-4b05-a537-5a1ab906418f versions: type: - array - 'null' items: $ref: '#/components/schemas/ProductRuleVersionDto' description: Versions associated to this product rule version: type: integer description: Version number for given Aggregate (concurrency check) format: int32 example: 1 additionalProperties: false description: Response DTO representing product rule ConditionDefinitionDto: type: object properties: fieldName: type: - string - 'null' value: type: - array - 'null' items: type: string valueId: type: - array - 'null' items: type: string valueType: type: - string - 'null' dataSource: type: - string - 'null' operation: type: - string - 'null' logicalOperation: type: - string - 'null' operands: type: - array - 'null' items: $ref: '#/components/schemas/ConditionDefinitionDto' valueField: allOf: - $ref: '#/components/schemas/ValueField' additionalProperties: false VersionStatus: enum: - Draft - Pending - Rejected - Published - Archived - Deleted type: string Decision: enum: - Approve - Reject type: string ServiceResponseMessage: type: object properties: message: type: - string - 'null' type: type: - string - 'null' errorCode: type: - string - 'null' additionalProperties: false ConditionDto: type: object properties: id: type: string format: uuid name: type: - string - 'null' description: type: - string - 'null' logicalOperation: type: - string - 'null' operands: type: - array - 'null' items: $ref: '#/components/schemas/ConditionDefinitionDto' additionalProperties: false Signee: type: object properties: subject: type: - string - 'null' successor: allOf: - $ref: '#/components/schemas/Approver' action: allOf: - $ref: '#/components/schemas/ApproveAction' hasProcessedRequest: type: boolean readOnly: true additionalProperties: false ApproveAction: type: object properties: comment: type: - string - 'null' decision: allOf: - $ref: '#/components/schemas/Decision' created: type: string format: date-time additionalProperties: false ObjectServiceResponse: type: object properties: data: {} messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false StringServiceResponse: type: object properties: data: type: - string - 'null' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false securitySchemes: Bearer: type: apiKey description: Please insert JWT with Bearer into field name: Authorization in: header