N/A
Home » Guides » Jobsheet API

Jobsheet API

Introduction

This guide explains how to use our APIs to perform testing prior to third-party integration and  development. It is designed to help developers understand the available endpoints, authentication requirements, request/response structures, and expected behaviours before building a customer-facing interface.

User Configuration – In order to use the API users must be set up with the correct configurations beforehand. These will be arranged by r2c and then shared with the relevant team. Please see below, the requirements needed for each API. 

Asset by Depot API

Credentials Required

The credentials required for this API are Account GUID and API Key.

Step by Step

These steps show an example of using the Asset by Depots API to retrieve key details per asset across the fleet list. 

The parameteres required are:

  • Endpoint URL – https://api.r2clive.com/REST/9/Asset/AssetsByDepot
  • Depot (if filtering by specific sites)
  • Account Guid
  • API Key

Start by adding the URL and parameters to your third party app. Click ‘send’ to run the API. This example uses Postman. Below are a set of example reuslts retrieved by the API.

Jobsheet API

Step by step

These steps show an example of using the Jobsheet API to retrieve key jobsheet details and update worklines.

The steps required are:

  • Credentials
  • Token Generation
  • Authorisation of Token on Swagger docs prior to using an API. 

Credentials Required

The credentials required for this API are outlined in the table below. Some of the required details can be found in your r2c portal account, while others are initially configured by r2c and shared with you during the setup process.

ParameterNotes
Swagger site URL https://r2clive.com/api/Jobsheet/2/swagger/index.html Default URL, to access the API
End point URL https://www.r2clive.com/identity/connect/token Default URL, replace 'www'. With UAT. Depending on Environment.
AccountAccount name as per portal-
Site IDAccount site ID that is used to login to portal.-
UsernameLogin credentials for portalProvided by r2c upon account configuration
PasswordLogin credentials for portalProvided by r2c upon account configuration
grant_type'password'This parameter remains the same for all accounts
client_idProvided by r2c upon account configuration-
client_secretProvided by r2c upon account configuration-
ScopeAccount type identifier. If your account type is a workshop use = openid and if an R&M = r2c_organisation_apiThis paramamter changes based on account type.

Jobsheet extended API – to retrieve jobsheet details.

Jobsheet Post Tasks – to add worklines to jobsheets.

Jobsheet Post Parts- to add parts to existing worklines on jobsheets.

Jobsheet Patch Parts- to update part quantities on existing worklines

Create Asset API

This API allows you to UPDATE existing Assets on r2c by matching an asset and updating specific properties. 

1. Parameters
NameDescription
GUIDA unique reference number for the account using the API.
APIKeyPassword used to connect to the API

The main data sent via the API is through the body section. This consists of a R2CPublicAsset structure using the below fields 

Match

This is a collection of key/value pairs that are used to match the existing Asset that you want to update.

NameDescription
ExternalReferenceThe external reference given by the customer when they created the Asset in the API.
VinOrChassisThe Vin or Chassis number of the asset.
RegistrationNumber The Registration Number of the asset.
Updates

A collection of key/value pairs, each specifying a property name and the required value to be updated on the asset record fields in portal.

NameDescription
ExternalReferenceA unique reference number for the account using the API.
VinOrChassisThe Vin or Chassis number of the asset.
FleetNumberThe customer’s fleet number for the asset. Max 20 Characters.
RegistrationNumberThe normal identifier for an Asset. Max 10 Characters.
Description? Free Text, Max 20 Characters.
RegDateOptional Date, YYYY-MM-DD
InServiceDateOptional Date, YYYY-MM-DD
ManufactureDateOptional Date, YYYY-MM-DD
ManufacturerExample: Scania, DAF, Volvo etc.
WarrantyExpiryDateOptional Date, YYYY-MM-DD
AssetTypeExample: Tractor, Trailer, Rigid etc.
BodyTypeExample: Artic, Box, Bin Lift etc.
InspectionInterval-
UsageUnitExample: M, Km, H.
WorkshopPrimary Repairer
WorkshopID? SITE ID
TotalAssetCost? String numeric value
UsageLast Known Usage
MOTExpiryDateOptional Date, YYYY-MM-DD
TachoExpiryDateOptional Date, YYYY-MM-DD
ParentRegistrationNumberOptional reg of parent asset.
ParentExternalReferenceOptional external reference of parent asset
GrossVehicleWeightDecimal gross weight in tonnes
TransmissionExample: Automatic, Manual, Semi-Automatic.
ColourExample: Black, Brown Red etc.
EmissionStandardExample: Euro 6, FRD6 etc.
ContractLeaseCompanyFree Text
ContractLeaseNumberFree Text
ContractLeaseTypeExample: 3 Year Rental, 5 Year Finance, Hired etc.
ContractStartDateOptional Date YYYY-MM-DD
ContractEndDateOptional Date YYYY-MM-DD
ContractMileageOptional max mileage
ContractExcessMileageChargeOptional excess mileage
ManufacturerRangeModelThe preferred method of setting the manufacturer, range and model. The three are separated by “|” like this: "Manu|Range|Model"
Model NumberFree Text, Max 20 Characters.
AxleConfigAxel configuration as Position, Steer & WheelCount.
Management RoleManagement details as Role & reference.* See available roles below
Custom DetailsCustom field name and value. *See Custom Details for more information.
MaintenanceProductOptional section in the Contract Lease tab where you can add 2 optional items. MaintenanceProductName and ExpiryDate. IMPORTANT: if a set of Maintenance Products is included in an Update and the Asset already has some assigned, the new set will replace the entire existing set.
Management Roles

