Faturaya Yanıt Verir

Faturaya yanıt verir.

POST/einvoice/Purchase/SendAnswer
Body
UUIDstring (uuid)
AnswerCodeAnswerCode (enum)
unknownwaitingForApprovalapprovedrejecteddocumentAnsweredAutomatically
RejectNotenullable string
Response

Faturaya yanıt verir.

Body
string
Request
const response = await fetch('/einvoice/Purchase/SendAnswer', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
text

AnswerCode

Enum veri tipinde bir nesnedir. Aşağıdaki bulunan değerleri alabilir. Cevap tipine göre seçim yapılmalıdır.

public enum AnswerCode
    {
        unknown = 0,
        waitingForApproval = 1,
        approved = 2,
        rejected = 3,
        documentAnsweredAutomatically = 4
    }

Faturaya cevap vermek için aşağıdaki enum veri tipleri kullanılmalıdır.

public enum AnswerCode
    {
        approved = 2,
        rejected = 3
    }
var client = new RestClient("https://apitest.nilvera.com/einvoice/Purchase/SendAnswer");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AnswerCode": "rejected",
"RejectNote": "RED"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);