STR Submitted Declarations
Get submitted declaration search task status
Get the status of a submitted declaration search task.
Allowed Roles:
admin, str-uploader
GET
/
str
/
submitted-declarations
/
{taskId}
Get submitted declaration search task status
curl --request GET \
--url https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"taskId": 123,
"status": "IN_PROGRESS",
"submittedDeclarations": [
{
"serialNumber": "1234567890",
"fromDate": "2022-01-01",
"toDate": "2022-01-01",
"rent": 100,
"cancellationAmount": 10,
"submissionDate": "2022-01-01",
"declarationType": "Initial",
"status": "Final",
"isOverdue": false
}
],
"lastUpdated": "2022-01-01T00:00:00Z"
}Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
The task ID
⌘I
Get submitted declaration search task status
curl --request GET \
--url https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://str.keroshospitality.com/api/v1/str/submitted-declarations/{taskId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"taskId": 123,
"status": "IN_PROGRESS",
"submittedDeclarations": [
{
"serialNumber": "1234567890",
"fromDate": "2022-01-01",
"toDate": "2022-01-01",
"rent": 100,
"cancellationAmount": 10,
"submissionDate": "2022-01-01",
"declarationType": "Initial",
"status": "Final",
"isOverdue": false
}
],
"lastUpdated": "2022-01-01T00:00:00Z"
}