# Siparişi faturaya dönüştürür.

## POST /Invoices

> Siparişi faturaya dönüştürür.

```json
{"openapi":"3.0.1","info":{"title":"Market Place API","version":"v1"},"servers":[{"url":"/marketplace"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"InvoiceSendModelCommand":{"type":"object","properties":{"InvoiceSend":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSend"},"nullable":true},"StoreUUID":{"type":"string","format":"uuid"}},"additionalProperties":false},"InvoiceSend":{"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"Serie":{"type":"string","nullable":true},"TemplateUUID":{"type":"string","format":"uuid"},"Aliases":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"},"ExchangeRate":{"type":"number","format":"double","nullable":true},"KDVExemptionReasonCode":{"type":"string","nullable":true}},"additionalProperties":false},"SendModelResponse":{"type":"object","properties":{"IsSuccess":{"type":"boolean"},"OrderNumber":{"type":"string","nullable":true},"InvoiceDetail":{"$ref":"#/components/schemas/InvoiceDetail"},"ErrorDetail":{"type":"array","items":{"$ref":"#/components/schemas/ErrorNilvera"},"nullable":true}},"additionalProperties":false},"InvoiceDetail":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"UUID":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorNilvera":{"type":"object","properties":{"Code":{"$ref":"#/components/schemas/ErrorCodes"},"Description":{"type":"string","nullable":true},"Detail":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorCodes":{"enum":["TaxNumberNotRecordedForCompany","UUIDAlreadySaved","IncompatibleOperationType","InvoiceAutomaticallyAccepted","InvoiceAlreadySaved","InvoiceSerieAlreadyUsed","BasicInvoiceDoesNotAcceptAnswer","InvoiceAlreadyAnswered","DespatchAutomaticallyAccepted","DespatchAlreadySaved","DespatchSerieAlreadyUsed","DespatchAlreadyAnswered","EArchiveInvoiceAlreadySaved","VoucherAlreadySaved","ProducerAlreadySaved","RecordAlreadyExists","CompanyStoragePackageAlreadyExists","VoucherSerieAlreadyUsed","ProducerSerieAlreadyUsed","BillSerieAlreadyUsed","BillAlreadySaved","InsuranceSerieAlreadyUsed","EArchiveInvoiceSerieAlreadyUsed","NotEnoughCredit","CompanyInformationAddError","StorageSpaceNotEnough","BringBranchesError","RecordFailure","FileUploadError","TemplateUpdateError","DocumentOpenZipError","DocumentSerializeError","DocumentProcessError","BringDocumentAttachmentError","CreateEnvelopeError","DocumentReadError","RecordDeleteError","PdfCreateError","SchemaSchematronError","BringStatisticsError","FileTypeInCorrect","InvalidValueForSendType","ProcessCountCanNotBeOver100","IncompatibleFileContent","BringExchangeRatesError","UpdateError","PreviewCreateError","FileScenarioMustBeEArchiveDocument","ReceiverEInvoicePersonCanNotSendEArchive","InvoiceAlreadyCanceled","InvoiceCanNotCanceledWhenReportInCorrect","DocumentCanNotCanceledWhenInQueueOrStatusNotFound","CancelRecordCreateError","InvoiceRecordRevertCancelAlreadyReported","CancelRecordRevertError","SerieNotActive","SerieAliasCanNotBeEmpty","VoucherAlreadyCanceled","VoucherCanNotCanceledWhenReportInCorrect","VoucherDocumentCanNotCanceledWhenInQueueOrStatusNotFound","VoucherCancelRecordCreateError","VoucherRecordRevertCancelAlreadyReported","VoucherCancelRecordRevertError","VoucherSerieNotActive","VoucherSerieAliasCanNotBeEmpty","ProducerAlreadyCanceled","ProducerDocumentCanNotCanceledWhenInQueueOrStatusNotFound","ProducerCancelRecordCreateError","ProducerRecordRevertCancelAlreadyReported","ProducerCancelRecordRevertError","ProducerSerieNotActive","ProducerSerieAliasCanNotBeEmpty","ReportCanNotBeQueried","ReportCreationError","SenderNotEInvoicePerson","ReceiverAliasNotInUse","ReceiverBecameEInvoiceInDate","ReceiverNotEInvoicePerson","ReceiverAliasCanNotBeEmpty","ReceiverAliasInUse","BringAliasError","InvoiceMustBePaperOrEArchive","InvoiceScenarioMustBePublic","InvoiceScenarioMustBeEArchive","InvoiceScenarioCanNotBePublic","InvoiceAnswerUpdateError","InvoiceScenarioEArchiveMustBeEInvoice","InvoiceSerieNotActive","InvoiceSerieAliasCanNotBeEmpty","SenderNotEDespatchPerson","ReceiverBecameEDespatchInDate","DespatchDocumentCanNotSendToVirtualReceiver","DespatchDocumentMustSentToVirtualReceiver","DespatchBringAliasError","DespatchNotWaitForAnswer","DespatchScenarioMustBe","DespatchSerieNotActive","DespatchSerieAliasCanNotBeEmpty","CreditPackageDateExpired","StoragePackageDateExpired","StoragePackageNotEnough","CreditPackageNotEnough","ProducerCanNotCanceledWhenReportInCorrect","BillAlreadyCanceled","BillDocumentCanNotCanceledWhenInQueueOrStatusNotFound","BillCancelRecordCreateError","BillRecordRevertCancelAlreadyReported","BillCancelRecordRevertError","BillSerieNotActive","BillSerieAliasCanNotBeEmpty","PdfReadError","LedgerCreatedBefore","LedgerCreateError","LedgerStructureError","LedgerCreationIsInProgress","CertificatesDoNotMatch","SignError","AmountValueMustBeaNumber","EnteredDateFieldIncorrectFormat","LedgerSendingProcessContinues","AccountingPeriodMust12Months","NormalAccountingPeriodFailure","UpdatingLedgerStatusFailure","SerieAndDocumentYearMismatch","BillCanNotCanceledWhenReportInCorrect","ConvertUblError","ValidateUblError","UblCompanyInfoError","InvoiceTransferErpError","IncorrectStockMatchingQueryFormat","InvoiceLineItemError","SendTypeError","FileSizeCannotBeZero","InsuranceAleadyCanceled","InsuranceCanNotCanceledWhenReportInCorrect","InsuranceDocumentCanNotCanceledWhenInQueueOrStatusNotFound","InsuranceCancelRecordCreateError","InsuranceRecordRevertCancelAlreadyReported","IncorrectLegalAmountTotal","PaymentAmountDoesntMatch","ReceiverAliasNotFound","SenderAliasNotFound","AliasNotRegistered","DocumentNotFound","RecordNotFound","DocumentContentEmpty","ReportNotFound","ToBeReportedInvoiceNotFound","ToBeReportedVoucherNotFound","SerieNotBelongToCompany","TemplateNotFound","TemplateNotActivate","CompanyTemplateNotFound","EmailModuleNotActive","WhatsappModuleNotActive","SmsModuleNotActive","CompanyNotBelongToDealer","PackageCodeNotFound","SubDealerCodeNotFound","ToBeReportedBillNotFound","StorageModuleNotFound","EledgerPropartiesNotFound","AccountantNotFound","CertificatesNotFound","CompanyErpSettingNotFound","LedgerQueryNotFound","NotBeQuestioned","SignatureValueNotFound","LedgerReportNotFound","DesignModuleNotActive","APINotFound","ConnectorPropertiesNotFound","CompanyErpNotFound","QueryNotFound","DataNotFound","CompanyErpUserNotFound","CompanyStockNotFound","CompanySerieNotFound","StoreTypeNotFound"],"type":"string"}}},"paths":{"/Invoices":{"post":{"tags":["Invoices"],"summary":"Siparişi faturaya dönüştürür.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/InvoiceSendModelCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendModelCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendModelCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/InvoiceSendModelCommand"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendModelResponse"}}}}}}}}}}
```

## The InvoiceSend object

```json
{"openapi":"3.0.1","info":{"title":"Market Place API","version":"v1"},"components":{"schemas":{"InvoiceSend":{"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"Serie":{"type":"string","nullable":true},"TemplateUUID":{"type":"string","format":"uuid"},"Aliases":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"},"ExchangeRate":{"type":"number","format":"double","nullable":true},"KDVExemptionReasonCode":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

## The InvoiceDetail object

```json
{"openapi":"3.0.1","info":{"title":"Market Place API","version":"v1"},"components":{"schemas":{"InvoiceDetail":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"UUID":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```
