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": "Клаус",
    "vc_surname": "Майне",
    "vc_second_name": "",
    "n_sex_id": 1138,
    "vc_inn": "123123123",
    "vc_doc_serial": "6237",
    "vc_doc_no": "421753",
    "d_doc": "2019-07-26T10:48:37+03:00",
    "vc_document": "ОВД",
    "d_birth": "1999-07-26T10:48:37+04:00",
    "vc_birth_place": "Германия",
    "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": [
      "тестовый_абонент"
    ]
  }
}

Response

Headers

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

Status

201 Created

Body

{
  "person": {
    "n_person_id": 93735101,
    "n_opf_id": 10041,
    "vc_opf_code": "ИП",
    "vc_opf_name": "Индивидуальный предприниматель",
    "vc_first_name": "Клаус",
    "vc_surname": "Майне",
    "vc_second_name": null,
    "n_sex_id": 1138,
    "vc_sex": "Мужской",
    "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": "2019-07-26T10:48:37+03:00",
    "vc_document": "ОВД",
    "vc_doc_department": "123-531",
    "d_birth": "1999-07-26T10:48:37+04:00",
    "vc_birth_place": "Германия",
    "vc_pens_insurance": "1512567343446",
    "vc_med_insurance": "54352342435",
    "n_subject_id": 93735101,
    "n_subj_type_id": 18001,
    "n_parent_subj_id": null,
    "n_subj_state_id": 2011,
    "vc_subj_state_name": "Активен",
    "n_base_subject_id": 93735101,
    "n_firm_id": 100,
    "vc_firm": "Offline Telecom",
    "n_region_id": 40230101,
    "vc_region": "г. Москва",
    "n_owner_id": 100,
    "vc_subj_name": "Майне Клаус",
    "vc_subj_code": "Майне К.",
    "vc_name": "Майне Клаус",
    "vc_code": "Майне К.",
    "d_created": "2019-07-26T10:48:38+03:00",
    "n_creator_id": 50162901,
    "t_tags": [
      "тестовый_абонент"
    ],
    "vc_tags": "тестовый_абонент",
    "vc_rem": "Commentary",
    "vc_code_upper": "МАЙНЕ К.",
    "vc_name_upper": "МАЙНЕ КЛАУС",
    "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/",
    "customers": [

    ],
    "persons": "http://example.org/rest/v1/subjects/persons"
  }
}