Servisler

Nasıl KullanılırSon Güncelleme Tarihi:09.10.2025

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.

Cevap:

                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "result": [],
    "error": null,
    "isSuccessful": true,
    "message": null
} null
}                               
                                

Erişim Noktaları

Login API

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:

Başarılı Yanıt Durumu:

İstek

                                                
POST  capi/rest/api/Account/GetToken HTTP/1.1
Host: https://onprem-api.ford.com.tr/
Content-Type: application/json
Body:
{  
   "clientId": "{your-client-id}",  
   "clientSecret": "{your-client-secret}"
}
                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "result": {
        "tokenType": "Bearer",
        "expiresIn": 10,
        "accessToken": "Token...."
    },
    "error": null,
    "isSuccessful": true,
    "message": null
}
                                                
                                                

VehicleSignal API

VehicleSignal API

Araçlardan gelen son sinyal bilgilerini dönen servistir.

VehicleSignal API için POST isteğinin bir örneği:

Başarılı Yanıt Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [
        "Battery",
        "Tpms.Row1"
    ]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "result": [
        {
            "vin": "VehicleIdentificationNo",
            "data": {
                "signals": [
                    {
                        "path": "Battery.StateOfCharge",
                        "value": "75.0",
                        "timestamp": "04081427022025"
                    },
                    {
                        "path": "Tpms.Row1.Tire1.Pressure",
                        "value": "65533.0",
                        "timestamp": "04081427022025"
                    },
                    {
                        "path": "Tpms.Row1.Tire2.Pressure",
                        "value": "207.0",
                        "timestamp": "04081427022025"
                    }
                ]
            }
        }
    ],
    "error": null,
    "isSuccessful": true,
    "message": null
}
                                                
                                                
Hata Yanıtı Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": []
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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

VehicleConnectivity API

Aracın connectivity ayarlarının döndüğü servistir.

VehicleConnectivity API için POST isteğinin bir örneği:

Başarılı Yanıt Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [
        "CCS"
    ]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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
}
                                                
                                                
Hata Yanıtı Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [""]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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

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:

Başarılı Yanıt Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [
        "Uptime.EngineOilLevel"
    ]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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
}
                                                
                                                
Hata Yanıtı Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [""]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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

VehicleInventory API

Araç envanter bilgilerinin döndüğü servistir.

VehicleInventory API için POST isteğinin bir örneği:

Başarılı Yanıt Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [
        "Inventory.Brand.Name",
        "Inventory.Model"
    ]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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
}
                                                
                                                
Hata Yanıtı Durumu:

İstek

                                                
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}
Body:
{
    "vinList": [
        "VehicleIdentificationNo"
    ],
    "parameters": [""]
}

                                                
                                                

Cevap:

                                                
HttpCode:200                                                   
Content-Type: application/json
Body:
{
    "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

VehicleInsight API

Araç insight bilgilerinin döndüğü servistir.

VehicleInsight API için POST isteğinin bir örneği:

Başarılı Yanıt Durumu:

İstek

                                                
POST /capi/rest/api/Vehicle/Insight HTTP/1.1
Host: https://test-onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
Body:
{
    {
    "vinList": [
       "VehicleIdentificationNo"
    ],
    "parameters": [
        "Insight.Odometer"
    ],
    "startTime": "00000001072025",
    "endTime": "00000030082025"
}                                               
                                                

Cevap:

                                                
HttpCode: 200
Content-Type: application/json
Body:
{
    "result": [
        {
            "vin": "VehicleIdentificationNo",
            "data": {
                "insights": [
                    {
                        "path": "Insight.Odometer",
                        "value": "209855",
                        "startTime": "00000001072025",
                        "endTime": "00000030082025"
                    }
                ]
            }
        }
    ],
    "error": null,
    "isSuccessful": true,
    "message": null
}                                               
                                                
Hata Yanıtı Durumu:

İstek

                                                
POST /capi/rest/api/Vehicle/Insight HTTP/1.1
Host: https://test-onprem-api.ford.com.tr
Content-Type: application/json
Authorization: Bearer {your-access-token}
Body:
{
  "vinList": [
   "VehicleIdentificationNo"
  ],
  "parameters": [""],
  "startTime": "00000001072025",
  "endTime": "00000030082025"
}                                               
                                                

Cevap:

                                                
HttpCode: 200
Content-Type: application/json
Body:
{
    "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
}                                             
                                              

Veri Akış Servisleri

Veri Akışı Servisi

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}
You need to import capi_proto(proto2) file.
                                
                                

• Postman'deki 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. Postman'ı 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.