{"openapi":"3.0.1","paths":{"/b2b/v1/loyalty/guests/save":{"post":{"tags":["Создание/обновление гостя"],"summary":"Сохранить данные о госте","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveGuestRequestDto"}}}},"responses":{"200":{"description":"Результат успешной операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveGuestResponseDto"}}}},"400":{"description":"Ответ с информацией об ошибке","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Ответ с информацией об ошибке","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}},"components":{"schemas":{"Sex":{"enum":["notSpecified","male","female"],"type":"string","description":"Пол"},"GuestDto":{"required":["phone"],"type":"object","properties":{"phone":{"type":"string","description":"Номер телефона","example":"+79990001122"},"firstName":{"type":"string","description":"Имя","nullable":true,"example":"Иван"},"middleName":{"type":"string","description":"Отчество","nullable":true,"example":"Иванович"},"lastName":{"type":"string","description":"Фамилия","nullable":true,"example":"Иванов"},"email":{"type":"string","description":"Email","nullable":true,"example":"test_email@gmail.com"},"birthday":{"type":"string","description":"Дата рождения","format":"date","nullable":true,"example":"1989-01-17"},"sex":{"$ref":"#/components/schemas/Sex"}},"additionalProperties":false,"description":"Данные гостя"},"OrganizationIdentityType":{"enum":["rkObjectId"],"type":"string","description":"Тип идентификатора заведения"},"OrganizationIdentityDto":{"required":["id","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/OrganizationIdentityType"},"id":{"type":"string","description":"Идентификатор","example":"4174244"}},"additionalProperties":false,"description":"Идентификатор заведения"},"SaveGuestRequestDto":{"required":["guest","organization"],"type":"object","properties":{"guest":{"$ref":"#/components/schemas/GuestDto"},"organization":{"$ref":"#/components/schemas/OrganizationIdentityDto"}},"additionalProperties":false,"description":"Аргументы операции сохранения данных о госте"},"SaveGuestResponseDto":{"required":["guest"],"type":"object","properties":{"guest":{"$ref":"#/components/schemas/GuestDto"}},"additionalProperties":false,"description":"Результат операции сохранения данных о госте"},"ErrorDto":{"required":["code","message"],"type":"object","properties":{"code":{"type":"string","description":"Код ошибки","example":"6666"},"message":{"type":"string","description":"Сообщение о ошибке","example":"Some error description."}},"additionalProperties":false,"description":"Ошибка"},"ErrorResponseDto":{"required":["error"],"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDto"}},"additionalProperties":false,"description":"Результат операции, завершившейся ошибкой"}}}}