# Update/create subcontractor by ID Endpoint: PUT /subcontractors/{subcontractorId} Version: 1.0.0 Security: M2X_auth_application ## Path parameters: - `subcontractorId` (string, required) The subcontractor Id ## Request fields (application/json): - `subcontractorName` (string, required) Subcontractor name Example: "John" - `disabled` (boolean, required) - `carrierId` (string) Carrier id of the subcontractor Example: "C001" - `carrierName` (string) Carrier name of the subcontractor Example: "Nice Subcontractor" - `customerId` (string) Customer id of the subcontractor Example: "C001" - `email` (string) Example: "my@subcontractor.com" - `externalId` (string) Example: "Human searchable external id" - `subcontractorId` (string) Example: "C001" - `vehicleExternalId` (string) External id of the subcontractor vehicle when dispatching Example: "EXT001" - `vehicleId` (string) Id of the subcontractor vehicle when dispatching Example: "V001" - `vehicleName` (string) Name of the subcontractor vehicle when dispatching Example: "Nice Subcontractor Vehicle" - `properties` (object,null) A key value store containing bespoke properties usable for pricing and optimisation - `readonlyFields` (object) Specifies which field should not be touched by the user - `readonlyFields.subcontractorName` (boolean) - `readonlyFields.vehicleExternalId` (boolean) - `readonlyFields.vehicleId` (boolean) - `readonlyFields.vehicleName` (boolean) - `readonlyFields.properties` (boolean) ## Response 200 fields (application/json): - `subcontractorName` (string, required) Subcontractor name Example: "John" - `disabled` (boolean, required) - `carrierId` (string) Carrier id of the subcontractor Example: "C001" - `carrierName` (string) Carrier name of the subcontractor Example: "Nice Subcontractor" - `customerId` (string) Customer id of the subcontractor Example: "C001" - `email` (string) Example: "my@subcontractor.com" - `externalId` (string) Example: "Human searchable external id" - `subcontractorId` (string) Example: "C001" - `vehicleExternalId` (string) External id of the subcontractor vehicle when dispatching Example: "EXT001" - `vehicleId` (string) Id of the subcontractor vehicle when dispatching Example: "V001" - `vehicleName` (string) Name of the subcontractor vehicle when dispatching Example: "Nice Subcontractor Vehicle" - `properties` (object,null) A key value store containing bespoke properties usable for pricing and optimisation - `readonlyFields` (object) Specifies which field should not be touched by the user - `readonlyFields.subcontractorName` (boolean) - `readonlyFields.vehicleExternalId` (boolean) - `readonlyFields.vehicleId` (boolean) - `readonlyFields.vehicleName` (boolean) - `readonlyFields.properties` (boolean) - `id` (string) Example: "D001" ## Response 404 fields (application/json): - `message` (string) Example: "not found"