PowerBuilder / EDS API / Izveidot dokumentu "Informācija par atteiktiem attālinātiem maksājumiem".
Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Req
oleobject loo_JsonParam4
oleobject loo_JsonParam5
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_Req = create oleobject
// Use "Chilkat_9_5_0.HttpRequest" for versions of Chilkat < 10.0.0
li_rc = loo_Req.ConnectToNewObject("Chilkat.HttpRequest")
loo_Req.AddParam("Epasts","sint qui Ut in")
loo_Req.AddParam("TaksGads","63269840")
loo_Req.AddParam("Talrunis","n")
loo_JsonParam4 = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JsonParam4.ConnectToNewObject("Chilkat.JsonObject")
loo_JsonParam4.UpdateString("MaksajumaDatums","2000-01-31T00:00:00")
loo_JsonParam4.UpdateString("MaksatajaPersonasKods","tempor aut")
loo_JsonParam4.UpdateString("MaksatajaVardsUzvards","dolore eu exercitation")
loo_JsonParam4.UpdateString("SanemejaNmrKods","cul")
loo_JsonParam4.UpdateString("SanemejaNosaukums","cupidatat aute Duis")
loo_JsonParam4.UpdateString("Valsts","irure")
loo_JsonParam4.UpdateString("Piezimes","eu dolor ut")
loo_Req.AddParam("AtteiktieMaksajumi",loo_JsonParam4.Emit())
loo_JsonParam5 = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JsonParam5.ConnectToNewObject("Chilkat.JsonObject")
loo_JsonParam5.UpdateString("MaksajumaDatums","2000-01-31T00:00:00")
loo_JsonParam5.UpdateString("MaksatajaPersonasKods","ea conse")
loo_JsonParam5.UpdateString("MaksatajaVardsUzvards","labore irure officia adipisicing")
loo_JsonParam5.UpdateString("SanemejaNmrKods","se")
loo_JsonParam5.UpdateString("SanemejaNosaukums","occaecat cillum aliqua officia")
loo_JsonParam5.UpdateString("Valsts","sint")
loo_JsonParam5.UpdateString("Piezimes","deserunt cupidatat proident")
loo_Req.AddParam("AtteiktieMaksajumi",loo_JsonParam5.Emit())
loo_Req.AddParam("NmrKods","enim deser")
loo_Req.AddParam("Precizejums","true")
loo_Req.AddParam("PrecizejamaisDokuments","-52611474")
loo_Req.AddParam("PrecizejumaPamatojums","Lorem")
loo_Req.AddHeader("Accept","application/json")
loo_Resp = loo_Http.PostUrlEncoded("https://eds.vid.gov.lv/api/doc/aamv1",loo_Req)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_Req
destroy loo_JsonParam4
destroy loo_JsonParam5
return
end if
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")
loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0
Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()
li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Resp.Header
Write-Debug "Failed."
destroy loo_Resp
destroy loo_Http
destroy loo_Req
destroy loo_JsonParam4
destroy loo_JsonParam5
destroy loo_SbResponseBody
destroy loo_JResp
return
end if
destroy loo_Resp
destroy loo_Http
destroy loo_Req
destroy loo_JsonParam4
destroy loo_JsonParam5
destroy loo_SbResponseBody
destroy loo_JResp
Curl Command
curl -X POST
-H "Content-Type: application/x-www-form-urlencoded"
-H "Accept: application/json"
--data-urlencode 'Epasts=sint qui Ut in'
--data-urlencode 'TaksGads=63269840'
--data-urlencode 'Talrunis=n'
--data-urlencode 'AtteiktieMaksajumi={"MaksajumaDatums":"2000-01-31T00:00:00","MaksatajaPersonasKods":"tempor aut","MaksatajaVardsUzvards":"dolore eu exercitation","SanemejaNmrKods":"cul","SanemejaNosaukums":"cupidatat aute Duis","Valsts":"irure","Piezimes":"eu dolor ut"}'
--data-urlencode 'AtteiktieMaksajumi={"MaksajumaDatums":"2000-01-31T00:00:00","MaksatajaPersonasKods":"ea conse","MaksatajaVardsUzvards":"labore irure officia adipisicing","SanemejaNmrKods":"se","SanemejaNosaukums":"occaecat cillum aliqua officia","Valsts":"sint","Piezimes":"deserunt cupidatat proident"}'
--data-urlencode 'NmrKods=enim deser'
--data-urlencode 'Precizejums=true'
--data-urlencode 'PrecizejamaisDokuments=-52611474'
--data-urlencode 'PrecizejumaPamatojums=Lorem'
https://eds.vid.gov.lv/api/doc/aamv1
Postman Collection Item JSON
{
"name": "Izveidot dokumentu \"Informācija par atteiktiem attālinātiem maksājumiem\".",
"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": "sint qui Ut in",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "63269840",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "n",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"tempor aut\",\"MaksatajaVardsUzvards\":\"dolore eu exercitation\",\"SanemejaNmrKods\":\"cul\",\"SanemejaNosaukums\":\"cupidatat aute Duis\",\"Valsts\":\"irure\",\"Piezimes\":\"eu dolor ut\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea conse\",\"MaksatajaVardsUzvards\":\"labore irure officia adipisicing\",\"SanemejaNmrKods\":\"se\",\"SanemejaNosaukums\":\"occaecat cillum aliqua officia\",\"Valsts\":\"sint\",\"Piezimes\":\"deserunt cupidatat proident\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "enim deser",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "true",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "-52611474",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "Lorem",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "-12855709"
},
{
"name": "Pieprasījuma dati ir kļūdaini.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "Epasts",
"value": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"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": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"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": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"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": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"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": "minim sed enim occaecat",
"description": "(Required) Epasta adrese."
},
{
"key": "TaksGads",
"value": "43781410",
"description": "(Required) Taksācijas gads."
},
{
"key": "Talrunis",
"value": "do",
"description": "Iesniedzēja tālrunis."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"ea se\",\"MaksatajaVardsUzvards\":\"ad esse\",\"SanemejaNmrKods\":\"dol\",\"SanemejaNosaukums\":\"esse dolore sunt in\",\"Valsts\":\"id\",\"Piezimes\":\"sint tempor\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "AtteiktieMaksajumi",
"value": "{\"MaksajumaDatums\":\"2000-01-31T00:00:00\",\"MaksatajaPersonasKods\":\"dolor eni\",\"MaksatajaVardsUzvards\":\"non do ad\",\"SanemejaNmrKods\":\"U\",\"SanemejaNosaukums\":\"reprehenderit esse\",\"Valsts\":\"occaecat fugiat laborum\",\"Piezimes\":\"dolore reprehenderit sint Ut dolore\"}",
"description": "Atteiktie maksājumi."
},
{
"key": "NmrKods",
"value": "dolor ",
"description": "Nodokļu maksātāja kods."
},
{
"key": "Precizejums",
"value": "false",
"description": "Vai dokuments ir precizējums."
},
{
"key": "PrecizejamaisDokuments",
"value": "47757579",
"description": "Precizējamā dokumenta numurs."
},
{
"key": "PrecizejumaPamatojums",
"value": "enim occaecat consectetur esse",
"description": "Precizējuma pamatojums."
}
]
},
"url": {
"raw": "{{baseUrl}}/api/doc/aamv1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"doc",
"aamv1"
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}