Subscriptions API

Update subscription

PUT /rest/v1/subjects/customers/:customer_id/subscriptions/:subscription_id

Parameters

Name Description
subscription[n_service_id] Service
subscription[n_customer_id] Customer
subscription[n_account_id] Account
subscription[n_object_id] Equipment
subscription[n_contract_id] Contract
subscription[n_billing_day] Settlement day
subscription[n_quant] Quant
subscription[n_unit_id] Unit
subscription[n_par_subscription_id] Parent subscription
subscription[d_begin] Start date
subscription[d_end] End date
subscription[c_fl_closed] Subscription closed
subscription[d_charge_log_end] Next charge log end date
subscription[close_charge_log] Close charge log

Request

Headers

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

Route

PUT /rest/v1/subjects/customers/78052201/subscriptions/78060801

Body

{
  "subscription": {
    "d_end": "2019-08-05T10:49:51+03:00"
  }
}

Response

Headers

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

Status

200 OK

Body

{
  "subscription": {
    "n_subscription_id": 78060801,
    "n_service_id": 50164701,
    "n_customer_id": 78052201,
    "n_account_id": 78052501,
    "n_object_id": 78056701,
    "n_quant": null,
    "n_unit_id": 2009,
    "d_begin": "2015-07-11T18:45:34+03:00",
    "d_end": null,
    "c_fl_closed": "N",
    "n_line_no": 1000000,
    "n_par_subscription_id": null,
    "n_prev_subscription_id": null,
    "n_contract_id": 78060101,
    "actions": {
      "show": "http://example.org/rest/v1/subjects/customers/78052201/subscriptions/78060801",
      "edit": "http://example.org/rest/v1/subjects/customers/78052201/subscriptions/78060801/edit"
    }
  },
  "navigation": {
    "self": "http://example.org/rest/v1/subjects/customers/78052201/subscriptions/78060801",
    "customer": "http://example.org/rest/v1/subjects/customers/78052201",
    "subscriptions": "http://example.org/rest/v1/subjects/customers/78052201/subscriptions"
  }
}