POST api/VatDocuments

Request Information

URI Parameters

None.

Body Parameters

VatDocHeader
NameDescriptionTypeAdditional information
id

integer

None.

type

integer

Required

accountingId

string

String length: inclusive between 0 and 50

fullNumber

string

String length: inclusive between 0 and 256

registerName

string

String length: inclusive between 0 and 20

correctedDocumentNumber

string

String length: inclusive between 0 and 256

paymentMethod

string

Required

String length: inclusive between 0 and 20

currency

string

Required

String length: inclusive between 0 and 3

transferExponormFromCustomer

boolean

None.

contractor

Customer

None.

payer

Customer

None.

transactionType

integer

None.

elements

Collection of VatDocElement

Required

attributes

Collection of Attribute

None.

documentSaleDate

date

Required

documentIssueDate

date

Required

documentReceiptDate

date

None.

documentPaymentDueDate

date

None.

documentTaxObligationDate

date

None.

categoryCode

string

String length: inclusive between 0 and 20

categoryDescription

string

String length: inclusive between 0 and 50

disableCustomerDataUpdate

boolean

None.

splitPayment

boolean

None.

vatDeclarationMonth

integer

Range: inclusive between 0 and 12

vatDeclarationYear

integer

Range: inclusive between 0 and 3000

jpkV7Codes

Collection of string

None.

additionalAmounts

Collection of VatDocAdditionalAmount

None.

netValue

decimal number

None.

grossValueCurrency

decimal number

None.

customerType

integer

None.

currencyRateType

integer

None.

currencyRateDate

date

None.

currencyRate

decimal number

None.

invoicingPerson

string

String length: inclusive between 0 and 20

paymentMethodId

integer

None.

invoiceId

integer

None.

settleVat

integer

Range: inclusive between 0 and 1

created

date

None.

updated

date

None.

companyData

CompanyData

None.

bankAccountNumber

string

None.

paid

integer

None.

JPK_FA

integer

None.

CashMethod

integer

None.

internalVat

integer

None.

note

