> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.insurgateway.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.insurgateway.com/_mcp/server.

# Get Job By Id

GET https://testgatewayapi.insurapps.net/api/Offline/jobs/{jobId}

## İş Detayını Getir

### Endpoint Bilgileri

| Alan              | Değer                                  |
| ----------------- | -------------------------------------- |
| **Method**        | `GET`                                  |
| **URL**           | `{{baseUrl}}/api/Offline/jobs/{jobId}` |
| **Yetkilendirme** | Bearer Token + `Read` politikası       |

***

Sigorta şirketinin, **tek bir işin bilgisini** almak için kullanılır.

Yanıt, iş listesi (`GET {{baseUrl}}/api/Offline/jobs`) ucundaki kayıtla **birebir aynı alanları** içerir; sayfalama yoktur.

> İşin aşamasını **değiştirmez** ve işin **her aşamasında** çağrılabilir.

***

### Route Parametreleri

| Parametre | Tip       | Zorunlu | Açıklama                                                                                         |
| --------- | --------- | ------- | ------------------------------------------------------------------------------------------------ |
| `jobId`   | `integer` | Evet    | Bilgisi getirilecek işin Id bilgisi. 0'dan büyük olmalıdır: `"JobId must be greater than zero."` |

> İstek gövdesi ve query parametresi yoktur.

***

### Kimlik Doğrulama

Geçerli bir bearer token gerektirir. Token şunları içermelidir:

* Tanınan bir rol (`InsuranceCompanyAPIUser`, `InsuranceCompanyAPIAdmin` veya `Supervizor`)
* İlgili route için `Read` yetkisi
* Geçerli bir sigorta şirketi ataması

> İş, token'daki sigorta şirketlerinden birine ait olmalıdır; token'daki sigorta şirketi `0` ise tüm şirketlerin işleri görülebilir. `InsuranceCompanyAPIUser` yalnızca kendi sahibi olduğu işleri görebilir. `InsuranceCompanyAPIAdmin` ve `Supervizor` için iş sahipliği kontrolü yapılmaz.

***

### İş Kuralları

İstek aşağıdaki sırayla kontrol edilir. Bir adım başarısız olursa sonraki adımlara geçilmez.

1. Route parametresi doğrulanır.
2. Token'daki sigorta şirketi ataması kontrol edilir.
3. İş, token'daki sigorta şirketlerine ait olma ve `InsuranceCompanyAPIUser` için iş sahipliği koşullarıyla aranır. Koşulları sağlayan iş yoksa `404` döner.

***

### Yanıt Kuralları

* `BranchId`, işin son aksiyonundaki acentenin acente tanımında girilen **Şube Id** değeridir (Banka tipindeki acentelerde zorunlu). `BranchName`, aynı acentenin adıdır. `AgentName` ise üst acente adını döner.
* `ProposalId`, Gateway teklif numarasıdır.
* İşin son aksiyonundaki acente bulunamazsa `BranchId` ve `BranchName` alanları `null` döner.

***

### Yanıt

#### `200 OK` — Başarılı Yanıt

```json
{
    "Id": 211224,
    "CurrentStage": 20,
    "JobStatus": 1,
    "ProductId": 158,
    "ProductBranchId": 1,
    "RejectReasonId": 1,
    "LastJobActionType": 20,
    "CreateDate": "2026-06-08T15:44:13.634714",
    "LastActionDate": "2026-07-13T14:13:29.8068332",
    "HasExistPolicyRequest": false,
    "OwnerId": "ae116cd4-a26e-47ab-8b0f-07d5ac9cb79c",
    "AgentName": null,
    "ProductBranchName": "Kasko",
    "PlatformProposalId": "string",
    "InsuranceCompanyProposalNumber": null,
    "BranchId": 99,
    "BranchName": "VAKIF Katılım GM",
    "ProposalId": 1260979
}

```

#### Yanıt Alanları

