PHP (Extension) / EDS API / Dokuments "PVN atmaksas pieteikums".
Back to Collection Items
<?php
include("chilkat_9_5_0.php");
$success = $http->QuickGetSb('https://eds.vid.gov.lv/api/doc/pvnav2/:id',$sbResponseBody);$jResp->LoadSb($sbResponseBody);$jResp->put_EmitCompact(false);$CodeTypeValueValue = $jResp->stringOf('Representative.RepresentativeID.CodeTypeValue.value');$CodeValue = $jResp->stringOf('Representative.RepresentativeID.Code.value');$IssuedByValue = $jResp->stringOf('Representative.RepresentativeID.IssuedBy.value');$jResp->put_I($i);$IssuingDate = $jResp->stringOf('ImportInformation[i].IssuingDate');$SupplierName = $jResp->stringOf('ImportInformation[i].SupplierName');$SupplierAddressFree = $jResp->stringOf('ImportInformation[i].SupplierAddressFree');$SupplierCountryCode = $jResp->stringOf('ImportInformation[i].SupplierCountryCode');$v_Currency = $jResp->stringOf('ImportInformation[i].Currency');$TaxableAmount = $jResp->stringOf('ImportInformation[i].TaxableAmount');$VatAmount = $jResp->stringOf('ImportInformation[i].VatAmount');$ReferenceNumber = $jResp->stringOf('ImportInformation[i].ReferenceNumber');$ReferenceInformation = $jResp->stringOf('ImportInformation[i].ReferenceInformation');$SupplierTelephoneNumber = $jResp->stringOf('ImportInformation[i].SupplierTelephoneNumber');$GoodsDescriptionFreeText = $jResp->stringOf('ImportInformation[i].GoodsDescriptionFreeText');$GoodsDescriptionFreeTextLang = $jResp->stringOf('ImportInformation[i].GoodsDescriptionFreeTextLang');$GoodsDescriptionCodes = $jResp->stringOf('ImportInformation[i].GoodsDescriptionCodes');$ProRataRate = $jResp->stringOf('ImportInformation[i].ProRataRate');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('PurchaseInformation');$jResp->put_I($i);$IssuingDate = $jResp->stringOf('PurchaseInformation[i].IssuingDate');$SupplierName = $jResp->stringOf('PurchaseInformation[i].SupplierName');$SupplierAddressFree = $jResp->stringOf('PurchaseInformation[i].SupplierAddressFree');$SupplierCountryCode = $jResp->stringOf('PurchaseInformation[i].SupplierCountryCode');$v_Currency = $jResp->stringOf('PurchaseInformation[i].Currency');$TaxableAmount = $jResp->stringOf('PurchaseInformation[i].TaxableAmount');$VatAmount = $jResp->stringOf('PurchaseInformation[i].VatAmount');$ReferenceNumber = $jResp->stringOf('PurchaseInformation[i].ReferenceNumber');$EuTraderIdIssuedBy = $jResp->stringOf('PurchaseInformation[i].EuTraderIdIssuedBy');$SimplifiedInvoice = $jResp->BoolOf('PurchaseInformation[i].SimplifiedInvoice');$SupplierTelephoneNumber = $jResp->stringOf('PurchaseInformation[i].SupplierTelephoneNumber');$EuTraderId = $jResp->stringOf('PurchaseInformation[i].EuTraderId');$EuTraderIdType = $jResp->stringOf('PurchaseInformation[i].EuTraderIdType');$GoodsDescriptionFreeText = $jResp->stringOf('PurchaseInformation[i].GoodsDescriptionFreeText');$GoodsDescriptionFreeTextLang = $jResp->stringOf('PurchaseInformation[i].GoodsDescriptionFreeTextLang');$GoodsDescriptionCodes = $jResp->stringOf('PurchaseInformation[i].GoodsDescriptionCodes');$ProRataRate = $jResp->stringOf('PurchaseInformation[i].ProRataRate');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('DocumentCopy');$jResp->put_I($i);$FileType = $jResp->stringOf('DocumentCopy[i].FileType');$FileName = $jResp->stringOf('DocumentCopy[i].FileName');$FileDescription = $jResp->stringOf('DocumentCopy[i].FileDescription');$FileContent = $jResp->stringOf('DocumentCopy[i].FileContent');$i = $i + 1;
?>
Curl Command
curl -X GET
-H "Accept: application/json"
https://eds.vid.gov.lv/api/doc/pvnav2/:id
Postman Collection Item JSON
{
"name": "Dokuments \"PVN atmaksas pieteikums\".",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/doc/pvnav2/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"pvnav2",
":id"
],
"variable": [
{
"key": "id",
"value": "25210683",
"description": "(Required) Dokumenta id."
}
]
}
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/doc/pvnav2/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"pvnav2",
":id"
],
"variable": [
{
"key": "id",
"value": "25210683",
"description": "(Required) Dokumenta id."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"NmrKods\": \"anim velit tempor ullamco\",\n \"Talrunis\": \"4\",\n \"Sagatavotajs\": \"aliqua magna\",\n \"ApplicationReference\": {\n \"RefundingCountryCode\": \"anim ad magna\",\n \"ReferenceNumber\": \"proident\",\n \"Version\": \"irure commodo\"\n },\n \"Applicant\": {\n \"Name\": {\n \"NameFree\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"AddressFree\": \"sunt\",\n \"TelephoneNumber\": \"minim magna dolore\",\n \"CountryCode\": \"ad aute laborum\",\n \"EUTraderID\": {\n \"CodeTypeValue\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"Code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"IssuedBy\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"EmailAddress\": \"quis\"\n },\n \"Representative\": {\n \"AddressFree\": \"deserunt\",\n \"CountryCode\": \"in anim\",\n \"EmailAddress\": \"\",\n \"Name\": {\n \"NameFree\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"TelephoneNumber\": \"\\r6\",\n \"RepresentativeID\": {\n \"CodeTypeValue\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"Code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"IssuedBy\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n },\n \"RefundPeriod\": {\n \"StartDate\": \"2000-01-31T00:00:00\",\n \"EndDate\": \"2000-01-31T00:00:00\"\n },\n \"BusinessDescription\": {\n \"BusinessActivity\": \"cupidatat deserunt veniam\"\n },\n \"DetailedBankAccount\": {\n \"OwnerName\": \"-r4AJzac\",\n \"OwnerType\": \"magna consectetur sint\",\n \"IBAN\": \"FR76IV05EPC,RNHM8MENESST\",\n \"BIC\": \"CNWONQML\",\n \"Currency\": \"Duis veniam\"\n },\n \"ImportInformation\": [\n {\n \"IssuingDate\": \"2000-01-31T00:00:00\",\n \"SupplierName\": \"sunt dolor dolor\",\n \"SupplierAddressFree\": \"dolore\",\n \"SupplierCountryCode\": \"est dolore dolor\",\n \"Currency\": \"ea elit nulla velit\",\n \"TaxableAmount\": -88820603.7288061,\n \"VatAmount\": 71318677.0492571,\n \"ReferenceNumber\": \"eu aliqua nulla\",\n \"ReferenceInformation\": \"exercitation laborum\",\n \"SupplierTelephoneNumber\": \"3 \",\n \"GoodsDescriptionFreeText\": \"ani\",\n \"GoodsDescriptionFreeTextLang\": \"ut nostrud ex officia\",\n \"GoodsDescriptionCodes\": \"in L\",\n \"ProRataRate\": 37125738.782556444\n },\n {\n \"IssuingDate\": \"2000-01-31T00:00:00\",\n \"SupplierName\": \"in non culpa\",\n \"SupplierAddressFree\": \"sit off\",\n \"SupplierCountryCode\": \"qui dolore\",\n \"Currency\": \"in eiusmod in anim\",\n \"TaxableAmount\": 50542638.62150416,\n \"VatAmount\": -84461612.01044232,\n \"ReferenceNumber\": \"irure \",\n \"ReferenceInformation\": \"reprehenderit et voluptate\",\n \"SupplierTelephoneNumber\": \"\\t \",\n \"GoodsDescriptionFreeText\": \"laboris dolor\",\n \"GoodsDescriptionFreeTextLang\": \"ipsum commodo\",\n \"GoodsDescriptionCodes\": \"culpa mollit dolor\",\n \"ProRataRate\": -64717664.86095043\n }\n ],\n \"PurchaseInformation\": [\n {\n \"IssuingDate\": \"2000-01-31T00:00:00\",\n \"SupplierName\": \"ut cillum velit dolore fugiat\",\n \"SupplierAddressFree\": \"aliquip\",\n \"SupplierCountryCode\": \"sed aliquip adipisicing\",\n \"Currency\": \"anim labore consequat\",\n \"TaxableAmount\": 12481268.563475162,\n \"VatAmount\": 31338286.233541623,\n \"ReferenceNumber\": \"tempor exercita\",\n \"EuTraderIdIssuedBy\": \"ut ea ullamco laboris\",\n \"SimplifiedInvoice\": true,\n \"SupplierTelephoneNumber\": \" \\u000b 9 4 7\",\n \"EuTraderId\": \"mini\",\n \"EuTraderIdType\": \"deserunt sunt aliqua\",\n \"GoodsDescriptionFreeText\": \"commodo Lorem\",\n \"GoodsDescriptionFreeTextLang\": \"exercitation sunt voluptate\",\n \"GoodsDescriptionCodes\": \"Excepteur consequat et ut\",\n \"ProRataRate\": -73370109.27853811\n },\n {\n \"IssuingDate\": \"2000-01-31T00:00:00\",\n \"SupplierName\": \"sed in ut\",\n \"SupplierAddressFree\": \"quis voluptate\",\n \"SupplierCountryCode\": \"labore cillum occaecat\",\n \"Currency\": \"et elit magna\",\n \"TaxableAmount\": 40216004.607723564,\n \"VatAmount\": 29872509.991602138,\n \"ReferenceNumber\": \"et Lo\",\n \"EuTraderIdIssuedBy\": \"labore incididunt\",\n \"SimplifiedInvoice\": false,\n \"SupplierTelephoneNumber\": \"8 \",\n \"EuTraderId\": \"dolor ipsum in dolor\",\n \"EuTraderIdType\": \"consectetur Ut Lorem\",\n \"GoodsDescriptionFreeText\": \"Ut sed veniam nost\",\n \"GoodsDescriptionFreeTextLang\": \"fug\",\n \"GoodsDescriptionCodes\": \"ex\",\n \"ProRataRate\": -4523238.601603329\n }\n ],\n \"DocumentCopy\": [\n {\n \"FileType\": \"dolor sit eiusmod\",\n \"FileName\": \"sunt adipisicing\",\n \"FileDescription\": \"aute qui\",\n \"FileContent\": \"dolor officia\"\n },\n {\n \"FileType\": \"magna eu deserunt qui\",\n \"FileName\": \"pariatur\",\n \"FileDescription\": \"nisi\",\n \"FileContent\": \"in eiusmod dolor enim\"\n }\n ],\n \"Accepted\": true,\n \"Id\": -56268983,\n \"UID\": \"nulla ut\",\n \"Precizejums\": true,\n \"PrecizejamaisDokuments\": 5162629,\n \"PrecizejumaPamatojums\": \"cupidatat dolor velit nulla\"\n}"
},
{
"name": "Lietotājs nav autentificēts.",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/doc/pvnav2/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"pvnav2",
":id"
],
"variable": [
{
"key": "id",
"value": "25210683",
"description": "(Required) Dokumenta id."
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Dokuments neeksistē vai lietotājam nav tiesību.",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/doc/pvnav2/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"pvnav2",
":id"
],
"variable": [
{
"key": "id",
"value": "25210683",
"description": "(Required) Dokumenta id."
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Pārsniegts izsaukumu skaita ierobežojums.",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/doc/pvnav2/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"pvnav2",
":id"
],
"variable": [
{
"key": "id",
"value": "25210683",
"description": "(Required) Dokumenta id."
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}