Contracts API

Create customer contract

POST /rest/v1/subjects/customers/:customer_id/contracts

This method creates new customer contract

Parameters

Name Description
n_doc_type_id Type
n_workflow_id Workflow
n_parent_doc_id Parent
vc_doc_no Number
d_doc Document date
d_begin Begin date
d_end End date
n_provider_id Provider
vc_rem Commentary

Request

Headers

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

Route

POST /rest/v1/subjects/customers/78419501/contracts

Body

{"contract":{"n_doc_type_id":1002,"n_workflow_id":10021,"n_parent_doc_id":40232501,"vc_doc_no":"Test subscriber contract","d_doc":"2016-09-26T00:00:00+03:00","d_begin":"2016-09-26T00:00:00+03:00","d_end":null,"n_provider_id":100,"n_firm_id":100,"vc_rem":null}}

Response

Headers

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

Status

201 Created

Body

{"contract":{"n_doc_id":88434201,"n_doc_type_id":1002,"n_doc_state_id":3003,"n_parent_doc_id":40232501,"n_workflow_id":10021,"d_doc":"2016-09-26T00:00:00+03:00","vc_doc_no":"Test subscriber contract","d_begin":"2016-09-26T00:00:00+03:00","d_end":null,"n_firm_id":100,"vc_rem":null,"n_provider_id":100,"actions":{"edit":"http://example.org/rest/v1/subjects/customers/78419501/contracts/88434201/edit","show":"http://example.org/rest/v1/subjects/customers/78419501/contracts/88434201"},"additional_values":{}},"navigation":{"self":"http://example.org/rest/v1/subjects/customers/78419501/contracts","customer":"http://example.org/rest/v1/subjects/customers/78419501","contracts":"http://example.org/rest/v1/subjects/customers/78419501/contracts"}}