DataFlex / EDS API / Izveidot dokumentu "Informācija par atteiktiem attālinātiem maksājumiem".
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vReq
Handle hoReq
Handle hoJsonParam4
Handle hoJsonParam5
Variant vResp
Handle hoResp
Variant vSbResponseBody
Handle hoSbResponseBody
Handle hoJResp
Integer iRespStatusCode
String sTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Get Create (RefClass(cComChilkatHttpRequest)) To hoReq
If (Not(IsComObjectCreated(hoReq))) Begin
Send CreateComObject of hoReq
End
Send ComAddParam To hoReq "Epasts" "sint qui Ut in"
Send ComAddParam To hoReq "TaksGads" "63269840"
Send ComAddParam To hoReq "Talrunis" "n"
Get Create (RefClass(cComChilkatJsonObject)) To hoJsonParam4
If (Not(IsComObjectCreated(hoJsonParam4))) Begin
Send CreateComObject of hoJsonParam4
End
Get ComUpdateString Of hoJsonParam4 "MaksajumaDatums" "2000-01-31T00:00:00" To iSuccess
Get ComUpdateString Of hoJsonParam4 "MaksatajaPersonasKods" "tempor aut" To iSuccess
Get ComUpdateString Of hoJsonParam4 "MaksatajaVardsUzvards" "dolore eu exercitation" To iSuccess
Get ComUpdateString Of hoJsonParam4 "SanemejaNmrKods" "cul" To iSuccess
Get ComUpdateString Of hoJsonParam4 "SanemejaNosaukums" "cupidatat aute Duis" To iSuccess
Get ComUpdateString Of hoJsonParam4 "Valsts" "irure" To iSuccess
Get ComUpdateString Of hoJsonParam4 "Piezimes" "eu dolor ut" To iSuccess
Get ComEmit Of hoJsonParam4 To sTemp1
Send ComAddParam To hoReq "AtteiktieMaksajumi" sTemp1
Get Create (RefClass(cComChilkatJsonObject)) To hoJsonParam5
If (Not(IsComObjectCreated(hoJsonParam5))) Begin
Send CreateComObject of hoJsonParam5
End
Get ComUpdateString Of hoJsonParam5 "MaksajumaDatums" "2000-01-31T00:00:00" To iSuccess
Get ComUpdateString Of hoJsonParam5 "MaksatajaPersonasKods" "ea conse" To iSuccess
Get ComUpdateString Of hoJsonParam5 "MaksatajaVardsUzvards" "labore irure officia adipisicing" To iSuccess
Get ComUpdateString Of hoJsonParam5 "SanemejaNmrKods" "se" To iSuccess
Get ComUpdateString Of hoJsonParam5 "SanemejaNosaukums" "occaecat cillum aliqua officia" To iSuccess
Get ComUpdateString Of hoJsonParam5 "Valsts" "sint" To iSuccess
Get ComUpdateString Of hoJsonParam5 "Piezimes" "deserunt cupidatat proident" To iSuccess
Get ComEmit Of hoJsonParam5 To sTemp1
Send ComAddParam To hoReq "AtteiktieMaksajumi" sTemp1
Send ComAddParam To hoReq "NmrKods" "enim deser"
Send ComAddParam To hoReq "Precizejums" "true"
Send ComAddParam To hoReq "PrecizejamaisDokuments" "-52611474"
Send ComAddParam To hoReq "PrecizejumaPamatojums" "Lorem"
Send ComAddHeader To hoReq "Accept" "application/json"
Get pvComObject of hoReq to vReq
Get ComPostUrlEncoded Of hoHttp "https://eds.vid.gov.lv/api/doc/aamv1" vReq To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
Send CreateComObject of hoSbResponseBody
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess
Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
If (Not(IsComObjectCreated(hoJResp))) Begin
Send CreateComObject of hoJResp
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
Set ComEmitCompact Of hoJResp To False
Showln "Response Body:"
Get ComEmit Of hoJResp To sTemp1
Showln sTemp1
Get ComStatusCode Of hoResp To iRespStatusCode
Showln "Response Status Code = " iRespStatusCode
If (iRespStatusCode >= 400) Begin
Showln "Response Header:"
Get ComHeader Of hoResp To sTemp1
Showln sTemp1
Showln "Failed."
Send Destroy of hoResp
Procedure_Return
End
Send Destroy of hoResp
End_Procedure
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": ""
}
]
}