POST api/Bike/UpdateService
Used to update services records For services by not executed by a linked partner, leave servicerequestid = zero When used to record info against a Jobcard (Service request), provide all the above information, as well as the ServiceRequestID, else leave servicerequestid zero This function is used to update an existing service log.
Request Information
URI Parameters
None.
Body Parameters
BikeServiceModelName | Description | Type | Additional information |
---|---|---|---|
ID | integer |
None. |
|
BikeID |
Links to bike |
integer |
None. |
BikeDescription | string |
None. |
|
PartnerID |
Links to partner (Cycle shop) |
integer |
None. |
PartnerDescription | string |
None. |
|
CyclistID | integer |
None. |
|
CyclistDescription | string |
None. |
|
Type |
Readonly field returned when fetching |
string |
None. |
ServiceRequestID |
ServiceRequestID (Jobcard) filled in when this is done as part of a partner service, not for historic or services done by "not linked" cycle shops |
integer |
None. |
JobCardNo |
For display purposes only - if log is linked to a service request |
string |
None. |
ServiceDate |
Date of service |
date |
None. |
LastRide |
Calculated field which returns the date of the last registered ride. If no ride, last service date is returned |
date |
None. |
Rating |
Provide a 1, 2, or 3 start rating for the service |
integer |
None. |
Notes |
Provide an optional note on your service experience and work done |
string |
None. |
ServicedGear |
Only provide list of gear which was serviced |
Collection of GearServiceModel |
None. |
ReplacedGear |
Provides a list of gear which was replaced during this service |
Collection of GearServiceModel |
None. |
Request Formats
application/json, text/json
{ "ID": 1, "BikeID": 2, "BikeDescription": "sample string 3", "PartnerID": 4, "PartnerDescription": "sample string 5", "CyclistID": 6, "CyclistDescription": "sample string 7", "Type": "sample string 8", "ServiceRequestID": 9, "JobCardNo": "sample string 10", "ServiceDate": "2025-09-05T16:09:41.0723225+00:00", "LastRide": "2025-09-05T16:09:41.0723225+00:00", "Rating": 13, "Notes": "sample string 14", "ServicedGear": [ { "ID": 1, "GearID": 2, "GearDescription": "sample string 3", "Manufacturer": "sample string 4", "Model": "sample string 5", "Type": "sample string 6", "KmServiceInterval": 7, "MinutesServiceInterval": 8 }, { "ID": 1, "GearID": 2, "GearDescription": "sample string 3", "Manufacturer": "sample string 4", "Model": "sample string 5", "Type": "sample string 6", "KmServiceInterval": 7, "MinutesServiceInterval": 8 } ], "ReplacedGear": [ { "ID": 1, "GearID": 2, "GearDescription": "sample string 3", "Manufacturer": "sample string 4", "Model": "sample string 5", "Type": "sample string 6", "KmServiceInterval": 7, "MinutesServiceInterval": 8 }, { "ID": 1, "GearID": 2, "GearDescription": "sample string 3", "Manufacturer": "sample string 4", "Model": "sample string 5", "Type": "sample string 6", "KmServiceInterval": 7, "MinutesServiceInterval": 8 } ] }
application/xml, text/xml
<BikeServiceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Hub.Server.Models.DTO"> <BikeDescription>sample string 3</BikeDescription> <BikeID>2</BikeID> <CyclistDescription>sample string 7</CyclistDescription> <CyclistID>6</CyclistID> <ID>1</ID> <JobCardNo>sample string 10</JobCardNo> <LastRide>2025-09-05T16:09:41.0723225+00:00</LastRide> <Notes>sample string 14</Notes> <PartnerDescription>sample string 5</PartnerDescription> <PartnerID>4</PartnerID> <Rating>13</Rating> <ReplacedGear> <GearServiceModel> <GearDescription>sample string 3</GearDescription> <GearID>2</GearID> <ID>1</ID> <KmServiceInterval>7</KmServiceInterval> <Manufacturer>sample string 4</Manufacturer> <MinutesServiceInterval>8</MinutesServiceInterval> <Model>sample string 5</Model> <Type>sample string 6</Type> </GearServiceModel> <GearServiceModel> <GearDescription>sample string 3</GearDescription> <GearID>2</GearID> <ID>1</ID> <KmServiceInterval>7</KmServiceInterval> <Manufacturer>sample string 4</Manufacturer> <MinutesServiceInterval>8</MinutesServiceInterval> <Model>sample string 5</Model> <Type>sample string 6</Type> </GearServiceModel> </ReplacedGear> <ServiceDate>2025-09-05T16:09:41.0723225+00:00</ServiceDate> <ServiceRequestID>9</ServiceRequestID> <ServicedGear> <GearServiceModel> <GearDescription>sample string 3</GearDescription> <GearID>2</GearID> <ID>1</ID> <KmServiceInterval>7</KmServiceInterval> <Manufacturer>sample string 4</Manufacturer> <MinutesServiceInterval>8</MinutesServiceInterval> <Model>sample string 5</Model> <Type>sample string 6</Type> </GearServiceModel> <GearServiceModel> <GearDescription>sample string 3</GearDescription> <GearID>2</GearID> <ID>1</ID> <KmServiceInterval>7</KmServiceInterval> <Manufacturer>sample string 4</Manufacturer> <MinutesServiceInterval>8</MinutesServiceInterval> <Model>sample string 5</Model> <Type>sample string 6</Type> </GearServiceModel> </ServicedGear> <Type>sample string 8</Type> </BikeServiceModel>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
BikeModelName | Description | Type | Additional information |
---|---|---|---|
ID |
When adding a bike, ensure id = 0 |
integer |
None. |
TypeID | integer |
None. |
|
Type |
Readonly property returned when you fetch a bike |
string |
None. |
UserID |
Links bike to user |
integer |
None. |
CyclistDescription |
Readonly property returned when you fetch a bike |
string |
None. |
RefNo | string |
None. |
|
SerialNo | string |
None. |
|
Manufacturer | string |
None. |
|
Model | string |
None. |
|
Colour | string |
None. |
|
ModelYear | integer |
None. |
|
Km |
This is a calculated value - calculated from the sum of rides. To start off with a number of kms, insert one ride entry in the past with the required no of kms (note that rides are in meters) |
decimal number |
None. |
MovingTime |
This is a calculated value - calculated from the sum of rides. Minutes |
integer |
None. |
LastService | date |
None. |
|
DateBought | date |
None. |
|
StatusID |
Valid vales = 1, 2: lookup list of values with descriptions can be found on api/lookup |
integer |
None. |
Status |
Readonly property returned when you fetch a bike |
string |
None. |
MinutesToNextService |
Calculated based on service intervals of gear items, when they were added, and rides taken since, returns value of first item requiring service |
integer |
None. |
HoursToNextService | integer |
None. |
|
KmToNextService |
Calculated based on service intervals of gear items, when they were added, and rides taken since, returns value of first item requiring service |
integer |
None. |
KmSinceLastService |
Calculated field based on last service date and rides since |
integer |
None. |
MovingTimeSinceLastService |
Calculated field based on last service date and rides since in minutes |
integer |
None. |
ImageURL |
Field is populated by uploading an image for a bike. |
string |
None. |
ServicePercentage |
Calculated from the service percentages on gear |
integer |
None. |
Strava_Id | string |
None. |
|
IntegrationStatusID | integer |
None. |
|
OpeningKm | integer |
None. |
|
OpeningHours | integer |
None. |
|
UnitsOfMeasureID | integer |
None. |
|
HasKMBasedGear | boolean |
None. |
|
HasHourBasedGear | boolean |
None. |
|
BikeSize | string |
None. |
|
PartnerType | integer |
None. |
Response Formats
application/json, text/json
{ "ID": 1, "TypeID": 2, "Type": "sample string 3", "UserID": 4, "CyclistDescription": "sample string 5", "RefNo": "sample string 6", "SerialNo": "sample string 7", "Manufacturer": "sample string 8", "Model": "sample string 9", "Colour": "sample string 10", "ModelYear": 11, "Km": 12.1, "MovingTime": 13, "LastService": "2025-09-05T16:09:41.0723225+00:00", "DateBought": "2025-09-05T16:09:41.0723225+00:00", "StatusID": 14, "Status": "sample string 15", "MinutesToNextService": 16, "HoursToNextService": 17, "KmToNextService": 18, "KmSinceLastService": 19, "MovingTimeSinceLastService": 20, "ImageURL": "sample string 21", "ServicePercentage": 22, "Strava_Id": "sample string 23", "IntegrationStatusID": 24, "OpeningKm": 25, "OpeningHours": 26, "UnitsOfMeasureID": 27, "HasKMBasedGear": true, "HasHourBasedGear": true, "BikeSize": "sample string 30", "PartnerType": 31 }
application/xml, text/xml
<BikeModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Hub.Server.Models.DTO"> <BikeSize>sample string 30</BikeSize> <Colour>sample string 10</Colour> <CyclistDescription>sample string 5</CyclistDescription> <DateBought>2025-09-05T16:09:41.0723225+00:00</DateBought> <HasHourBasedGear>true</HasHourBasedGear> <HasKMBasedGear>true</HasKMBasedGear> <HoursToNextService>17</HoursToNextService> <ID>1</ID> <ImageURL>sample string 21</ImageURL> <IntegrationStatusID>24</IntegrationStatusID> <Km>12.1</Km> <KmSinceLastService>19</KmSinceLastService> <KmToNextService>18</KmToNextService> <LastService>2025-09-05T16:09:41.0723225+00:00</LastService> <Manufacturer>sample string 8</Manufacturer> <MinutesToNextService>16</MinutesToNextService> <Model>sample string 9</Model> <ModelYear>11</ModelYear> <MovingTime>13</MovingTime> <MovingTimeSinceLastService>20</MovingTimeSinceLastService> <OpeningHours>26</OpeningHours> <OpeningKm>25</OpeningKm> <PartnerType>31</PartnerType> <RefNo>sample string 6</RefNo> <SerialNo>sample string 7</SerialNo> <ServicePercentage>22</ServicePercentage> <Status>sample string 15</Status> <StatusID>14</StatusID> <Strava_Id>sample string 23</Strava_Id> <Type>sample string 3</Type> <TypeID>2</TypeID> <UnitsOfMeasureID>27</UnitsOfMeasureID> <UserID>4</UserID> </BikeModel>