Last updated 7 days ago
var options = new RestClientOptions("http://localhost:11006") { MaxTimeout = -1, }; var client = new RestClient(options); var request = new RestRequest("/Properties", Method.Put); request.AddHeader("Content-Type", "application/json-patch+json"); request.AddHeader("Authorization", "Bearer <API KEY>"); var body = @"{ ""Nace"": ""15160"", ""Creator"": ""Ali İçellioğlu"", ""TaxType"": ""IncludeTax"", ""LineCount"": 5000, ""IsBranch"": true, ""BranchName"": ""Merkez Şube"", ""BranchNumber"": ""0001"", ""LedgerPeriod"": true, ""FiscalYearStart"": ""2023-01-01"", ""FiscalYearEnd"": ""2023-12-31"", ""AccountingPeriod"": ""AccountingPeriod"", ""IsLiquidate"": false, ""LiquidateYearStart"": ""2024-01-29T07:32:15.625Z"" }"; request.AddStringBody(body, DataFormat.Json); RestResponse response = await client.ExecuteAsync(request); Console.WriteLine(response.Content);
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'http://localhost:11006/Properties', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS =>'{ "Nace": "15160", "Creator": "Ali İcellioglu", "TaxType": "IncludeTax", "LineCount": 5000, "IsBranch": true, "BranchName": "Merkez Şube", "BranchNumber": "0001", "LedgerPeriod": true, "FiscalYearStart": "2023-01-01", "FiscalYearEnd": "2023-12-31", "AccountingPeriod": "AccountingPeriod", "IsLiquidate": false, "LiquidateYearStart": "2024-01-29T07:32:15.625Z" }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json-patch+json', 'Authorization: Bearer <API KEY>' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
const axios = require('axios'); let data = JSON.stringify({ "Nace": "15160", "Creator": "Ali İcellioglu", "TaxType": "IncludeTax", "LineCount": 5000, "IsBranch": true, "BranchName": "Merkez Şube", "BranchNumber": "0001", "LedgerPeriod": true, "FiscalYearStart": "2023-01-01", "FiscalYearEnd": "2023-12-31", "AccountingPeriod": "AccountingPeriod", "IsLiquidate": false, "LiquidateYearStart": "2024-01-29T07:32:15.625Z" }); let config = { method: 'put', maxBodyLength: Infinity, url: 'http://localhost:11006/Properties', headers: { 'Content-Type': 'application/json-patch+json', 'Authorization': 'Bearer <API KEY>' }, data : data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
PUT /eledger/Properties HTTP/1.1 Host: Authorization: Bearer JWT Content-Type: application/json-patch+json Accept: */* Content-Length: 632 { "ELedgerProperties": { "Nace": "text", "Creator": "text", "CurrencyCode": "text", "TaxType": "IncludeTax", "LineCount": 1, "IsBranch": true, "BranchName": "text", "BranchNumber": "text", "LedgerPeriod": true, "FiscalYearStart": "2025-05-14T20:19:23.819Z", "FiscalYearEnd": "2025-05-14T20:19:23.819Z", "AccountingPeriod": "AccountingPeriod", "IsLiquidate": true, "BalanceControl": true, "PaymentMethodControl": true, "LiquidateYearStart": "2025-05-14T20:19:23.819Z", "SignMethod": "SmartCard", "SplitBillControl": true, "DocumentNumberControl": true, "AutoNumberControl": true, "DateDifferenceValidControl": true, "OpeningVoucherControl": true, "AutoPaymentMethodControl": true } }
Defter ayarları yoksa oluşturur varsa günceller.
true