# Proof payment document settings

Using this endpoint, you can unlink an invoice from a proof of payment.
After successfully unlinking the invoice, the price of the linked

invoice will be recalculated and increased by the price of the proof of
payment.

Linking of the invoice to the proof of payment is not possible at this
endpoint.


You can also close a proof of payment with this endpoint. You can open a
proof of payment if it is not linked to any invoice.

Otherwise, a response code 409 is returned and the document cannot be
closed.


Important note: If the document is closed, the invoice or proof of
payment may have already been sent to the customer!

Endpoint: POST /api/proof-payments/{code}/document-settings
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Path parameters:

  - `code` (string, required)
    Example: "P--2015000170-1"

## Header parameters:

  - `Content-Type` (string, required)

## Request fields (application/json):

  - `data` (object, required)

  - `data.unlink` (boolean)
    true if you want to unlink the proof of payment from the invoice

  - `data.closed` (boolean)
    true if you want to close the proof of payment, false if you want to open the proof of payment

## Response 201 fields (application/json):

  - `data` (object, required)

  - `data.proofPayments` (object, required)

  - `data.proofPayments.code` (string, required)
    proof payments identifier. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

  - `data.proofPayments.orderCode` (string,null, required)
    order code (can be null)

  - `data.proofPayments.proformaInvoiceCode` (string,null, required)
    proforma invoice code (can be null)

  - `data.proofPayments.createdAt` (string,null, required)
    date of create, in ISO 8601 format

  - `data.proofPayments.updatedAt` (string,null, required)
    date of update, in ISO 8601 format

  - `data.proofPayments.issueDate` (string,null, required)
    date on which was proof payment issued, in ISO 8601 format

  - `data.proofPayments.taxDate` (string,null, required)
    date of tax

  - `data.proofPayments.isValid` (boolean, required)
    is proof payment valid?

  - `data.proofPayments.currencyCode` (string, required)
    currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

  - `data.proofPayments.payment` (string,null, required)
    total price on the bill

  - `data.proofPayments.closed` (boolean, required)
    is proof payment closed?

  - `data.proofPayments.billFullName` (string,null, required)
    name on the bill (can be null)

  - `data.proofPayments.billCompany` (string,null, required)
    company name on the bill (can be null)

  - `data.proofPayments.billStreet` (string,null, required)
    street on the bill (can be null)

  - `data.proofPayments.billHouseNumber` (string,null, required)
    house number on the bill (can be null)

  - `data.proofPayments.billCity` (string,null, required)
    city on the bill (can be null)

  - `data.proofPayments.billDistrict` (string,null, required)
    county on the bill (can be null)

  - `data.proofPayments.billAdditional` (string,null, required)
    additional info for address on the bill (can be null)

  - `data.proofPayments.billZip` (string,null, required)
    ZIP or postal code on the bill (can be null)

  - `data.proofPayments.billCountryCode` (string,null, required)
    two-character country code on the bil (can be null)

  - `data.proofPayments.billRegionName` (string,null, required)
    region name on the bil (can be null)

  - `data.proofPayments.billRegionShortcut` (string,null, required)
    region abbreviation on the bil (can be null)

  - `data.proofPayments.vatId` (string,null, required)
    VAT identification number. (can be null)

  - `data.proofPayments.taxId` (string,null, required)
    TAX identification number. For Czech address, taxId is same as vatId. (can be null)

  - `data.proofPayments.companyId` (string,null, required)
    Company registration number. (can be null)

  - `data.proofPayments.language` (string)
    Language code. Available only if module foreignLanguages is active and initialized.

  - `data.proofPayments.email` (string,null, required)

  - `data.proofPayments.phone` (string,null, required)
    Phone number

  - `data.proofPayments.source` (object, required)
    proof payments source

  - `data.proofPayments.source.id` (integer, required)
    source identifier

  - `data.proofPayments.source.name` (string, required)
    source description

  - `data.proofPayments.cashdeskId` (integer,null, required)
    cashdesk identifier

  - `data.proofPayments.customerGuid` (any, required)
    global unique permanent customer identifier (can be null)

  - `data.proofPayments.customerProfileId` (integer,null, required)
    customer profile identifier (can be null)

  - `data.proofPayments.remark` (string,null, required)
    remark (not visible for customer) (can be null)

  - `data.proofPayments.varSymbol` (number, required)
    variable symbol

  - `data.proofPayments.constSymbol` (string,null, required)
    constant symbol (can be null)

  - `data.proofPayments.specSymbol` (number,null, required)
    specific symbol (can be null)

  - `data.proofPayments.billingMethod` (any, required)
    information about the method of payment

  - `data.proofPayments.billBankAccount` (string,null, required)
    bank account on the bill (can be null)

  - `data.proofPayments.billIban` (string,null, required)
    e-shop IBAN on the bill (can be null)

  - `data.proofPayments.billBic` (string,null, required)
    bank code - SWIFT on the bill (can be null)

  - `data.proofPayments.bankAccount` (string,null, required)
    bank account (can be null)

  - `data.proofPayments.iban` (string,null, required)
    e-shop IBAN (can be null)

  - `data.proofPayments.bic` (string,null, required)
    bank code - SWIFT (can be null)

  - `data.proofPayments.documentRemark` (string,null, required)
    remark in the document (visible for customer) (can be null)

  - `data.proofPayments.invoiceCode` (string,null, required)
    Linked to invoice code (can be null)

  - `data.proofPayments.vatBreakdown` (object,null, required)

  - `data.proofPayments.vatBreakdown.items` (array, required)
    breakdown of VAT items

  - `data.proofPayments.vatBreakdown.items.vatRate` (string, required)
    VAT rate

  - `data.proofPayments.vatBreakdown.items.priceWithVat` (string,null, required)
    price with VAT

  - `data.proofPayments.vatBreakdown.items.priceWithoutVat` (string,null, required)
    price without VAT

  - `data.proofPayments.vatBreakdown.items.vat` (string,null, required)
    VAT value

  - `data.proofPayments.vatBreakdown.summary` (object, required)
    summary of VAT breakdown

  - `data.proofPayments.vatBreakdown.summary.withVat` (string,null, required)
    Total price with VAT

  - `data.proofPayments.vatBreakdown.summary.withoutVat` (string,null, required)
    Total price without VAT

  - `data.proofPayments.vatBreakdown.summary.vat` (string,null, required)
    Total VAT value

  - `data.proofPayments.vatMode` (string,null)
    VAT mode, can be null, for possible values see [VAT modes](#section/code-lists/vat-modes) code list

  - `data.proofPayments.invoicingExchangeRate` (string, required)
    currency rate of the receipt for the default currency of the shop. This value is saved together with the price and reflects the historical value valid in the instant of the order creation. If the shop changes the default currency, the value still refers to the original currency!

  - `data.proofPayments.identificationNumber` (string,null, required)
    Identification number (can be null)

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.

## Response 404 fields (application/json):

  - `data` (object,null)

  - `errors` (array,null)

  - `metadata` (object)

## Response 409 fields (application/json):

  - `data` (object,null)

  - `errors` (array,null)

  - `metadata` (object)


