e-Adisyon

Örnekler

Request Örnekleri

Gerçek ve tüzel taraf, çok kalemli ve iptal senaryolarına yönelik JSON örnekleri.

Senaryo Kapsamı

#Senaryo
1Tüzel Kişi Alıcı — TRY, tek kalem
2Gerçek Kişi Alıcı — TRY
3Çok Kalemli Adisyon
4Güncelleme
5İptal
6Liste Sorgusu ve PDF Alma

Örnek 1: Tüzel Kişi Alıcı — TRY, Tek Kalem

JSON örneğini görüntüle
{
  "DocumentExternalId": "ERP-2026-ADS-0001",
  "ProfileId": "EARSIVBELGE",
  "BillTypeCode": "ADISYON",
  "DocumentCurrencyCode": "TRY",
  "IssueDate": "2026-07-29T19:30:00+03:00",
  "AccountingCustomerParty": {
    "Party": {
      "PartyIdentifications": [
        {
          "SchemeId": "VKN",
          "Value": "1234567890"
        }
      ],
      "PartyName": "Örnek Restoran Ltd. Şti.",
      "PostalAddress": {
        "CityName": "İstanbul",
        "Country": {
          "Name": "Türkiye"
        }
      }
    }
  },
  "LegalMonetaryTotal": {
    "LineExtensionAmount": 500,
    "TaxExclusiveAmount": 500,
    "TaxInclusiveAmount": 600,
    "PayableAmount": 600
  },
  "TaxTotal": [
    {
      "TaxAmount": 100,
      "TaxSubtotal": [
        {
          "TaxableAmount": 500,
          "TaxAmount": 100,
          "Percent": 20,
          "TaxCategory": {
            "TaxScheme": {
              "TaxTypeCode": "0015"
            }
          }
        }
      ]
    }
  ],
  "BillLine": [
    {
      "Id": "1",
      "CreditedQuantity": {
        "UnitCode": "C62",
        "Value": 1
      },
      "LineExtensionAmount": 500,
      "Item": {
        "Name": "Akşam yemeği menüsü"
      },
      "Price": 500,
      "TaxTotal": {
        "TaxSubtotal": [
          {
            "TaxableAmount": 500,
            "TaxAmount": 100,
            "Percent": 20,
            "TaxCategory": {
              "TaxScheme": {
                "TaxTypeCode": "0015"
              }
            }
          }
        ],
        "TaxAmount": 100
      }
    }
  ]
}

Örnek 2: Gerçek Kişi Alıcı — TRY

JSON örneğini görüntüle
{
  "DocumentExternalId": "ERP-2026-ADS-0002",
  "ProfileId": "EARSIVBELGE",
  "BillTypeCode": "ADISYON",
  "DocumentCurrencyCode": "TRY",
  "IssueDate": "2026-07-29T20:10:00+03:00",
  "AccountingCustomerParty": {
    "Party": {
      "PartyIdentifications": [
        {
          "SchemeId": "TCKN",
          "Value": "12345678901"
        }
      ],
      "PartyName": "Ahmet Yılmaz",
      "PostalAddress": {
        "CityName": "Ankara",
        "Country": {
          "Name": "Türkiye"
        }
      }
    }
  },
  "LegalMonetaryTotal": {
    "LineExtensionAmount": 250,
    "TaxExclusiveAmount": 250,
    "TaxInclusiveAmount": 300,
    "PayableAmount": 300
  },
  "TaxTotal": [
    {
      "TaxAmount": 50,
      "TaxSubtotal": [
        {
          "TaxableAmount": 250,
          "TaxAmount": 50,
          "Percent": 20,
          "TaxCategory": {
            "TaxScheme": {
              "TaxTypeCode": "0015"
            }
          }
        }
      ]
    }
  ],
  "BillLine": [
    {
      "Id": "1",
      "CreditedQuantity": {
        "UnitCode": "C62",
        "Value": 1
      },
      "LineExtensionAmount": 250,
      "Item": {
        "Name": "Kahvaltı menüsü"
      },
      "Price": 250,
      "TaxTotal": {
        "TaxSubtotal": [
          {
            "TaxableAmount": 250,
            "TaxAmount": 50,
            "Percent": 20,
            "TaxCategory": {
              "TaxScheme": {
                "TaxTypeCode": "0015"
              }
            }
          }
        ],
        "TaxAmount": 50
      }
    }
  ]
}

Örnek 3: Çok Kalemli Adisyon

