Customers API

Create customer

POST /rest/v1/subjects/customers/

This method creates customer

Parameters

Name Description
customer[n_base_subject_id] Base subject
customer[vc_code] Code
customer[t_tags] Tags list
customer[n_subj_group_id] Group
customer[group_ids] Group ids list
customer[vc_rem] Commentary

Request

Headers

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

Route

POST /rest/v1/subjects/customers/

Body

{
  "customer": {
    "n_base_subject_id": 78194101,
    "vc_code": "Meine created",
    "t_tags": [
      "тестовый_абонент"
    ],
    "n_subj_group_id": 55027301,
    "group_ids": [
      40250801
    ],
    "vc_rem": "Commentary for created Meine"
  }
}

Response

Headers

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

Status

201 Created

Body

{
  "customer": {
    "n_subject_id": 93732401,
    "n_base_subject_id": 78194101,
    "vc_base_subject_name": "Майне Клаус",
    "n_subj_state_id": 2011,
    "vc_name": "Майне К.",
    "vc_code": "Meine created",
    "d_created": "2019-07-26T10:48:30+03:00",
    "t_tags": [
      "тестовый_абонент"
    ],
    "vc_rem": "Commentary for created Meine",
    "n_firm_id": 100,
    "n_subj_group_id": 55027301,
    "group_ids": [
      55027301,
      40250801
    ],
    "additional_values": {
      "SUBJ_VAL_SERVICE_SAMPLE": [
        null
      ],
      "SUBJ_VAL_N_WORKSTATION_COUNT": null,
      "SUBJ_VAL_D_CONNECTION_DATE": null,
      "SUBJ_VAL_N_PERSONAL_CARD_STATE_ID": null,
      "Дополнительный текстовый параметр": [
        null
      ]
    }
  },
  "actions": {
    "edit": "http://example.org/rest/v1/subjects/customers/93732401/edit"
  },
  "navigation": {
    "self": "http://example.org/rest/v1/subjects/customers/",
    "accounts": "http://example.org/rest/v1/subjects/customers/93732401/accounts",
    "documents": "http://example.org/rest/v1/subjects/customers/93732401/documents",
    "equipment": "http://example.org/rest/v1/subjects/customers/93732401/equipment"
  }
}