Taslaktaki Faturayı Güncelleme
RahatSistem Demo
https://apidemo.rahatsistem.com.tr
RahatSistem Demo
https://apidemo.rahatsistem.com.tr
POST
/v2/documents/invoice.update
FaturaTaslak FaturaProforma Fatura
Önemli Bilgi#
body.document.External.ID
ve body.document.External.Type
bilgisi üzerinden güncelleme sağlayabilirsiniz. Request body bilgisi fatura oluşturma ucu ile aynıdır. Dolayısıyla body.document.External.ID
ve body.document.External.Type
taslaklardaki bir belge ile eşleşmesi durumunda fatura güncellemesi yapılır.DANGER
TIP
DANGER
document.External.ID
ve document.External.Type
gönderim durumuna istenmeyen faturalar taslaklara kaydedilebilir. Hatta draft
parametresinin false
gönderilme durumunda ise istenilmeyen faturalar doğrudan gönderilebilir. Bu duruma kesinlikle dikkat edilmelidir.Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json
draft
boolean
optional
Default:
true
document
object
required
External
object
required
Type
enum<string>
optional
Allowed values:
SATISIADETEVKIFATISTISNAIHRACKAYITLIOZELMATRAHSGK
Examples:
SATISIADE
Profile
enum<string>
optional
Allowed values:
TEMELFATURATICARIFATURAIHRACATKAMUEARSIVFATURA
NumberOrSerie
optional
UUID
string <uuid>
optional
IssueDateTime
string
required
Notes
array[string]
optional
CurrencyCode
string
optional
>= 3 characters<= 3 characters
Default:
TRY
Examples:
USDEURTRY
ExchangeRate
number
optional
TaxExemptions
object
optional
Order
object
optional
Despatches
array [object {2}]
optional
Customer
object
required
BuyerCustomer
object
optional
PaymentMeans
object
optional
SGK
object
optional
Lines
array [object {9}]
required
>= 1 items
Example
{
"draft": true,
"document": {
"External": {
"ID": "string",
"RefNo": "MEA11152",
"Type": "Müthiş Entegre App"
},
"Type": "SATIS",
"Profile": "TEMELFATURA",
"NumberOrSerie": "RS",
"UUID": "f50af7e0-0dd5-4361-ab96-2e04f7bc7e30",
"IssueDateTime": "string",
"Notes": [
"string"
],
"CurrencyCode": "TRY",
"ExchangeRate": 0,
"TaxExemptions": {
"KDV": 322
},
"Order": {
"Date": "2023-10-19",
"Value": "SIP0001"
},
"Despatches": [
{
"Date": "2023-10-19",
"Value": "IRS0001"
}
],
"Customer": {
"TaxNumber": "string",
"TaxOffice": "string",
"Name": "string",
"Alias": "string",
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "strin",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"Website": "string"
},
"BuyerCustomer": {
"TaxNumber": "string",
"TaxOffice": "string",
"Name": "string",
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "strin",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"Website": "string"
},
"PaymentMeans": {
"DueDate": "string",
"ChannelCode": "string",
"AccountNumber": "string",
"PaymentNote": "string",
"MeansCode": "string"
},
"SGK": {
"Type": "string",
"CompCode": "string",
"CompName": "string",
"DocNo": "string",
"StartDate": "string",
"EndDate": "string"
},
"Lines": [
{
"Name": "Örnek mal hizmet adı",
"Quantity": 19.1,
"UnitCode": "ADET",
"Price": 19.05,
"KDV": {
"Percent": 0,
"Amount": 0
},
"Allowance": {
"Percent": 20,
"Price": 0
},
"WithholdingTax": {
"Code": 621
},
"AdditionalNames": {
"Description": "string",
"Brand": "string",
"Model": "string",
"BuyerCode": "string",
"SellerCode": "string",
"ManufacturerCode": "string",
"Origin": "string",
"Note": "string"
},
"Taxes": [
{
"Percent": 20,
"Code": "0053"
}
]
}
]
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://apidemo.rahatsistem.com.tr/v2/documents/invoice.update' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"draft": true,
"document": {
"External": {
"ID": "string",
"RefNo": "MEA11152",
"Type": "Müthiş Entegre App"
},
"Type": "SATIS",
"Profile": "TEMELFATURA",
"NumberOrSerie": "RS",
"UUID": "f50af7e0-0dd5-4361-ab96-2e04f7bc7e30",
"IssueDateTime": "string",
"Notes": [
"string"
],
"CurrencyCode": "TRY",
"ExchangeRate": 0,
"TaxExemptions": {
"KDV": 322
},
"Order": {
"Date": "2023-10-19",
"Value": "SIP0001"
},
"Despatches": [
{
"Date": "2023-10-19",
"Value": "IRS0001"
}
],
"Customer": {
"TaxNumber": "string",
"TaxOffice": "string",
"Name": "string",
"Alias": "string",
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "strin",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"Website": "string"
},
"BuyerCustomer": {
"TaxNumber": "string",
"TaxOffice": "string",
"Name": "string",
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "strin",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"Website": "string"
},
"PaymentMeans": {
"DueDate": "string",
"ChannelCode": "string",
"AccountNumber": "string",
"PaymentNote": "string",
"MeansCode": "string"
},
"SGK": {
"Type": "string",
"CompCode": "string",
"CompName": "string",
"DocNo": "string",
"StartDate": "string",
"EndDate": "string"
},
"Lines": [
{
"Name": "Örnek mal hizmet adı",
"Quantity": 19.1,
"UnitCode": "ADET",
"Price": 19.05,
"KDV": {
"Percent": 0,
"Amount": 0
},
"Allowance": {
"Percent": 20,
"Price": 0
},
"WithholdingTax": {
"Code": 621
},
"AdditionalNames": {
"Description": "string",
"Brand": "string",
"Model": "string",
"BuyerCode": "string",
"SellerCode": "string",
"ManufacturerCode": "string",
"Origin": "string",
"Note": "string"
},
"Taxes": [
{
"Percent": 20,
"Code": "0053"
}
]
}
]
}
}'
Responses
🟢200OK
application/json
Body
data
object
required
uuid
string <uuid>
required
warns
array[string]
required
Example
{
"data": {
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"warns": [
"Fatura tipi SATIS olarak belirlendi!"
]
}
}
🟠400Bad Request