Subscriptions API

Create subscription

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

Request

Headers

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

Route

POST /rest/v1/subjects/customers/78052201/subscriptions/

Body

{"subscription":{"n_service_id":50188901,"n_account_id":78052501,"n_object_id":78058401,"n_contract_id":78053001,"d_begin":"2016-09-26T04:26:45+03:00"}}

Response

Headers

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

Status

201 Created

Body

{"subscription":{"n_subscription_id":88437301,"n_service_id":50188901,"n_customer_id":78052201,"n_account_id":78052501,"n_object_id":78058401,"n_quant":null,"n_unit_id":2009,"d_begin":"2016-09-26T04:26:45+03:00","d_end":null,"c_fl_closed":"N","n_line_no":2000000,"n_par_subscription_id":null,"n_prev_subscription_id":null,"n_contract_id":78053001,"actions":{"show":"http://example.org/rest/v1/subjects/customers/78052201/subscriptions/88437301","edit":"http://example.org/rest/v1/subjects/customers/78052201/subscriptions/88437301/edit"}},"navigation":{"self":"http://example.org/rest/v1/subjects/customers/78052201/subscriptions/","customer":"http://example.org/rest/v1/subjects/customers/78052201","subscriptions":"http://example.org/rest/v1/subjects/customers/78052201/subscriptions"}}