VB6 / EDS API / Izveidot dokumentu "Sezonas laukstrādnieku ienākuma nodokļa maksātāju ziņojums".
Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New ChilkatHttp
Dim success As Long
Dim req As New ChilkatHttpRequest
req.AddParam "Epasts","in in"
req.AddParam "ParskGads","83772881"
Dim jsonParam3 As New ChilkatJsonObject
success = jsonParam3.UpdateString("NsKods","")
success = jsonParam3.UpdateString("NsVardsUzvards","Ut et adipisicing")
success = jsonParam3.UpdateNumber("NsDarbIenakumi","79738068.53705549")
success = jsonParam3.UpdateNumber("NsAprDarbIenNod","99230447.92977914")
success = jsonParam3.UpdateNumber("NsAprDarbIenNodVsaa","95483030.49111432")
success = jsonParam3.UpdateNumber("NsAprDarbIenNodIin","87126083.0950822")
success = jsonParam3.UpdateString("NsNodPerSakums","2000-01-31T00:00:00")
success = jsonParam3.UpdateString("NsNodPerBeigas","2000-01-31T00:00:00")
req.AddParam "Rows",jsonParam3.Emit()
Dim jsonParam4 As New ChilkatJsonObject
success = jsonParam4.UpdateString("NsKods","in mollit")
success = jsonParam4.UpdateString("NsVardsUzvards","Excepteur")
success = jsonParam4.UpdateNumber("NsDarbIenakumi","32892900.47157398")
success = jsonParam4.UpdateNumber("NsAprDarbIenNod","-59277302.18656078")
success = jsonParam4.UpdateNumber("NsAprDarbIenNodVsaa","-1755538.9136055112")
success = jsonParam4.UpdateNumber("NsAprDarbIenNodIin","-92412649.47660497")
success = jsonParam4.UpdateString("NsNodPerSakums","2000-01-31T00:00:00")
success = jsonParam4.UpdateString("NsNodPerBeigas","2000-01-31T00:00:00")
req.AddParam "Rows",jsonParam4.Emit()
req.AddParam "Talrunis","nostrud elit"
req.AddParam "Sagatavotajs","commodo"
req.AddParam "ParskMen","est occaecat"
req.AddParam "NmrKods","d"
req.AddParam "Precizejums","false"
req.AddParam "PrecizejamaisDokuments","-43493159"
req.AddParam "PrecizejumaPamatojums","aute exercitation"
req.AddHeader "Accept","application/json"
Dim resp As ChilkatHttpResponse
Set resp = http.PostUrlEncoded("https://eds.vid.gov.lv/api/doc/zslv1",req)
If (http.LastMethodSuccess = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Dim sbResponseBody As New ChilkatStringBuilder
success = resp.GetBodySb(sbResponseBody)
Dim jResp As New ChilkatJsonObject
success = jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = 0
Debug.Print "Response Body:"
Debug.Print jResp.Emit()
Dim respStatusCode As Long
respStatusCode = resp.StatusCode
Debug.Print "Response Status Code = " & respStatusCode
If (respStatusCode >= 400) Then
Debug.Print "Response Header:"
Debug.Print resp.Header
Debug.Print "Failed."
Exit Sub
End If
Curl Command
curl -X POST
-H "Content-Type: application/x-www-form-urlencoded"
-H "Accept: application/json"
--data-urlencode 'Epasts=in in'
--data-urlencode 'ParskGads=83772881'
--data-urlencode 'Rows={"NsKods":"","NsVardsUzvards":"Ut et adipisicing","NsDarbIenakumi":79738068.53705549,"NsAprDarbIenNod":99230447.92977914,"NsAprDarbIenNodVsaa":95483030.49111432,"NsAprDarbIenNodIin":87126083.0950822,"NsNodPerSakums":"2000-01-31T00:00:00","NsNodPerBeigas":"2000-01-31T00:00:00"}'
--data-urlencode 'Rows={"NsKods":"in mollit","NsVardsUzvards":"Excepteur","NsDarbIenakumi":32892900.47157398,"NsAprDarbIenNod":-59277302.18656078,"NsAprDarbIenNodVsaa":-1755538.9136055112,"NsAprDarbIenNodIin":-92412649.47660497,"NsNodPerSakums":"2000-01-31T00:00:00","NsNodPerBeigas":"2000-01-31T00:00:00"}'
--data-urlencode 'Talrunis=nostrud elit'
--data-urlencode 'Sagatavotajs=commodo'
--data-urlencode 'ParskMen=est occaecat'
--data-urlencode 'NmrKods=d'
--data-urlencode 'Precizejums=false'
--data-urlencode 'PrecizejamaisDokuments=-43493159'
--data-urlencode 'PrecizejumaPamatojums=aute exercitation'
https://eds.vid.gov.lv/api/doc/zslv1
Postman Collection Item JSON
{
"name": "Izveidot dokumentu \"Sezonas laukstrādnieku ienākuma nodokļa maksātāju ziņojums\".",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "in in",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83772881",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"\",\"NsVardsUzvards\":\"Ut et adipisicing\",\"NsDarbIenakumi\":79738068.53705549,\"NsAprDarbIenNod\":99230447.92977914,\"NsAprDarbIenNodVsaa\":95483030.49111432,\"NsAprDarbIenNodIin\":87126083.0950822,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"in mollit\",\"NsVardsUzvards\":\"Excepteur\",\"NsDarbIenakumi\":32892900.47157398,\"NsAprDarbIenNod\":-59277302.18656078,\"NsAprDarbIenNodVsaa\":-1755538.9136055112,\"NsAprDarbIenNodIin\":-92412649.47660497,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "nostrud elit",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "commodo",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "est occaecat",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "d",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-43493159",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "aute exercitation",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"response": [
{
"name": "Izveidotā dokumenta numurs.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "25210683"
},
{
"name": "Pieprasījuma dati ir kļūdaini.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Lietotājs nav autentificēts.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Lietotājam nav tiesību veikt šo darbību.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Dokumenta unikalitātes ierobežojums. Dokuments par norādīto periodu jau izveidots. Lai izveidotu atkārtoti, izmantojiet jaunu drošības talonu.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Conflict",
"code": 409,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Pārsniegts izsaukumu skaita ierobežojums.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "mollit adipisicing par",
"description": "(Required) Epasta adrese."
},
{
"key": "ParskGads",
"value": "83874150",
"description": "(Required) Taksācijas gads."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ad ulla\",\"NsVardsUzvards\":\"mollit minim Ut\",\"NsDarbIenakumi\":61525570.349401355,\"NsAprDarbIenNod\":-66988745.410857305,\"NsAprDarbIenNodVsaa\":79966060.38369602,\"NsAprDarbIenNodIin\":-59221283.098910995,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Rows",
"value": "{\"NsKods\":\"ea q\",\"NsVardsUzvards\":\"cillum sunt\",\"NsDarbIenakumi\":-49442409.92055273,\"NsAprDarbIenNod\":-93591068.7565555,\"NsAprDarbIenNodVsaa\":27644731.465948164,\"NsAprDarbIenNodIin\":47123246.07144591,\"NsNodPerSakums\":\"2000-01-31T00:00:00\",\"NsNodPerBeigas\":\"2000-01-31T00:00:00\"}",
"description": "Iegūst vai uzstāda dokumenta rindas."
},
{
"key": "Talrunis",
"value": "inc",
"description": "Iesniedzēja tālrunis."
},
{
"key": "Sagatavotajs",
"value": "sunt adipisicing minim nostrud fugiat",
"description": "Sagatavotāja vārds, uzvārds."
},
{
"key": "ParskMen",
"value": "culpa id",
"description": "Taksācijas mēneša kods (01-12)."
},
{
"key": "NmrKods",
"value": "co",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-60976858",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "do elit",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/zslv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"zslv1"
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}