| Alan                             | Tip        | Açıklama                                        |
| -------------------------------- | ---------- | ----------------------------------------------- |
| `Id`                             | `integer`  | İşin Id bilgisi                                 |
| `CurrentStage`                   | `integer`  | İşin mevcut aşaması                             |
| `JobStatus`                      | `integer`  | İşin mevcut durumu                              |
| `ProductId`                      | `integer`  | Ürün Id bilgisi                                 |
| `ProductBranchId`                | `integer`  | Ürün branş Id bilgisi                           |
| `RejectReasonId`                 | `integer?` | Red nedeni Id bilgisi                           |
| `LastJobActionType`              | `integer`  | Son aksiyon tipi                                |
| `CreateDate`                     | `datetime` | İşin oluşturulma tarihi                         |
| `LastActionDate`                 | `datetime` | Son aksiyon tarihi                              |
| `HasExistPolicyRequest`          | `boolean`  | Teklif için poliçe talebi olup olmadığı         |
| `OwnerId`                        | `string`   | İşin sahibi kullanıcının Id bilgisi             |
| `AgentName`                      | `string`   | Üst acente adı                                  |
| `ProductBranchName`              | `string`   | Ürün branş adı                                  |
| `PlatformProposalId`             | `string`   | Platform teklif numarası                        |
| `InsuranceCompanyProposalNumber` | `string`   | Sigorta şirketi teklif numarası                 |
| `BranchId`                       | `integer?` | Acente tanımındaki Şube Id değeri. Yoksa `null` |
| `BranchName`                     | `string`   | Şube adı. Yoksa `null`                          |
| `ProposalId`                     | `integer?` | Gateway teklif numarası. Yoksa `null`           |

***

### Hata Senaryoları

#### `400 Bad Request` — Doğrulama Hatası

`jobId` 1'den küçük olduğunda döner. Hatalı alanlar `Response` içinde listelenir.

```json
{
    "Status": false,
    "Code": "Validation.General",
    "Message": "One or more validation errors occurred",
    "Response": [
        {
            "Field": "JobId",
            "Message": "JobId must be greater than zero."
        }
    ]
}

```

***

#### `401 Unauthorized` — Token Yok veya Geçersiz

Token gönderilmediğinde, geçersiz olduğunda veya süresi dolduğunda döner. **Gövde boştur.** Süresi dolmuş token için yanıtta `Token-Expired: true` header'ı bulunur.

***

#### `403 Forbidden` — Geçerli Sigorta Şirketi Ataması Bulunamadı

Token'da geçerli bir sigorta şirketi ataması bulunmadığında döner.

```json
{
    "Status": false,
    "Code": "OfflineUsers.InsuranceCompanyNotFound",
    "Message": "No valid insurance company assignment found in token.",
    "Response": null
}

```

***

#### `403 Forbidden` — Rol veya Yetki Yetersiz

Kullanıcı tanınan rollerden birine sahip değilse ya da `Read` yetkisi yoksa döner. **Gövde boştur.**

***

#### `404 Not Found` — İş Bulunamadı

Belirtilen `jobId` ile bir iş bulunamadığında, iş token'daki sigorta şirketlerine ait olmadığında veya `InsuranceCompanyAPIUser` rolündeki kullanıcı işin sahibi olmadığında döner.

```json
{
    "Status": false,
    "Code": "OfflineJobs.JobNotFound",
    "Message": "No job found for the requested JobId: 999999999.",
    "Response": null
}

```

***

#### `400 Bad Request` — İşlenmeyen Hata

Beklenmeyen bir hata oluştuğunda (örn. iş okunurken veritabanı hatası) döner. **Gövde JSON değildir**, düz metin hata mesajı döner.

Reference: https://docs.insurgateway.com/insurgateway-api/offline/get-job-by-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://testgatewayapi.insurapps.net` (https://testgatewayapi.insurapps.net, default)
- `https://gatewayapi.insurapps.net` (https://gatewayapi.insurapps.net)

## Request

### Path parameters

- `jobId` (string, required)

## Response

### 200

OK

## Errors

### 400 Bad Request Error

Bad Request

### 403 Forbidden Error

Forbidden

### 404 Not Found Error

Not Found

## Examples

**Response**

```json
{
  "Id": 211224,
  "CurrentStage": 20,
  "JobStatus": 1,
  "ProductId": 158,
  "ProductBranchId": 1,
  "RejectReasonId": 1,
  "LastJobActionType": 20,
  "CreateDate": "2026-06-08T15:44:13.634714",
  "LastActionDate": "2026-07-13T14:13:29.8068332",
  "HasExistPolicyRequest": false,
  "OwnerId": "ae116cd4-a26e-47ab-8b0f-07d5ac9cb79c",
  "AgentName": null,
  "ProductBranchName": "Kasko",
  "PlatformProposalId": "string",
  "InsuranceCompanyProposalNumber": null,
  "BranchId": 99,
  "BranchName": "VAKIF Katılım GM",
  "ProposalId": 1260979
}
```

**SDK Code**

```python Offline_getJobById_example
import requests

url = "https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Offline_getJobById_example
const url = 'https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Offline_getJobById_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Offline_getJobById_example
require 'uri'
require 'net/http'

url = URI("https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Offline_getJobById_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Offline_getJobById_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Offline_getJobById_example
using RestSharp;

var client = new RestClient("https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Offline_getJobById_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://testgatewayapi.insurapps.net/api/Offline/jobs/jobId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```