Create customer equipment
POST /rest/v1/subjects/customers/:customer_id/equipment
Parameters
Name |
Description |
equipment[n_good_id]
|
Service
|
equipment[vc_code]
|
Code
|
equipment[vc_name]
|
Name
|
equipment[d_warranty_end]
|
Warranty end date
|
equipment[n_obj_state_id]
|
Equipment state
|
equipment[vc_serial_number]
|
Serial number
|
equipment[n_main_object_id]
|
Main equipment
|
equipment[n_owner_id]
|
Owner
|
equipment[vc_rem]
|
Commentary
|
Request
Headers
Route
POST /rest/v1/subjects/customers/302/equipment
Body
{
"equipment": {
"n_good_id": 21501,
"vc_code": "testing_equipment"
}
}
Response
Headers
Status
201 Created
Body
{
"equipment": {
"n_object_id": 93734001,
"n_good_id": 21501,
"n_firm_id": 100,
"n_obj_state_id": 1040,
"vc_name": "Оконечное оборудование (testing_equipment)",
"vc_code": "testing_equipment",
"vc_code_add": null,
"vc_rem": null,
"n_main_object_id": null,
"n_owner_id": 302,
"vc_serial_number": null,
"vc_inventory_number": null,
"d_warranty_end": null,
"additional_values": {
"GOOD_N_Param_Units": null
},
"actions": {
"show": "http://example.org/rest/v1/objects/net_devices/93734001",
"edit": "http://example.org/rest/v1/objects/net_devices/93734001/edit"
}
},
"navigation": {
"self": "http://example.org/rest/v1/subjects/customers/302/equipment",
"customer": "http://example.org/rest/v1/subjects/customers/302",
"equipment": "http://example.org/rest/v1/subjects/customers/302/equipment"
}
}