Persons API

Create person

POST /rest/v1/subjects/persons/

This method creates person

Parameters

Name Description
person[n_opf_id] Legal organizational form
person[n_firm_id] Firm
person[vc_first_name] First name
person[vc_surname] Surname
person[vc_second_name] Second name
person[n_sex_id] Sex
person[vc_inn] Tax reference number
person[vc_doc_serial] Passport series
person[vc_doc_no] Passport number
person[d_doc] Passport date
person[vc_document] Passport place
person[d_birth] Birth date
person[vc_birth_place] Birth place
person[vc_pens_insurance] Social insurance number
person[vc_med_insurance] Medical insurance number
person[n_citizenship_id] Citizenship region
person[vc_kpp] Tax registration reason code
person[vc_rem] Commentary
person[n_subj_state_id] Subject state
person[vc_doc_department] Passport department code
person[t_tags] Tags list

Request

Headers

Accept: application/json
Content-Type: application/json

Route

POST /rest/v1/subjects/persons/

Body

{"person":{"n_opf_id":10041,"n_firm_id":100,"vc_first_name":"\u041a\u043b\u0430\u0443\u0441","vc_surname":"\u041c\u0430\u0439\u043d\u0435","vc_second_name":"","n_sex_id":1138,"vc_inn":"123123123","vc_doc_serial":"6237","vc_doc_no":"421753","d_doc":"2016-09-26T04:26:39+03:00","vc_document":"\u041e\u0412\u0414","d_birth":"1996-09-26T04:26:39+04:00","vc_birth_place":"\u0413\u0435\u0440\u043c\u0430\u043d\u0438\u044f","vc_pens_insurance":"1512567343446","vc_med_insurance":"54352342435","n_citizenship_id":54306901,"vc_kpp":"111101123","vc_rem":"Commentary","n_subj_state_id":2011,"vc_doc_department":"123-531","t_tags":["\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439_\u0430\u0431\u043e\u043d\u0435\u043d\u0442"]}}

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2155

Status

201 Created

Body

{"person":{"n_person_id":88436201,"n_opf_id":10041,"vc_opf_code":"\u0418\u041f","vc_opf_name":"\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c","vc_first_name":"\u041a\u043b\u0430\u0443\u0441","vc_surname":"\u041c\u0430\u0439\u043d\u0435","vc_second_name":null,"n_sex_id":1138,"vc_sex":"\u041c\u0443\u0436\u0441\u043a\u043e\u0439","vc_inn":"123123123","n_doc_auth_type_id":null,"vc_doc_auth_type_code":null,"vc_doc_auth_type_name":null,"vc_doc_serial":"6237","vc_doc_no":"421753","d_doc":"2016-09-26T04:26:39+03:00","vc_document":"\u041e\u0412\u0414","vc_doc_department":"123-531","d_birth":"1996-09-26T04:26:39+04:00","vc_birth_place":"\u0413\u0435\u0440\u043c\u0430\u043d\u0438\u044f","vc_pens_insurance":"1512567343446","vc_med_insurance":"54352342435","n_subject_id":88436201,"n_subj_type_id":18001,"n_parent_subj_id":null,"n_subj_state_id":2011,"vc_subj_state_name":"\u0410\u043a\u0442\u0438\u0432\u0435\u043d","n_base_subject_id":88436201,"n_firm_id":100,"vc_firm":"Offline Telecom","n_region_id":40230101,"vc_region":"\u0433. \u041c\u043e\u0441\u043a\u0432\u0430","n_owner_id":100,"vc_subj_name":"\u041c\u0430\u0439\u043d\u0435 \u041a\u043b\u0430\u0443\u0441","vc_subj_code":"\u041c\u0430\u0439\u043d\u0435 \u041a.","vc_name":"\u041c\u0430\u0439\u043d\u0435 \u041a\u043b\u0430\u0443\u0441","vc_code":"\u041c\u0430\u0439\u043d\u0435 \u041a.","d_created":"2016-09-26T04:26:39+03:00","n_creator_id":50162901,"t_tags":["\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439_\u0430\u0431\u043e\u043d\u0435\u043d\u0442"],"vc_tags":"\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439_\u0430\u0431\u043e\u043d\u0435\u043d\u0442","vc_rem":"Commentary","vc_code_upper":"\u041c\u0410\u0419\u041d\u0415 \u041a.","vc_name_upper":"\u041c\u0410\u0419\u041d\u0415 \u041a\u041b\u0410\u0423\u0421","n_subj_group_id":null,"vc_subj_group_name":null,"n_citizenship_id":54306901,"vc_citizenship":"USA","vc_kpp":"111101123"},"navigation":{"self":"http://example.org/rest/v1/subjects/persons/","persons":"http://example.org/rest/v1/subjects/persons"}}