> For the complete documentation index, see [llms.txt](https://kilavuz.cubicl.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kilavuz.cubicl.io/api-entegrasyonu/cari-hesap.md).

# Cari Hesap

Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler.

## Cari hesap sayfasını getir

> Cari hesap sayfası için gerekli cari hesap kaydı, aktivite ve istatistikleri getirir.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"BookkeepingPage":{"type":"object","properties":{"activities":{"type":"array","items":{"$ref":"#/components/schemas/BookkeepingActivity"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/BookkeepingEntry"}},"payables":{"$ref":"#/components/schemas/BookkeepingTotals"},"receivables":{"$ref":"#/components/schemas/BookkeepingTotals"}}},"BookkeepingActivity":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"entry":{"type":"string"},"payment":{"type":"string"},"type":{"type":"string","enum":["receivable-created","payable-created","payment-received","payment-sent","payment-deleted"]},"data":{"type":"object","properties":{"entryName":{"type":"string"},"entryDueAt":{"type":"number"},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number"}}},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"BookkeepingEntry":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}}},"type":{"type":"string","enum":["receivable","payable"]},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"name":{"type":"string"},"desc":{"type":"string","nullable":true},"paidAmount":{"type":"number"},"isPaid":{"type":"boolean"},"dueAt":{"type":"number","nullable":true},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"}}},"BookkeepingTotals":{"type":"object","properties":{"total":{"type":"number"},"outstanding":{"type":"number"},"overdue":{"type":"number"},"currency":{"type":"string"}}},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}}}},"paths":{"/bookkeeping/page":{"get":{"tags":["Cari Hesap"],"summary":"Cari hesap sayfasını getir","operationId":"getBookkeepingPage","responses":{"200":{"description":"Aktiviteler, kayıtlar, borçlar ve alacaklar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookkeepingPage"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"description":"Cari hesap sayfası için gerekli cari hesap kaydı, aktivite ve istatistikleri getirir."}}}}
```

## Cari hesap kaydının aktivitelerini getir

> Belirtilen cari hesap kaydının aktivitelerini getirir.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"BookkeepingActivityList":{"type":"array","items":{"$ref":"#/components/schemas/BookkeepingActivity"}},"BookkeepingActivity":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"entry":{"type":"string"},"payment":{"type":"string"},"type":{"type":"string","enum":["receivable-created","payable-created","payment-received","payment-sent","payment-deleted"]},"data":{"type":"object","properties":{"entryName":{"type":"string"},"entryDueAt":{"type":"number"},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number"}}},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"ValidationFailed":{"description":"Doğrulama başarısız","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/bookkeeping/activities":{"get":{"tags":["Cari Hesap"],"summary":"Cari hesap kaydının aktivitelerini getir","operationId":"listBookkeepingActivities","parameters":[{"name":"entry","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Cari hesap kaydı ID'si"}],"responses":{"200":{"description":"Aktivite listesi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookkeepingActivityList"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"}},"description":"Belirtilen cari hesap kaydının aktivitelerini getirir."}}}}
```

## Cari hesap kaydı ekle

> Bir müşteriyle ilgili alacak veya borç kaydı ekler.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"CreateBookkeepingEntryRequest":{"type":"object","required":["customer","name","currency","amount","type"],"properties":{"customer":{"type":"string","description":"Müşteri ID'si"},"name":{"type":"string","description":"Alacak veya borç kaydı adı"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Para birimi kodu"},"amount":{"type":"number","minimum":0,"description":"Cari hesap bakiyesi. 0'dan büyük olmalıdır."},"type":{"type":"string","enum":["receivable","payable"],"description":"Kayıt türü."},"dueAt":{"type":"number","description":"Son ödeme tarihi (Unix saniye). Bu tarihten önce ödeme beklenir."},"paidAmount":{"type":"number","description":"Ödenen tutar. 0'dan büyük ve toplamdan küçük olmalı."},"desc":{"type":"string","description":"Alacak veya borç açıklaması"}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"CreateBookkeepingEntryResponse":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/BookkeepingEntry"},"entryActivity":{"$ref":"#/components/schemas/BookkeepingActivity"},"payment":{"$ref":"#/components/schemas/BookkeepingPayment"},"paymentActivity":{"$ref":"#/components/schemas/BookkeepingActivity"}}},"BookkeepingEntry":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}}},"type":{"type":"string","enum":["receivable","payable"]},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"name":{"type":"string"},"desc":{"type":"string","nullable":true},"paidAmount":{"type":"number"},"isPaid":{"type":"boolean"},"dueAt":{"type":"number","nullable":true},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"BookkeepingActivity":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"entry":{"type":"string"},"payment":{"type":"string"},"type":{"type":"string","enum":["receivable-created","payable-created","payment-received","payment-sent","payment-deleted"]},"data":{"type":"object","properties":{"entryName":{"type":"string"},"entryDueAt":{"type":"number"},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number"}}},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"BookkeepingPayment":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"amount":{"type":"number"},"entry":{"type":"string"},"note":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ErrorCode":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}}}},"paths":{"/bookkeeping/entries":{"post":{"tags":["Cari Hesap"],"summary":"Cari hesap kaydı ekle","operationId":"createBookkeepingEntry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookkeepingEntryRequest"}}}},"responses":{"200":{"description":"Yeni kayıt ve aktiviteler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookkeepingEntryResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"description":"Geçersiz işlem","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorCode"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"description":"Bir müşteriyle ilgili alacak veya borç kaydı ekler."}}}}
```

## Cari hesap kaydını güncelle

> Cari hesap kaydını günceller. Her istekte \`type\`, \`name\` ve \`currency\` zorunludur (değişmeseler bile). \`desc\` ve \`dueAt\` gönderilmezse önceki değer korunur; \`null\` veya boş değer gönderilirse silinir. Tutar bu uçtan değiştirilmez.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"UpdateBookkeepingEntryRequest":{"type":"object","required":["type","name","currency"],"properties":{"type":{"type":"string","enum":["receivable","payable"],"description":"Kayıt türü."},"name":{"type":"string","description":"Alacak veya borç kaydı adı"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Para birimi kodu"},"dueAt":{"type":"number","description":"Son ödeme tarihi (Unix saniye). Gönderilmezse önceki değer korunur; `null` gönderilirse silinir."},"desc":{"type":"string","description":"Alacak veya borç açıklaması. Gönderilmezse önceki değer korunur; `null` veya boş değer gönderilirse silinir."}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"BookkeepingEntry":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}}},"type":{"type":"string","enum":["receivable","payable"]},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"name":{"type":"string"},"desc":{"type":"string","nullable":true},"paidAmount":{"type":"number"},"isPaid":{"type":"boolean"},"dueAt":{"type":"number","nullable":true},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ErrorCode":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}}}},"paths":{"/bookkeeping/entries/{entry}":{"put":{"tags":["Cari Hesap"],"summary":"Cari hesap kaydını güncelle","operationId":"updateBookkeepingEntry","parameters":[{"name":"entry","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Cari hesap kaydı ID'si"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBookkeepingEntryRequest"}}}},"responses":{"200":{"description":"Güncellenmiş kayıt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookkeepingEntry"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"description":"Geçersiz işlem","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorCode"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"description":"Cari hesap kaydını günceller. Her istekte `type`, `name` ve `currency` zorunludur (değişmeseler bile). `desc` ve `dueAt` gönderilmezse önceki değer korunur; `null` veya boş değer gönderilirse silinir. Tutar bu uçtan değiştirilmez."}}}}
```

## Cari hesap kaydını sil

> Cari hesap kaydını siler. Bu kayda ilişkin tüm aktivite ve ödeme kayıtları silinir.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"ValidationFailed":{"description":"Doğrulama başarısız","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/bookkeeping/entries/{entry}":{"delete":{"tags":["Cari Hesap"],"summary":"Cari hesap kaydını sil","description":"Cari hesap kaydını siler. Bu kayda ilişkin tüm aktivite ve ödeme kayıtları silinir.","operationId":"deleteBookkeepingEntry","parameters":[{"name":"entry","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Cari hesap kaydı ID'si"}],"responses":{"200":{"description":"Boş yanıt"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"}}}}}}
```

## Ödeme ekle

> Cari hesap kaydına ödeme ekler.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"CreateBookkeepingPaymentRequest":{"type":"object","required":["paidAmount"],"properties":{"paidAmount":{"type":"number","minimum":0,"description":"Ödenen tutar. En az 0, en fazla kayıt tutarı."},"note":{"type":"string","description":"İsteğe bağlı not"}}},"CreateBookkeepingPaymentResponse":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/BookkeepingPayment"},"activity":{"$ref":"#/components/schemas/BookkeepingActivity"}}},"BookkeepingPayment":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"amount":{"type":"number"},"entry":{"type":"string"},"note":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"BookkeepingActivity":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"entry":{"type":"string"},"payment":{"type":"string"},"type":{"type":"string","enum":["receivable-created","payable-created","payment-received","payment-sent","payment-deleted"]},"data":{"type":"object","properties":{"entryName":{"type":"string"},"entryDueAt":{"type":"number"},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number"}}},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ErrorCode":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}}}},"paths":{"/bookkeeping/payment/{entry}":{"post":{"tags":["Cari Hesap"],"summary":"Ödeme ekle","operationId":"createBookkeepingPayment","parameters":[{"name":"entry","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Cari hesap kaydı ID'si"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookkeepingPaymentRequest"}}}},"responses":{"200":{"description":"Yeni ödeme ve aktivite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookkeepingPaymentResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"description":"Geçersiz işlem","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorCode"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"description":"Cari hesap kaydına ödeme ekler."}}}}
```

## Ödeme sil

> Ödeme kaydını siler.

```json
{"openapi":"3.0.3","info":{"title":"Cubicl API","version":"1.0.0"},"tags":[{"name":"Cari Hesap","description":"Müşterilerle ilgili alacak ve borç kayıtları, ödemeler ve aktiviteler."}],"servers":[{"url":"https://cubicl.io/api/v1","description":"Cubicl production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Entegrasyonlar sayfasından alınan erişim jetonu. Header: `Authorization: Bearer ERİŞİM_JETONUNUZ`."}},"schemas":{"ObjectId":{"type":"string","description":"MongoDB ObjectId"},"DeleteBookkeepingPaymentResponse":{"type":"object","properties":{"activity":{"$ref":"#/components/schemas/BookkeepingActivity"}}},"BookkeepingActivity":{"type":"object","properties":{"org":{"type":"string"},"customer":{"type":"string"},"entry":{"type":"string"},"payment":{"type":"string"},"type":{"type":"string","enum":["receivable-created","payable-created","payment-received","payment-sent","payment-deleted"]},"data":{"type":"object","properties":{"entryName":{"type":"string"},"entryDueAt":{"type":"number"},"amount":{"type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"paidAmount":{"type":"number"}}},"createdBy":{"$ref":"#/components/schemas/BookkeepingUser"},"createdAt":{"$ref":"#/components/schemas/UnixTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UnixTimestamp"}}},"CurrencyCode":{"type":"string","enum":["TRY","USD","EUR","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","ZAR","RUB","BRL","JPY","TWD","DKK","PLN","THB","IDR","HUF","CZK","ILS","PHP","AED","COP","SAR","MYR","RON"]},"BookkeepingUser":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"language":{"type":"string"},"org":{"type":"string","nullable":true},"profile":{"type":"string"}}},"UnixTimestamp":{"type":"number","description":"Unix zaman damgası (saniye)"},"ErrorCodeMessage":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."},"message":{"type":"string"}}},"ErrorCode":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","description":"Uygulama hata kodu. HTTP durum kodu değildir."}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"Forbidden":{"description":"İzin yok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}}}},"paths":{"/bookkeeping/payments/{payment}":{"delete":{"tags":["Cari Hesap"],"summary":"Ödeme sil","operationId":"deleteBookkeepingPayment","parameters":[{"name":"payment","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ObjectId"},"description":"Ödeme ID'si"}],"responses":{"200":{"description":"Cari hesap aktivitesi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteBookkeepingPaymentResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Kaynak bulunamadı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCodeMessage"}}}},"422":{"description":"Geçersiz işlem","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorCode"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"description":"Ödeme kaydını siler."}}}}
```