JSON örneğini görüntüle
{
  "DocumentExternalId": "ERP-2026-ADS-0003",
  "ProfileId": "EARSIVBELGE",
  "BillTypeCode": "ADISYON",
  "DocumentCurrencyCode": "TRY",
  "IssueDate": "2026-07-29T21:00:00+03:00",
  "AccountingCustomerParty": {
    "Party": {
      "PartyIdentifications": [
        {
          "SchemeId": "TCKN",
          "Value": "98765432109"
        }
      ],
      "PartyName": "Zeynep Kaya",
      "PostalAddress": {
        "CityName": "İzmir",
        "Country": {
          "Name": "Türkiye"
        }
      }
    }
  },
  "LegalMonetaryTotal": {
    "LineExtensionAmount": 700,
    "TaxExclusiveAmount": 700,
    "TaxInclusiveAmount": 840,
    "PayableAmount": 840
  },
  "TaxTotal": [
    {
      "TaxAmount": 140,
      "TaxSubtotal": [
        {
          "TaxableAmount": 700,
          "TaxAmount": 140,
          "Percent": 20,
          "TaxCategory": {
            "TaxScheme": {
              "TaxTypeCode": "0015"
            }
          }
        }
      ]
    }
  ],
  "BillLine": [
    {
      "Id": "1",
      "CreditedQuantity": {
        "UnitCode": "C62",
        "Value": 2
      },
      "LineExtensionAmount": 400,
      "Item": {
        "Name": "Ana yemek"
      },
      "Price": 200,
      "TaxTotal": {
        "TaxSubtotal": [
          {
            "TaxableAmount": 400,
            "TaxAmount": 80,
            "Percent": 20,
            "TaxCategory": {
              "TaxScheme": {
                "TaxTypeCode": "0015"
              }
            }
          }
        ],
        "TaxAmount": 80
      }
    },
    {
      "Id": "2",
      "CreditedQuantity": {
        "UnitCode": "C62",
        "Value": 1
      },
      "LineExtensionAmount": 300,
      "Item": {
        "Name": "Tatlı ve içecek"
      },
      "Price": 300,
      "TaxTotal": {
        "TaxSubtotal": [
          {
            "TaxableAmount": 300,
            "TaxAmount": 60,
            "Percent": 20,
            "TaxCategory": {
              "TaxScheme": {
                "TaxTypeCode": "0015"
              }
            }
          }
        ],
        "TaxAmount": 60
      }
    }
  ]
}

Örnek 4: Güncelleme

JSON örneğini görüntüle

Güncelleme öncesi belge GetOutgoingBill ile okunur; dönen model üzerinde yalnızca değişen alanlar düzenlenip Id ve UUId ile birlikte tam olarak gönderilir.

{
  "DocumentExternalId": "ERP-2026-ADS-0001",
  "ProfileId": "EARSIVBELGE",
  "BillTypeCode": "ADISYON",
  "DocumentCurrencyCode": "TRY",
  "IssueDate": "2026-07-29T19:30:00+03:00",
  "AccountingCustomerParty": {
    "Party": {
      "PartyIdentifications": [
        {
          "SchemeId": "VKN",
          "Value": "1234567890"
        }
      ],
      "PartyName": "Örnek Restoran Ltd. Şti.",
      "PostalAddress": {
        "CityName": "İstanbul",
        "Country": {
          "Name": "Türkiye"
        }
      }
    }
  },
  "LegalMonetaryTotal": {
    "LineExtensionAmount": 500,
    "TaxExclusiveAmount": 500,
    "TaxInclusiveAmount": 600,
    "PayableAmount": 600
  },
  "TaxTotal": [
    {
      "TaxAmount": 100,
      "TaxSubtotal": [
        {
          "TaxableAmount": 500,
          "TaxAmount": 100,
          "Percent": 20,
          "TaxCategory": {
            "TaxScheme": {
              "TaxTypeCode": "0015"
            }
          }
        }
      ]
    }
  ],
  "BillLine": [
    {
      "Id": "1",
      "CreditedQuantity": {
        "UnitCode": "C62",
        "Value": 1
      },
      "LineExtensionAmount": 500,
      "Item": {
        "Name": "Akşam yemeği menüsü"
      },
      "Price": 500,
      "TaxTotal": {
        "TaxSubtotal": [
          {
            "TaxableAmount": 500,
            "TaxAmount": 100,
            "Percent": 20,
            "TaxCategory": {
              "TaxScheme": {
                "TaxTypeCode": "0015"
              }
            }
          }
        ],
        "TaxAmount": 100
      }
    }
  ],
  "Id": 1042,
  "UUId": "6b60c576-7ed9-4bf1-9f90-3c97747b7470"
}

Örnek 5: İptal

JSON örneğini görüntüle

Yalnızca Signed durumundaki belgeler iptal edilebilir.

{
  "Ettn": "6b60c576-7ed9-4bf1-9f90-3c97747b7470",
  "EArchiveStatus": 2,
  "EArchiveCancelDescription": "Müşteri talebiyle iptal edildi."
}
Yanıt: Belge zaten iptal edilmişse BLL0025, imzalanmamışsa BLL0024 hatası döner. İptal e-postası gönderilmez.

Örnek 6: Liste Sorgusu ve PDF Alma

JSON örneğini görüntüle
{
  "DocumentExternalId": "ERP-2026-ADS-0001"
}

Sorgu sonucunda dönen Ettn ile PDF talebi:

{
  "BillEttns": [
    "6b60c576-7ed9-4bf1-9f90-3c97747b7470"
  ]
}