string

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "type": 2,
  "accountingId": "sample string 3",
  "fullNumber": "sample string 4",
  "registerName": "sample string 5",
  "correctedDocumentNumber": "sample string 6",
  "paymentMethod": "sample string 7",
  "currency": "sample string 8",
  "transferExponormFromCustomer": true,
  "contractor": {
    "id": 1,
    "code": "sample string 2",
    "name1": "sample string 3",
    "name2": "sample string 4",
    "name3": "sample string 5",
    "peselNumber": "sample string 6",
    "vatNumber": "sample string 7",
    "country": "sample string 8",
    "voivodeship": "sample string 9",
    "city": "sample string 10",
    "street": "sample string 11",
    "additionalAdress": "sample string 12",
    "postCode": "sample string 13",
    "post": "sample string 14",
    "houseNumber": "sample string 15",
    "flatNumber": "sample string 16",
    "phoneDocument": "sample string 17",
    "phone1": "sample string 18",
    "phone2": "sample string 19",
    "inactive": 20,
    "defaultPrice": 21,
    "final": 1,
    "bankAccountNumber": "sample string 22",
    "regon": "sample string 23",
    "email": "sample string 24",
    "paymentMethod": "sample string 25",
    "dateOfPayment": 26,
    "maxPaymentDelay": 27,
    "created": "2025-11-08T13:34:34.9796429+01:00",
    "updated": "2025-11-08T13:34:34.9796429+01:00",
    "description": "sample string 30",
    "countryCode": "sample string 31",
    "type": 1,
    "companyData": {
      "companyName": "sample string 1",
      "databaseName": "sample string 2"
    },
    "countryIso": "sample string 32",
    "group": "sample string 33",
    "type_supplier": 1,
    "type_receiver": 1,
    "type_competitor": 1,
    "type_partner": 1,
    "type_potential": 1,
    "split_payment": 1,
    "attributes": [
      {
        "id": 1,
        "attributeId": 2,
        "objectId": 3,
        "code": "sample string 4",
        "value": "sample string 5",
        "copyToTransaction": 6,
        "copyToDelivery": 7,
        "companyData": {
          "companyName": "sample string 1",
          "databaseName": "sample string 2"
        }
      },
      {
        "id": 1,
        "attributeId": 2,
        "objectId": 3,
        "code": "sample string 4",
        "value": "sample string 5",
        "copyToTransaction": 6,
        "copyToDelivery": 7,
        "companyData": {
          "companyName": "sample string 1",
          "databaseName": "sample string 2"
        }
      }
    ],
    "purchaseCategory": "sample string 34",
    "representativeId": 35,
    "representativeType": 36
  },
  "payer": {
    "id": 1,
    "code": "sample string 2",
    "name1": "sample string 3",
    "name2": "sample string 4",
    "name3": "sample string 5",
    "peselNumber": "sample string 6",
    "vatNumber": "sample string 7",
    "country": "sample string 8",
    "voivodeship": "sample string 9",
    "city": "sample string 10",
    "street": "sample string 11",
    "additionalAdress": "sample string 12",
    "postCode": "sample string 13",
    "post": "sample string 14",
    "houseNumber": "sample string 15",
    "flatNumber": "sample string 16",
    "phoneDocument": "sample string 17",
    "phone1": "sample string 18",
    "phone2": "sample string 19",
    "inactive": 20,
    "defaultPrice": 21,
    "final": 1,
    "bankAccountNumber": "sample string 22",
    "regon": "sample string 23",
    "email": "sample string 24",
    "paymentMethod": "sample string 25",
    "dateOfPayment": 26,
    "maxPaymentDelay": 27,
    "created": "2025-11-08T13:34:34.9796429+01:00",
    "updated": "2025-11-08T13:34:34.9796429+01:00",
    "description": "sample string 30",
    "countryCode": "sample string 31",
    "type": 1,
    "companyData": {
      "companyName": "sample string 1",
      "databaseName": "sample string 2"
    },
    "countryIso": "sample string 32",
    "group": "sample string 33",
    "type_supplier": 1,
    "type_receiver": 1,
    "type_competitor": 1,
    "type_partner": 1,
    "type_potential": 1,
    "split_payment": 1,
    "attributes": [
      {
        "id": 1,
        "attributeId": 2,
        "objectId": 3,
        "code": "sample string 4",
        "value": "sample string 5",
        "copyToTransaction": 6,
        "copyToDelivery": 7,
        "companyData": {
          "companyName": "sample string 1",
          "databaseName": "sample string 2"
        }
      },
      {
        "id": 1,
        "attributeId": 2,
        "objectId": 3,
        "code": "sample string 4",
        "value": "sample string 5",
        "copyToTransaction": 6,
        "copyToDelivery": 7,
        "companyData": {
          "companyName": "sample string 1",
          "databaseName": "sample string 2"
        }
      }
    ],
    "purchaseCategory": "sample string 34",
    "representativeId": 35,
    "representativeType": 36
  },
  "transactionType": 10,
  "elements": [
    {
      "id": 1,
      "category1Code": "sample string 2",
      "category1Description": "sample string 3",
      "category2Code": "sample string 4",
      "category2Description": "sample string 5",
      "grossValue": 6.0,
      "netValue": 1.0,
      "vatRate": 7.0,
      "vatFlag": 8,
      "vatValue": 1.0,
      "deductions": 9,
      "vatType": 10
    },
    {
      "id": 1,
      "category1Code": "sample string 2",
      "category1Description": "sample string 3",
      "category2Code": "sample string 4",
      "category2Description": "sample string 5",
      "grossValue": 6.0,
      "netValue": 1.0,
      "vatRate": 7.0,
      "vatFlag": 8,
      "vatValue": 1.0,
      "deductions": 9,
      "vatType": 10
    }
  ],
  "attributes": [
    {
      "id": 1,
      "attributeId": 2,
      "objectId": 3,
      "code": "sample string 4",
      "value": "sample string 5",
      "copyToTransaction": 6,
      "copyToDelivery": 7,
      "companyData": {
        "companyName": "sample string 1",
        "databaseName": "sample string 2"
      }
    },
    {
      "id": 1,
      "attributeId": 2,
      "objectId": 3,
      "code": "sample string 4",
      "value": "sample string 5",
      "copyToTransaction": 6,
      "copyToDelivery": 7,
      "companyData": {
        "companyName": "sample string 1",
        "databaseName": "sample string 2"
      }
    }
  ],
  "documentSaleDate": "2025-11-08T13:34:34.9796429+01:00",
  "documentIssueDate": "2025-11-08T13:34:34.9796429+01:00",
  "documentReceiptDate": "2025-11-08T13:34:34.9796429+01:00",
  "documentPaymentDueDate": "2025-11-08T13:34:34.9796429+01:00",
  "documentTaxObligationDate": "2025-11-08T13:34:34.9796429+01:00",
  "categoryCode": "sample string 16",
  "categoryDescription": "sample string 17",
  "disableCustomerDataUpdate": true,
  "splitPayment": true,
  "vatDeclarationMonth": 19,
  "vatDeclarationYear": 20,
  "jpkV7Codes": [
    "sample string 1",
    "sample string 2"
  ],
  "additionalAmounts": [
    {
      "id": 1,
      "category1Code": "sample string 2",
      "category1Description": "sample string 3",
      "category2Code": "sample string 4",
      "category2Description": "sample string 5",
      "accountWn": "sample string 6",
      "accountMa": "sample string 7",
      "amount": 8.0
    },
    {
      "id": 1,
      "category1Code": "sample string 2",
      "category1Description": "sample string 3",
      "category2Code": "sample string 4",
      "category2Description": "sample string 5",
      "accountWn": "sample string 6",
      "accountMa": "sample string 7",
      "amount": 8.0
    }
  ],
  "netValue": 21.0,
  "grossValueCurrency": 22.0,
  "customerType": 1,
  "currencyRateType": 1,
  "currencyRateDate": "2025-11-08T13:34:34.9796429+01:00",
  "currencyRate": 1.0,
  "invoicingPerson": "sample string 23",
  "paymentMethodId": 1,
  "invoiceId": 1,
  "settleVat": 1,
  "created": "2025-11-08T13:34:34.9796429+01:00",
  "updated": "2025-11-08T13:34:34.9796429+01:00",
  "companyData": {
    "companyName": "sample string 1",
    "databaseName": "sample string 2"
  },
  "bankAccountNumber": "sample string 26",
  "paid": 27,
  "JPK_FA": 1,
  "CashMethod": 1,
  "internalVat": 1,
  "note": "sample string 28"
}

