openapi: 3.2.0 info: title: Fenergo Nebula Deals Query Deal Draft API description: '**Deals Query API**: Deals Query API provides endpoints in order to retrieve all related models and their versions.' version: '1.0' servers: - url: /dealsquery security: - Bearer: [] tags: - name: DealDraft paths: /api/deals/drafts/{dealDraftId}: get: tags: - DealDraft summary: Get Deal Draft By Id description: 'Returns a single Deal Draft for the tenant based on the provided ID. Required permissions: At least one of the following permissions is required: DealAccessAndSearch' operationId: GetDealDraftById parameters: - name: dealDraftId in: path description: Deal Draft 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. Single Deal Draft is returned content: application/json: schema: $ref: '#/components/schemas/DealDraftDtoServiceResponse' '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. Deal Draft 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/deals/drafts/journey/{journeyId}: get: tags: - DealDraft summary: Get Deal Drafts By Journey Id description: 'Returns a list of Deal Drafts for the tenant based on the Journey ID. Required permissions: At least one of the following permissions is required: DealAccessAndSearch' operationId: GetDealDraftsByJourneyId parameters: - name: journeyId in: path description: Journey 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. List of Deal Drafts is returned content: application/json: schema: $ref: '#/components/schemas/DealDraftDtoIEnumerableServiceResponse' '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. Journey 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 components: schemas: DealDraftDto: type: object properties: id: type: string format: uuid dealId: type: string format: uuid entityId: type: string format: uuid journeyId: type: string format: uuid requirementSetId: type: string format: uuid requirementSetVersion: type: integer format: int32 properties: type: - object - 'null' additionalProperties: $ref: '#/components/schemas/Property' version: type: integer format: int32 created: type: string format: date-time additionalProperties: false ServiceResponse: type: object properties: data: type: - string - 'null' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false DealDraftDtoIEnumerableServiceResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/DealDraftDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false DealDraftDtoServiceResponse: type: object properties: data: allOf: - $ref: '#/components/schemas/DealDraftDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/ServiceResponseMessage' additionalProperties: false DealPropertyType: enum: - Single - Group - Collection type: string Property: required: - discriminator type: object properties: discriminator: allOf: - $ref: '#/components/schemas/DealPropertyType' readOnly: true type: allOf: - $ref: '#/components/schemas/DealPropertyType' readOnly: true additionalProperties: false discriminator: propertyName: discriminator mapping: Collection: '#/components/schemas/CollectionProperty' Group: '#/components/schemas/GroupProperty' Single: '#/components/schemas/SingleProperty' ServiceResponseMessage: type: object properties: message: type: - string - 'null' type: type: - string - 'null' errorCode: type: - string - 'null' 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