Create a candidate statutory document
curl --request POST \
--url https://api.gospott.com/candidates/{id}/statutory-documents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"subtype": "<string>",
"number": "<string>",
"validity": {
"from": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.gospott.com/candidates/{id}/statutory-documents"
payload = {
"subtype": "<string>",
"number": "<string>",
"validity": {
"from": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subtype: '<string>',
number: '<string>',
validity: {from: '2023-11-07T05:31:56Z', until: '2023-11-07T05:31:56Z'}
})
};
fetch('https://api.gospott.com/candidates/{id}/statutory-documents', 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://api.gospott.com/candidates/{id}/statutory-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subtype' => '<string>',
'number' => '<string>',
'validity' => [
'from' => '2023-11-07T05:31:56Z',
'until' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/candidates/{id}/statutory-documents"
payload := strings.NewReader("{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gospott.com/candidates/{id}/statutory-documents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/candidates/{id}/statutory-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Candidate Statutory Documents
Create a candidate statutory document
Creates a statutory document for the candidate and returns its id.
POST
/
candidates
/
{id}
/
statutory-documents
Create a candidate statutory document
curl --request POST \
--url https://api.gospott.com/candidates/{id}/statutory-documents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"subtype": "<string>",
"number": "<string>",
"validity": {
"from": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.gospott.com/candidates/{id}/statutory-documents"
payload = {
"subtype": "<string>",
"number": "<string>",
"validity": {
"from": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subtype: '<string>',
number: '<string>',
validity: {from: '2023-11-07T05:31:56Z', until: '2023-11-07T05:31:56Z'}
})
};
fetch('https://api.gospott.com/candidates/{id}/statutory-documents', 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://api.gospott.com/candidates/{id}/statutory-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subtype' => '<string>',
'number' => '<string>',
'validity' => [
'from' => '2023-11-07T05:31:56Z',
'until' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/candidates/{id}/statutory-documents"
payload := strings.NewReader("{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gospott.com/candidates/{id}/statutory-documents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/candidates/{id}/statutory-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subtype\": \"<string>\",\n \"number\": \"<string>\",\n \"validity\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Authorizations
API key for authentication. Get your API key from Settings → API Keys in your Spott dashboard.
Path Parameters
Body
application/json
The statutory document type
Available options:
identity_card, passport, work_permit, residence_permit An optional document subtype
ISO 3166-1 alpha-2 country code that issued the document
Available options:
AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, XK, YE, ZM, ZW The document number
The validity period of the document
Show child attributes
Show child attributes
Response
The statutory document was created. Returns its id.
Minimum string length:
1Was this page helpful?