application/xml, text/xml

Sample:
<VatDocHeader xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApiOptima_v._2._0.Models">
  <CashMethod>1</CashMethod>
  <JPK_FA>1</JPK_FA>
  <accountingId>sample string 3</accountingId>
  <additionalAmounts>
    <VatDocAdditionalAmount>
      <accountMa>sample string 7</accountMa>
      <accountWn>sample string 6</accountWn>
      <amount>8</amount>
      <category1Code>sample string 2</category1Code>
      <category1Description>sample string 3</category1Description>
      <category2Code>sample string 4</category2Code>
      <category2Description>sample string 5</category2Description>
      <id>1</id>
    </VatDocAdditionalAmount>
    <VatDocAdditionalAmount>
      <accountMa>sample string 7</accountMa>
      <accountWn>sample string 6</accountWn>
      <amount>8</amount>
      <category1Code>sample string 2</category1Code>
      <category1Description>sample string 3</category1Description>
      <category2Code>sample string 4</category2Code>
      <category2Description>sample string 5</category2Description>
      <id>1</id>
    </VatDocAdditionalAmount>
  </additionalAmounts>
  <attributes>
    <Attribute>
      <attributeId>2</attributeId>
      <code>sample string 4</code>
      <companyData>
        <companyName>sample string 1</companyName>
        <databaseName>sample string 2</databaseName>
      </companyData>
      <copyToDelivery>7</copyToDelivery>
      <copyToTransaction>6</copyToTransaction>
      <id>1</id>
      <objectId>3</objectId>
      <value>sample string 5</value>
    </Attribute>
    <Attribute>
      <attributeId>2</attributeId>
      <code>sample string 4</code>
      <companyData>
        <companyName>sample string 1</companyName>
        <databaseName>sample string 2</databaseName>
      </companyData>
      <copyToDelivery>7</copyToDelivery>
      <copyToTransaction>6</copyToTransaction>
      <id>1</id>
      <objectId>3</objectId>
      <value>sample string 5</value>
    </Attribute>
  </attributes>
  <bankAccountNumber>sample string 26</bankAccountNumber>
  <categoryCode>sample string 16</categoryCode>
  <categoryDescription>sample string 17</categoryDescription>
  <companyData>
    <companyName>sample string 1</companyName>
    <databaseName>sample string 2</databaseName>
  </companyData>
  <contractor>
    <additionalAdress>sample string 12</additionalAdress>
    <attributes>
      <Attribute>
        <attributeId>2</attributeId>
        <code>sample string 4</code>
        <companyData>
          <companyName>sample string 1</companyName>
          <databaseName>sample string 2</databaseName>
        </companyData>
        <copyToDelivery>7</copyToDelivery>
        <copyToTransaction>6</copyToTransaction>
        <id>1</id>
        <objectId>3</objectId>
        <value>sample string 5</value>
      </Attribute>
      <Attribute>
        <attributeId>2</attributeId>
        <code>sample string 4</code>
        <companyData>
          <companyName>sample string 1</companyName>
          <databaseName>sample string 2</databaseName>
        </companyData>
        <copyToDelivery>7</copyToDelivery>
        <copyToTransaction>6</copyToTransaction>
        <id>1</id>
        <objectId>3</objectId>
        <value>sample string 5</value>
      </Attribute>
    </attributes>
    <bankAccountNumber>sample string 22</bankAccountNumber>
    <city>sample string 10</city>
    <code>sample string 2</code>
    <companyData>
      <companyName>sample string 1</companyName>
      <databaseName>sample string 2</databaseName>
    </companyData>
    <country>sample string 8</country>
    <countryCode>sample string 31</countryCode>
    <countryIso>sample string 32</countryIso>
    <created>2025-11-08T13:34:34.9796429+01:00</created>
    <dateOfPayment>26</dateOfPayment>
    <defaultPrice>21</defaultPrice>
    <description>sample string 30</description>
    <email>sample string 24</email>
    <final>1</final>
    <flatNumber>sample string 16</flatNumber>
    <group>sample string 33</group>
    <houseNumber>sample string 15</houseNumber>
    <id>1</id>
    <inactive>20</inactive>
    <maxPaymentDelay>27</maxPaymentDelay>
    <name1>sample string 3</name1>
    <name2>sample string 4</name2>
    <name3>sample string 5</name3>
    <paymentMethod>sample string 25</paymentMethod>
    <peselNumber>sample string 6</peselNumber>
    <phone1>sample string 18</phone1>
    <phone2>sample string 19</phone2>
    <phoneDocument>sample string 17</phoneDocument>
    <post>sample string 14</post>
    <postCode>sample string 13</postCode>
    <purchaseCategory>sample string 34</purchaseCategory>
    <regon>sample string 23</regon>
    <representativeId>35</representativeId>
    <representativeType>36</representativeType>
    <split_payment>1</split_payment>
    <street>sample string 11</street>
    <type>1</type>
    <type_competitor>1</type_competitor>
    <type_partner>1</type_partner>
    <type_potential>1</type_potential>
    <type_receiver>1</type_receiver>
    <type_supplier>1</type_supplier>
    <updated>2025-11-08T13:34:34.9796429+01:00</updated>
    <vatNumber>sample string 7</vatNumber>
    <voivodeship>sample string 9</voivodeship>
  </contractor>
  <correctedDocumentNumber>sample string 6</correctedDocumentNumber>
  <created>2025-11-08T13:34:34.9796429+01:00</created>
  <currency>sample string 8</currency>
  <currencyRate>1</currencyRate>
  <currencyRateDate>2025-11-08T13:34:34.9796429+01:00</currencyRateDate>
  <currencyRateType>1</currencyRateType>
  <customerType>1</customerType>
  <disableCustomerDataUpdate>true</disableCustomerDataUpdate>
  <documentIssueDate>2025-11-08T13:34:34.9796429+01:00</documentIssueDate>
  <documentPaymentDueDate>2025-11-08T13:34:34.9796429+01:00</documentPaymentDueDate>
  <documentReceiptDate>2025-11-08T13:34:34.9796429+01:00</documentReceiptDate>
  <documentSaleDate>2025-11-08T13:34:34.9796429+01:00</documentSaleDate>
  <documentTaxObligationDate>2025-11-08T13:34:34.9796429+01:00</documentTaxObligationDate>
  <elements>
    <VatDocElement>
      <category1Code>sample string 2</category1Code>
      <category1Description>sample string 3</category1Description>
      <category2Code>sample string 4</category2Code>
      <category2Description>sample string 5</category2Description>
      <deductions>9</deductions>
      <grossValue>6</grossValue>
      <id>1</id>
      <netValue>1</netValue>
      <vatFlag>8</vatFlag>
      <vatRate>7</vatRate>
      <vatType>10</vatType>
      <vatValue>1</vatValue>
    </VatDocElement>
    <VatDocElement>
      <category1Code>sample string 2</category1Code>
      <category1Description>sample string 3</category1Description>
      <category2Code>sample string 4</category2Code>
      <category2Description>sample string 5</category2Description>
      <deductions>9</deductions>
      <grossValue>6</grossValue>
      <id>1</id>
      <netValue>1</netValue>
      <vatFlag>8</vatFlag>
      <vatRate>7</vatRate>
      <vatType>10</vatType>
      <vatValue>1</vatValue>
    </VatDocElement>
  </elements>
  <fullNumber>sample string 4</fullNumber>
  <grossValueCurrency>22</grossValueCurrency>
  <id>1</id>
  <internalVat>1</internalVat>
  <invoiceId>1</invoiceId>
  <invoicingPerson>sample string 23</invoicingPerson>
  <jpkV7Codes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </jpkV7Codes>
  <netValue>21</netValue>
  <note>sample string 28</note>
  <paid>27</paid>
  <payer>
    <additionalAdress>sample string 12</additionalAdress>
    <attributes>
      <Attribute>
        <attributeId>2</attributeId>
        <code>sample string 4</code>
        <companyData>
          <companyName>sample string 1</companyName>
          <databaseName>sample string 2</databaseName>
        </companyData>
        <copyToDelivery>7</copyToDelivery>
        <copyToTransaction>6</copyToTransaction>
        <id>1</id>
        <objectId>3</objectId>
        <value>sample string 5</value>
      </Attribute>
      <Attribute>
        <attributeId>2</attributeId>
        <code>sample string 4</code>
        <companyData>
          <companyName>sample string 1</companyName>
          <databaseName>sample string 2</databaseName>
        </companyData>
        <copyToDelivery>7</copyToDelivery>
        <copyToTransaction>6</copyToTransaction>
        <id>1</id>
        <objectId>3</objectId>
        <value>sample string 5</value>
      </Attribute>
    </attributes>
    <bankAccountNumber>sample string 22</bankAccountNumber>
    <city>sample string 10</city>
    <code>sample string 2</code>
    <companyData>
      <companyName>sample string 1</companyName>
      <databaseName>sample string 2</databaseName>
    </companyData>
    <country>sample string 8</country>
    <countryCode>sample string 31</countryCode>
    <countryIso>sample string 32</countryIso>
    <created>2025-11-08T13:34:34.9796429+01:00</created>
    <dateOfPayment>26</dateOfPayment>
    <defaultPrice>21</defaultPrice>
    <description>sample string 30</description>
    <email>sample string 24</email>
    <final>1</final>
    <flatNumber>sample string 16</flatNumber>
    <group>sample string 33</group>
    <houseNumber>sample string 15</houseNumber>
    <id>1</id>
    <inactive>20</inactive>
    <maxPaymentDelay>27</maxPaymentDelay>
    <name1>sample string 3</name1>
    <name2>sample string 4</name2>
    <name3>sample string 5</name3>
    <paymentMethod>sample string 25</paymentMethod>
    <peselNumber>sample string 6</peselNumber>
    <phone1>sample string 18</phone1>
    <phone2>sample string 19</phone2>
    <phoneDocument>sample string 17</phoneDocument>
    <post>sample string 14</post>
    <postCode>sample string 13</postCode>
    <purchaseCategory>sample string 34</purchaseCategory>
    <regon>sample string 23</regon>
    <representativeId>35</representativeId>
    <representativeType>36</representativeType>
    <split_payment>1</split_payment>
    <street>sample string 11</street>
    <type>1</type>
    <type_competitor>1</type_competitor>
    <type_partner>1</type_partner>
    <type_potential>1</type_potential>
    <type_receiver>1</type_receiver>
    <type_supplier>1</type_supplier>
    <updated>2025-11-08T13:34:34.9796429+01:00</updated>
    <vatNumber>sample string 7</vatNumber>
    <voivodeship>sample string 9</voivodeship>
  </payer>
  <paymentMethod>sample string 7</paymentMethod>
  <paymentMethodId>1</paymentMethodId>
  <registerName>sample string 5</registerName>
  <settleVat>1</settleVat>
  <splitPayment>true</splitPayment>
  <transactionType>10</transactionType>
  <transferExponormFromCustomer>true</transferExponormFromCustomer>
  <type>2</type>
  <updated>2025-11-08T13:34:34.9796429+01:00</updated>
  <vatDeclarationMonth>19</vatDeclarationMonth>
  <vatDeclarationYear>20</vatDeclarationYear>
</VatDocHeader>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'VatDocHeader'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.