openapi: 3.0.1 info: title: Review Generation Customer Service description: API for review generation customer data management version: "1.0" paths: /api/customers: post: tags: - Customer Locations summary: Create new customer location operationId: saveCustomersInfo parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomersDataRequest' required: true responses: "403": description: User does not have required permissions to perform this task "400": description: Request validation failed "200": content: application/json: schema: $ref: '#/components/schemas/CustomersDataResponse' /api/customers-list: get: tags: - Customer Locations summary: Get customers operationId: getCustomersData parameters: - name: customerLocationIds in: query required: true schema: minItems: 1 type: array items: type: integer format: int64 responses: "400": description: No customers found for specified ids "500": description: Internal error occurred while fetching customer data "200": content: application/json: schema: $ref: '#/components/schemas/CustomersResponse' components: schemas: CustomerDataFailure: type: object properties: customerRequest: nullable: true oneOf: - $ref: '#/components/schemas/CustomerRequest' message: type: string nullable: true validationErrors: type: array nullable: true items: $ref: '#/components/schemas/CustomerValidationError' CustomerLocationResponse: required: - businessId - id - locationId type: object properties: id: type: integer format: int64 locationId: type: integer format: int64 businessId: type: integer format: int64 CustomerRequest: required: - name type: object properties: businessId: type: integer format: int64 nullable: true email: type: string nullable: true locationId: type: integer format: int64 nullable: true name: type: string phone: type: string nullable: true CustomerResponse: required: - customerLocation - id - name type: object properties: id: type: integer format: int64 email: type: string nullable: true name: type: string phone: type: string nullable: true customerLocation: $ref: '#/components/schemas/CustomerLocationResponse' CustomerValidationError: required: - field - message type: object properties: field: type: string message: type: string CustomersDataRequest: required: - customerRequests type: object properties: customerRequests: minItems: 1 type: array items: $ref: '#/components/schemas/CustomerRequest' CustomersDataResponse: type: object properties: customerLocationIds: type: array nullable: true items: type: integer format: int64 failure: type: array nullable: true items: $ref: '#/components/schemas/CustomerDataFailure' message: type: string nullable: true CustomersResponse: type: object properties: customers: type: array nullable: true items: $ref: '#/components/schemas/CustomerResponse' message: type: string nullable: true