Genel
CAPI, Ford Otosan'ın bağlı araç entegrasyon ihtiyaçlarını karşılamak için geliştirdiği bir platformdur. Platformun genel araç yönetiminin ötesine geçmesi ve müşterilere araç sağlığı gibi konularda yönetim hizmetleri sağlaması amaçlanmıştır.Ford Otosan, Otosan BT Sistemlerinde barındırılan CAPI çözümünü destekler.
Aşağıdaki gibi bir cevap alıyorsanız sorgulamaya çalıştığın değer sorguladığınız araç için var olmamıştır veya parametrelerinizde bir yazım hatası olabilir. Bazı nadir durumlarda ise bir hata sonucu oluşmuşta olabilir, eğer sorguladığınız değerin var olması gerektiğinden eminseniz lütfen bizle iletişime geçiniz.
HttpCode: 200
Content-Type: application/json
Body:
{
"result": [],
"error": null,
"isSuccessful": true,
"message": null
}
Erişim Noktaları
Login API
Capi servislerine erişebilmek için bir Bearer Token'a sahip olmalısınız. Bearer tokeninizi Login API aracılığıyla alabilirsiniz.
Login API için POST isteğinin bir örneği:
POST /capi/rest/api/Account/GetToken HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
{
"clientId": "{your-client-id}",
"clientSecret": "{your-client-secret}"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": {
"tokenType": "Bearer",
"expiresIn": 10,
"accessToken": "Token...."
},
"error": null,
"isSuccessful": true,
"message": null
}
VehicleSignal API
Araçlardan gelen son sinyal bilgilerini dönen servistir.
VehicleSignal API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Signal HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": ["Battery", "Tpms.Row1"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo",
"data": {
"signals": [
{
"path": "Battery.StateOfCharge",
"value": "75.0",
"timestamp": "04081427022025"
},
{
"path": "Tpms.Row1.Tire1.Pressure",
"value": "65533.0",
"timestamp": "04081427022025"
}
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
POST /capi/rest/api/Vehicle/Signal HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": []
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": null,
"error": {
"code": 400,
"correlationId": "112a423d-b7f9-466d-b5c4-7c82755dcbf5",
"details": null,
"message": "Please check your request paramaters.",
"validationErrors": null
},
"isSuccessful": false,
"message": null
}
VehicleConnectivity API
Aracın connectivity ayarlarının döndüğü servistir.
VehicleConnectivity API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Connectivity HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": ["CCS"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo",
"data": {
"connectivities": [
{ "path": "CCS.Connectivity", "value": "true", "timestamp": "35451711022025" },
{ "path": "CCS.DriverBehaviour", "value": "false", "timestamp": "35451711022025" },
{ "path": "CCS.Location", "value": "false", "timestamp": "35451711022025" },
{ "path": "CCS.VehicleData", "value": "true", "timestamp": "35451711022025" }
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
POST /capi/rest/api/Vehicle/Connectivity HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": [""]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": null,
"error": {
"code": 400,
"correlationId": "b5219106-4d7b-4d07-b2c3-81cc9a368d85",
"details": null,
"message": "Please check your request paramaters.",
"validationErrors": null
},
"isSuccessful": false,
"message": null
}
VehicleHealth API
Araç sağlığı durumunun gönderildiği servistir.
Mevcuttaki statüler:
0 - Good
1 – Critical / Action Soon
2- Action Now
Bu statüler ve parametreler ihtiyaca göre artırılabilir.
VehicleHealth API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Health HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": ["Uptime.EngineOilLevel"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo",
"data": {
"healths": [
{
"path": "Uptime.EngineOilLevel",
"value": "0",
"timestamp": "42440209102025",
"signals": [
{
"path": "Engine.LowOilIndicatorStatus",
"value": "0.0",
"timestamp": "42440209102025"
}
]
}
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
POST /capi/rest/api/Vehicle/Health HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": [""]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": null,
"error": {
"code": 400,
"correlationId": "b5219106-4d7b-4d07-b2c3-81cc9a368d85",
"details": null,
"message": "Please check your request paramaters.",
"validationErrors": null
},
"isSuccessful": false,
"message": null
}
VehicleInventory API
Araç envanter bilgilerinin döndüğü servistir.
VehicleInventory API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Inventory HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": [
"Inventory.Brand.Name",
"Inventory.Model"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo",
"data": {
"inventories": [
{ "path": "Inventory.Brand.Name", "value": "FORD", "timestamp": "29261107112024" },
{ "path": "Inventory.Model.Code", "value": "MODELCODE", "timestamp": "29261107112024" },
{ "path": "Inventory.Model.Description", "value": "TOURNEO COURIER TREND 1.5L DIZEL M/T 100PS", "timestamp": "29261107112024" },
{ "path": "Inventory.Model.Name", "value": "TRANSIT COURIER (TOURNEO)", "timestamp": "29261107112024" },
{ "path": "Inventory.Model.Year", "value": "2024", "timestamp": "29261107112024" }
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
POST /capi/rest/api/Vehicle/Inventory HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": [""]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": null,
"error": {
"code": 400,
"correlationId": "b5219106-4d7b-4d07-b2c3-81cc9a368d85",
"details": null,
"message": "Please check your request paramaters.",
"validationErrors": null
},
"isSuccessful": false,
"message": null
}
VehicleInsight API
Araç insight bilgilerinin döndüğü servistir.
VehicleInsight API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Insight HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": ["Insight.Odometer"],
"startTime": "00000001072025",
"endTime": "00000030082025"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo",
"data": {
"insights": [
{
"path": "Insight.Odometer",
"value": "209855",
"startTime": "00000001072025",
"endTime": "00000030082025"
}
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
POST /capi/rest/api/Vehicle/Insight HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo"],
"parameters": [""],
"startTime": "00000001072025",
"endTime": "00000030082025"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": null,
"error": {
"code": 500,
"correlationId": "36073f54-8f46-46ef-a37f-f4f40383021c",
"details": null,
"message": "Object reference not set to an instance of an object.",
"validationErrors": null
},
"isSuccessful": false,
"message": null
}
DTC API
Araçta mevcut olan güncel aktif DTC'leri (Diagnostik Hata Kodları) döner.
DTC API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/DTC HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vinList": ["VehicleIdentificationNo1"],
"parameters": ["DiagnosticTroubleCode"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "VehicleIdentificationNo1",
"data": {
"dtc": [
{
"path": "DiagnosticTroubleCode",
"value": {
"dtc": "1199-00",
"failureType": "0x11",
"ecu": "327168",
"status": "0x29",
"platform": "VR625_MY24",
"startDate": "40121413052026"
},
"timestamp": "44121114052026"
},
{
"path": "DiagnosticTroubleCode",
"value": {
"dtc": "1299-00",
"failureType": "0x19",
"ecu": "327168",
"status": "0x02",
"platform": "VR625_MY24",
"startDate": "40121413052026"
},
"timestamp": "44121114052026"
}
]
}
}
],
"error": null,
"isSuccessful": true,
"message": null
}
DTC Sözlük API
Verilen DTC kodlarının açıklamasını ve detaylarını sözlükten döner. languageCode parametresi ile dile özel açıklamalar desteklenir.
DTC Dictionary API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/DTC/Dictionary HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"languageCode": "en-US",
"parameters": [
{
"dtc": "42A13-13",
"ecu": "270592",
"platform": "VR625_MY24",
"failureType": "0x27",
"status": "0x01"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"description": "Right Turn Rear Signal Output Open Circuit",
"dtc": "42A13-13",
"ecu": "270592",
"failureType": "0x27",
"status": "0x01",
"platform": "VR625_MY24",
"module": "BCM"
}
],
"error": null,
"isSuccessful": true,
"message": null
}
VehicleConfiguration API
Araçlara konfigürasyon parametreleri uygular (örn. özelliklerin etkinleştirilmesi/devre dışı bırakılması). Her araç grubu aynı konfigürasyon setini paylaşır. VIN'ler otomatik olarak PCCV veya Truck olarak sınıflandırılarak ilgili servise yönlendirilir.
VehicleConfig API için POST isteğinin bir örneği:
POST /capi/rest/api/Vehicle/Config HTTP/1.1
Host: https://onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
{
"vins": ["NM0KBGSWUAT099193"],
"configs": [
{
"parameter": "Configuration.FleetMode",
"value": "ON"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": [
{
"vin": "NM0KBGSWUAT099193",
"parameter": "Configuration.FleetMode",
"value": "ON",
"isSuccessful": true,
"message": null
}
],
"error": null,
"isSuccessful": true,
"message": null
}
Veri Akış Servisleri
Araçtan gelen verilerin anlık olarak alınmasını sağlar.
GRPC servisinden faydalanabilmek için capi.proto dosyasını kullanmanız gerekmektedir.
GRPC servisi için örnek istek:
GRPC /StartStream HTTP/2
Host: grpc://capi-telematics.ford.com.tr
Authorization: Bearer {your-access-token}
// Import capi_proto (proto2) file
• API istemcinizde adres çubuğunun yakınındaki kilit simgesi bağlantının güvenli (HTTPS) olup olmadığını gösterir. Lütfen akışı çağırmadan önce bunu işaretlediğinizden emin olun.
1. API istemcinizi açın ve Yeni Bir İstek Oluşturun:
• 'Yeni'ye tıklayın ve 'İstek' seçeneğini seçin.
• İsteği adlandırın ve 'gRPC' seçeneğini seçin.
2. gRPC Sunucu URL'sini Girin:
• URL'yi girin: grpc://capi-telematics.ford.com.tr.
3. Proto Dosyasını İçe Aktarın:
• 'İçe Aktar' düğmesine tıklayın ve 'capi.proto' dosyasını seçin.
4. Yöntemi Seçin ve İsteği Yapılandırın:
• Mevcut yöntemler listesinden 'StartStream' yöntemini seçin.
• Yetkilendirme başlığını Bearer token ile ayarlayın.
5• HTTPS kilidi sembolünü işaretlediğinizi kontrol edin ve çağırın.