Sends the document as Model
Authorizations
Body
Responses
200
SKG Belgesini model olarak gönderir.
400
Geçersiz İstek | Gönderdiğiniz istekte geçersiz veriler bulunduğu anlamında gelmektedir | Detaylar için tıklayınız
403
Yetkisiz Erişim | Bu uca erişmek için gerekli yetkiye sahip olmadığınız durumda dönülür
404
Parametrede belirtilen kayıt bulunamadığında dönülür | Detaylar için tıklayınız
409
Gönderdiğiniz istek sistemde daha önce bulunduğunda dönülür | Detaylar için tıklayınız
422
Gönderdiğiniz istek geçerli fakat iş kuralları gereği geçersiz değerler içerdiğinde dönülür | Detaylar için tıklayınız
post
/Send/ModelPOST /einvoice/Send/Model HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 1235
{
  "Insurance": {
    "InsuranceInfo": {
      "UUID": "123e4567-e89b-12d3-a456-426614174000",
      "TemplateUUID": "123e4567-e89b-12d3-a456-426614174000",
      "TemplateBase64String": "text",
      "InsuranceSerieOrNumber": "text",
      "IssueDate": "2025-11-03T17:25:52.677Z",
      "CurrencyCode": "text",
      "ExchangeRate": 1,
      "InvoicePeriod": {
        "StartDate": "2025-11-03T17:25:52.677Z",
        "StartTime": "text",
        "EndDate": "2025-11-03T17:25:52.677Z",
        "EndTime": "text",
        "DurationMeasureValue": 1,
        "Description": "text"
      }
    },
    "CompanyInfo": {
      "TaxNumber": "text",
      "Name": "text",
      "TaxOffice": "text",
      "PartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "Address": "text",
      "District": "text",
      "City": "text",
      "Country": "text",
      "PostalCode": "text",
      "Phone": "text",
      "Fax": "text",
      "Mail": "text",
      "WebSite": "text"
    },
    "CustomerInfo": {
      "TaxNumber": "text",
      "Name": "text",
      "TaxOffice": "text",
      "PartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "Address": "text",
      "District": "text",
      "City": "text",
      "Country": "text",
      "PostalCode": "text",
      "Phone": "text",
      "Fax": "text",
      "Mail": "text",
      "WebSite": "text"
    },
    "InsuranceLines": [
      {
        "Name": "text",
        "CancelledCommissionAmount": 1,
        "IssuedCommissionAmount": 1
      }
    ],
    "Notes": [
      "text"
    ]
  }
}{
  "UUID": "123e4567-e89b-12d3-a456-426614174000",
  "InsuranceNumber": "text"
}var options = new RestClientOptions("//einsurance/Send/Model")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer {{bearerToken}}");
var body = @"{" + "\n" +
@"  ""Insurance"": {" + "\n" +
@"    ""CustomerInfo"": {" + "\n" +
@"      ""Address"": ""<string>""," + "\n" +
@"      ""City"": ""<string>""," + "\n" +
@"      ""Country"": ""<string>""," + "\n" +
@"      ""District"": ""<string>""," + "\n" +
@"      ""Name"": ""<string>""," + "\n" +
@"      ""TaxNumber"": ""99999999999""," + "\n" +
@"      ""TaxOffice"": ""<string>""," + "\n" +
@"      ""PartyIdentifications"": [" + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }" + "\n" +
@"      ]," + "\n" +
@"      ""AgentPartyIdentifications"": [" + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }" + "\n" +
@"      ]," + "\n" +
@"      ""PostalCode"": ""<string>""," + "\n" +
@"      ""Phone"": ""<string>""," + "\n" +
@"      ""Fax"": ""<string>""," + "\n" +
@"      ""Mail"": ""<string>""," + "\n" +
@"      ""WebSite"": ""<string>""" + "\n" +
@"    }," + "\n" +
@"    ""InsuranceInfo"": {" + "\n" +
@"      ""CurrencyCode"": ""<string>""," + "\n" +
@"      ""InsuranceSerieOrNumber"": ""E38_PCds""," + "\n" +
@"      ""IssueDate"": ""<dateTime>""," + "\n" +
@"      ""UUID"": ""<uuid>""," + "\n" +
@"      ""TemplateUUID"": ""<uuid>""," + "\n" +
@"      ""TemplateBase64String"": ""<string>""," + "\n" +
@"      ""ExchangeRate"": ""<double>""," + "\n" +
@"      ""InvoicePeriod"": {" + "\n" +
@"        ""Description"": ""<string>""," + "\n" +
@"        ""EndDate"": ""<dateTime>""," + "\n" +
@"        ""StartDate"": ""<dateTime>""," + "\n" +
@"        ""StartTime"": ""<string>""," + "\n" +
@"        ""EndTime"": ""<string>""," + "\n" +
@"        ""DurationMeasureValue"": ""<double>""" + "\n" +
@"      }" + "\n" +
@"    }," + "\n" +
@"    ""InsuranceLines"": [" + "\n" +
@"      {" + "\n" +
@"        ""Name"": ""<string>""," + "\n" +
@"        ""CancelledCommissionAmount"": ""<double>""," + "\n" +
@"        ""IssuedCommissionAmount"": ""<double>""" + "\n" +
@"      }" + "\n" +
@"    ]," + "\n" +
@"    ""CompanyInfo"": {" + "\n" +
@"      ""Address"": ""<string>""," + "\n" +
@"      ""City"": ""<string>""," + "\n" +
@"      ""Country"": ""<string>""," + "\n" +
@"      ""District"": ""<string>""," + "\n" +
@"      ""Name"": ""<string>""," + "\n" +
@"      ""TaxNumber"": ""46844684468""," + "\n" +
@"      ""TaxOffice"": ""<string>""," + "\n" +
@"      ""PartyIdentifications"": [" + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }" + "\n" +
@"      ]," + "\n" +
@"      ""AgentPartyIdentifications"": [" + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        {" + "\n" +
@"          ""SchemeID"": ""<string>""," + "\n" +
@"          ""Value"": ""<string>""" + "\n" +
@"        }" + "\n" +
@"      ]," + "\n" +
@"      ""PostalCode"": ""<string>""," + "\n" +
@"      ""Phone"": ""<string>""," + "\n" +
@"      ""Fax"": ""<string>""," + "\n" +
@"      ""Mail"": ""<string>""," + "\n" +
@"      ""WebSite"": ""<string>""" + "\n" +
@"    }," + "\n" +
@"    ""Notes"": [" + "\n" +
@"      ""<string>""," + "\n" +
@"      ""<string>""" + "\n" +
@"    ]" + "\n" +
@"  }" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => '//einsurance/Send/Model',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "Insurance": {
    "CustomerInfo": {
      "Address": "<string>",
      "City": "<string>",
      "Country": "<string>",
      "District": "<string>",
      "Name": "<string>",
      "TaxNumber": "99999999999",
      "TaxOffice": "<string>",
      "PartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "PostalCode": "<string>",
      "Phone": "<string>",
      "Fax": "<string>",
      "Mail": "<string>",
      "WebSite": "<string>"
    },
    "InsuranceInfo": {
      "CurrencyCode": "<string>",
      "InsuranceSerieOrNumber": "E38_PCds",
      "IssueDate": "<dateTime>",
      "UUID": "<uuid>",
      "TemplateUUID": "<uuid>",
      "TemplateBase64String": "<string>",
      "ExchangeRate": "<double>",
      "InvoicePeriod": {
        "Description": "<string>",
        "EndDate": "<dateTime>",
        "StartDate": "<dateTime>",
        "StartTime": "<string>",
        "EndTime": "<string>",
        "DurationMeasureValue": "<double>"
      }
    },
    "InsuranceLines": [
      {
        "Name": "<string>",
        "CancelledCommissionAmount": "<double>",
        "IssuedCommissionAmount": "<double>"
      }
    ],
    "CompanyInfo": {
      "Address": "<string>",
      "City": "<string>",
      "Country": "<string>",
      "District": "<string>",
      "Name": "<string>",
      "TaxNumber": "46844684468",
      "TaxOffice": "<string>",
      "PartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "PostalCode": "<string>",
      "Phone": "<string>",
      "Fax": "<string>",
      "Mail": "<string>",
      "WebSite": "<string>"
    },
    "Notes": [
      "<string>",
      "<string>"
    ]
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: text/plain',
    'Authorization: Bearer {{bearerToken}}'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
const axios = require('axios');
let data = JSON.stringify({
  "Insurance": {
    "CustomerInfo": {
      "Address": "<string>",
      "City": "<string>",
      "Country": "<string>",
      "District": "<string>",
      "Name": "<string>",
      "TaxNumber": "99999999999",
      "TaxOffice": "<string>",
      "PartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "PostalCode": "<string>",
      "Phone": "<string>",
      "Fax": "<string>",
      "Mail": "<string>",
      "WebSite": "<string>"
    },
    "InsuranceInfo": {
      "CurrencyCode": "<string>",
      "InsuranceSerieOrNumber": "E38_PCds",
      "IssueDate": "<dateTime>",
      "UUID": "<uuid>",
      "TemplateUUID": "<uuid>",
      "TemplateBase64String": "<string>",
      "ExchangeRate": "<double>",
      "InvoicePeriod": {
        "Description": "<string>",
        "EndDate": "<dateTime>",
        "StartDate": "<dateTime>",
        "StartTime": "<string>",
        "EndTime": "<string>",
        "DurationMeasureValue": "<double>"
      }
    },
    "InsuranceLines": [
      {
        "Name": "<string>",
        "CancelledCommissionAmount": "<double>",
        "IssuedCommissionAmount": "<double>"
      }
    ],
    "CompanyInfo": {
      "Address": "<string>",
      "City": "<string>",
      "Country": "<string>",
      "District": "<string>",
      "Name": "<string>",
      "TaxNumber": "46844684468",
      "TaxOffice": "<string>",
      "PartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        },
        {
          "SchemeID": "<string>",
          "Value": "<string>"
        }
      ],
      "PostalCode": "<string>",
      "Phone": "<string>",
      "Fax": "<string>",
      "Mail": "<string>",
      "WebSite": "<string>"
    },
    "Notes": [
      "<string>",
      "<string>"
    ]
  }
});
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '//einsurance/Send/Model',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'text/plain', 
    'Authorization': 'Bearer {{bearerToken}}'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
Last updated