Swift / EDS API / Izveidot dokumentu "Sezonas laukstrādnieku ienākuma nodokļa maksātāju ziņojums".
Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()
var success: Bool
let req = CkoHttpRequest()
req.AddParam("Epasts", value: "in in")
req.AddParam("ParskGads", value: "83772881")
let jsonParam3 = CkoJsonObject()
jsonParam3.UpdateString("NsKods", value: "")
jsonParam3.UpdateString("NsVardsUzvards", value: "Ut et adipisicing")
jsonParam3.UpdateNumber("NsDarbIenakumi", numericStr: "79738068.53705549")
jsonParam3.UpdateNumber("NsAprDarbIenNod", numericStr: "99230447.92977914")
jsonParam3.UpdateNumber("NsAprDarbIenNodVsaa", numericStr: "95483030.49111432")
jsonParam3.UpdateNumber("NsAprDarbIenNodIin", numericStr: "87126083.0950822")
jsonParam3.UpdateString("NsNodPerSakums", value: "2000-01-31T00:00:00")
jsonParam3.UpdateString("NsNodPerBeigas", value: "2000-01-31T00:00:00")
req.AddParam("Rows", value: jsonParam3.Emit())
let jsonParam4 = CkoJsonObject()
jsonParam4.UpdateString("NsKods", value: "in mollit")
jsonParam4.UpdateString("NsVardsUzvards", value: "Excepteur")
jsonParam4.UpdateNumber("NsDarbIenakumi", numericStr: "32892900.47157398")
jsonParam4.UpdateNumber("NsAprDarbIenNod", numericStr: "-59277302.18656078")
jsonParam4.UpdateNumber("NsAprDarbIenNodVsaa", numericStr: "-1755538.9136055112")
jsonParam4.UpdateNumber("NsAprDarbIenNodIin", numericStr: "-92412649.47660497")
jsonParam4.UpdateString("NsNodPerSakums", value: "2000-01-31T00:00:00")
jsonParam4.UpdateString("NsNodPerBeigas", value: "2000-01-31T00:00:00")
req.AddParam("Rows", value: jsonParam4.Emit())
req.AddParam("Talrunis", value: "nostrud elit")
req.AddParam("Sagatavotajs", value: "commodo")
req.AddParam("ParskMen", value: "est occaecat")
req.AddParam("NmrKods", value: "d")
req.AddParam("Precizejums", value: "false")
req.AddParam("PrecizejamaisDokuments", value: "-43493159")
req.AddParam("PrecizejumaPamatojums", value: "aute exercitation")
req.AddHeader("Accept", value: "application/json")
var resp: CkoHttpResponse? = http.PostUrlEncoded("https://eds.vid.gov.lv/api/doc/zslv1", req: req)
if http.LastMethodSuccess == false {
print("\(http.LastErrorText)")
return
}
let sbResponseBody = CkoStringBuilder()
resp!.GetBodySb(sbResponseBody)
let jResp = CkoJsonObject()
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = false
print("Response Body:")
print("\(jResp.Emit())")
var respStatusCode: Int = resp!.StatusCode.intValue
print("Response Status Code = \(respStatusCode)")
if respStatusCode >= 400 {
print("Response Header:")
print("\(resp!.Header)")
print("Failed.")
resp = nil
return
}
resp = nil
}
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": ""
}
]
}