The API allow a collection of Management Roles to be assigned to the asset.

Note that the role name or code may be used in the “Role” parameter.

NameCode
ManufacturerMNFER
OwnerOWNER
OperatorOPROR
DepotDEPOT
Repair AgentRPRAG
WorkshopWRKSH
Warranty ProviderWPROV
Repair and MaintenanceREMNT
Maintenance Products

IMPORTANT: if a set of Maintenance Products is included in an Update and the Asset already has some assigned, the new set will replace the entire existing set.

Custom Details

In the R2C platform, customers with the module enabled can create custom values for their assets. These values are only available to that specific customer and appear in a separate tab on the Assets screen.

There is an optional property “CustomUpdates” which can be used to set a collection of key/value pairs that can be sent to the API. The key needs to relate to the name of the custom value, as it appears in the Portal screen above and the value needs to be valid for that Custom Detail, e.g. a number or a date.

Each request receives a response which outlines if the operation was successful as well as any specific success and error messages 

Update Asset API

These guides describe the API’s on the R2C Platform, accessible through the Public API’s as a REST API. These API’s do not have Swagger documents, the body information is included below. 

1. Parameters
NameDescription
GUIDA unique reference number for the account using the API.
APIKeyPassword used to connect to the API

The main data sent via the API is through the body section. This consists of a R2CPublicAsset structure using the below fields 

NameDescription
ExternalReferenceA unique reference number for the account using the API.
RegistrationNumberThe normal identifier for an Asset. Max 10 Characters.
VinOrChassisThe Vin or Chassis number of the asset.
AssetTypeExample: Tractor, Trailer, Rigid etc.
ManufacturerExample: Scania, DAF, Volvo etc.
FleetNumberThe customer’s fleet number for the asset. Max 20 Characters.
RangeExample: P series, CF, FM etc.
ModelExample: P112, 530, 42T
Model NumberFree Text, Max 20 Characters.
Description? Free Text, Max 20 Characters.
RegDateOptional Date, YYYY-MM-DD
ManufactureDateOptional Date, YYYY-MM-DD
InServiceDateOptional Date, YYYY-MM-DD
MOTExpiryDateOptional Date, YYYY-MM-DD
TachoExpiryDateOptional Date, YYYY-MM-DD
WarrantyExpiryDateOptional Date, YYYY-MM-DD
WorkshopPrimary Repairer
WorkshopID? SITE ID
TotalAssetCost? String numeric value
UsageUnitExample: M, Km, H.
BodyTypeExample: Artic, Box, Bin Lift etc.
UsageLast Known Usage
ParentRegistrationNumberOptional reg of parent asset.
ParentExternalReferenceOptional external reference of parent asset.
GrossVehicleWeightDecimal gross weight in tonnes
TransmissionExample: Automatic, Manual, Semi-Automatic.
ColourExample: Black, Brown Red etc.
EmissionStandardExample: Euro 6, FRD6 etc.
ContractLeaseCompanyFree Text
ContractLeaseNumberFree Text
ContractLeaseTypeExample: 3 Year Rental, 5 Year Finance, Hired etc.
ContractStartDateOptional Date YYYY-MM-DD
ContractEndDateOptional Date YYYY-MM-DD
ContractMileageOptional max mileage
ContractExcessMileageChargeCost per mile
AxleConfigAxel configuration as Position, Steer & WheelCount.
ManagementRolesManagement details as Role & reference.* See available roles below
CustomDetailsCustom field name and value. *See Custom Details for more information.
MaintenanceProductsOptional section in the Contract Lease tab where you can add 2 optional items. MaintenanceProductName and ExpiryDate. IMPORTANT: if a set of Maintenance Products is included in an Update and the Asset already has some assigned, the new set will replace the entire existing set.
Management Roles

The API allow a collection of Management Roles to be assigned to the asset.

Note that the role name or code may be used in the “Role” parameter.

NameCode
ManufacturerMNFER
OwnerOWNER
OperatorOPROR
DepotDEPOT
Repair AgentRPRAG
WorkshopWRKSH
Warranty ProviderWPROV
Repair and MaintenanceREMNT
Maintenance Products

IMPORTANT: if a set of Maintenance Products is included in an Update and the Asset already has some assigned, the new set will replace the entire existing set.

Custom Details

In the R2C platform, customers with the module enabled can create custom values for their assets. These values are only available to that specific customer and appear in a separate tab on the Assets screen.

There is an optional property “CustomDetails” which can be used to set a collection of key/value pairs that can be sent to the API. The key needs to relate to the name of the custom value, as it appears in the Portal screen above and the value needs to be valid for that Custom Detail, e.g. a number or a date.

Each request receives a response which outlines if the operation was successful as well as any specific success and error messages 

Did you find this page useful?

Overall did you find what you were looking for?

Page Rating
Radio Buttons

Account Icon Key

A green outline on the account type icon signifies the guide is applicable whereas a red outline signifies it is not applicable to the the respective account type.

Repair and Maintenance Provider

Operator

Workshop

Is something broken or missing?

Let us know here

Report an Issue Form